02 2015 档案

摘要:#include#include#include#include#include#includeusing namespace std;map a;int main(){ a['I']=1; a['V']=5; a['X']=10; a['L']=50; a['C']... 阅读全文
posted @ 2015-02-23 22:46 sola94 阅读(267) 评论(0) 推荐(0) 编辑
摘要:之前没有考虑到 两层都是 # 的情况#include#include#include#include#include#include#include#include#include#define mem(a,b) memset(a,b,sizeof(a))using namespace std;in... 阅读全文
posted @ 2015-02-20 21:10 sola94 阅读(77) 评论(0) 推荐(0) 编辑
摘要:#include#include#include#include#include#include#includeusing namespace std;int t,n;int main(){ int i,j,k; cin>>t; char op[10],io[10]; whi... 阅读全文
posted @ 2015-02-18 00:37 sola94 阅读(130) 评论(0) 推荐(0) 编辑
摘要:#include#include#include#includeusing namespace std;int vis[120][120];int vl,vr;int ok;int key;struct node{ int l,r; int fa; int op;};node st... 阅读全文
posted @ 2015-02-12 01:37 sola94 阅读(120) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=3468题意 :对于一个序列有两种操作 1 查询 l到r 的和 2 对于l 到r上的每个数 加上 up思路: 用单点更新必然超时 所以需要区间更新(位运算时 注意 m-m>>1 与 m-(m>>1) 的区别)#include#inclu... 阅读全文
posted @ 2015-02-03 22:39 sola94 阅读(132) 评论(0) 推荐(0) 编辑
摘要:两题都是一样的题目 只是hdu 1058 多了个7题意:求一个每个数因子仅含2 3 5 7 的 序列 问 第n个数是几思路: ans[i]=min(min(ans[n2]*2,ans[n3]*3),min(ans[n5]*5,ans[n7]*7)); if(an... 阅读全文
posted @ 2015-02-03 00:47 sola94 阅读(145) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1754照着hdu 1166 的模板稍加改动即可#include#include#include#includeusing namespace std;int sum[1000000];void push(int r... 阅读全文
posted @ 2015-02-02 17:05 sola94 阅读(120) 评论(0) 推荐(0) 编辑
摘要:这题要注意的是 每次出发 起点和终点不同就可以算作不同路径思路: 从第一个起点开始dfs dp[x][y]记录从该点出发到达最后目的地有多少种走法#include#include#include#includeusing namespace std;int mat[200][200];int ... 阅读全文
posted @ 2015-02-01 22:55 sola94 阅读(141) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2571思路: dp[i+1][j]=max(dp[i+1][j],dp[i][j]+mat[i+1][j]); dp[i][j+1]=max(dp[i][j+1],dp[i][j]+m... 阅读全文
posted @ 2015-02-01 16:06 sola94 阅读(134) 评论(0) 推荐(0) 编辑
摘要:http://acm.neu.edu.cn/hustoj/problem.php?cid=1047&pid=4题意:数字1到n 任意排列 求排列成有序序列最少交换次数思路:求最小交换次数有两种 1 交换的两数必须相邻 (poj 2299) 通过归并排序求出其逆序数即为所求值 ... 阅读全文
posted @ 2015-02-01 14:49 sola94 阅读(515) 评论(0) 推荐(0) 编辑
摘要:http://acm.neu.edu.cn/hustoj/problem.php?id=1492题意: 有n个盒子 现在有两种操作: 1 在序号为x的倍数的盒子里放y个球 2 查询序号x到y的盒子里的球的总数思路: 当时以为线段数 而且没... 阅读全文
posted @ 2015-02-01 13:40 sola94 阅读(129) 评论(0) 推荐(0) 编辑
摘要:链接:http://acm.neu.edu.cn/hustoj/contest.php?cid=1047题解:http://acm.neu.edu.cn/?p=56实在太水 只水了五道= =A:#include#include#includeusing namespace std;double nu... 阅读全文
posted @ 2015-02-01 11:40 sola94 阅读(167) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示