上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

2016年4月22日

BestCoder Round #81 (div.2) Matrix

摘要: 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 int s[1001][1001]; 6 7 int main() 8 { 9 int t,m,n,q,a,x,y; 10 scanf("%d",&t); 11 w 阅读全文

posted @ 2016-04-22 21:14 青春的梦想付诸行动 阅读(161) 评论(0) 推荐(0)

BestCoder Round #81 (div.2)Machine

摘要: 1 #include <iostream> 2 #include <cstring> 3 #include <cstdio> 4 using namespace std; 5 6 char s[31]; 7 char arr[3]={'R','G','B'}; 8 long long ans[31] 阅读全文

posted @ 2016-04-22 21:13 青春的梦想付诸行动 阅读(121) 评论(0) 推荐(0)

Keywords Search

摘要: 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 #include <iostream> 5 using namespace std; 6 7 const int kind=26; 8 9 struct node { 阅读全文

posted @ 2016-04-22 17:52 青春的梦想付诸行动 阅读(152) 评论(0) 推荐(0)

scanf和gets

摘要: scanf函数输入字符串时,回车没有放在字符串中、继续输入字符时不影响 空格和回车标志结束 gets函数输入字符串时,回车字符放在字符串中,当做'\n'; 当第一次输入字符串是,当之前有数据输入时,应该用getchar()函数保存回车、 不是第一次时,没有影响,。 仅仅当回车标志结束 阅读全文

posted @ 2016-04-22 17:26 青春的梦想付诸行动 阅读(124) 评论(0) 推荐(0)

2016年4月21日

红黑树

摘要: 1 #include <cstdio> 2 #include <iostream> 3 #include <cstring> 4 #include <cmath> 5 using namespace std; 6 struct node { 7 int l,r; 8 }; 9 node s[10]; 阅读全文

posted @ 2016-04-21 16:03 青春的梦想付诸行动 阅读(145) 评论(0) 推荐(0)

2016年4月20日

等式 hash

摘要: 刚开始想都不用想用了暴力 当然超时。 根据题目要求10000k内存 一般64m内存即可以通过 利用hash函数建立,时间通过。但内存超出了。。。代码1 1 2 3 #include <cstdio> 4 #include <cstring> 5 using namespace std; 6 7 sh 阅读全文

posted @ 2016-04-20 15:12 青春的梦想付诸行动 阅读(176) 评论(0) 推荐(0)

2016年4月19日

士兵杀敌二 (树状数组)

摘要: 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 int a[1000010],c[1000010]; 6 int N,M; 7 8 int lowbit(int x) 9 { 10 return x&(-x); 阅读全文

posted @ 2016-04-19 20:04 青春的梦想付诸行动 阅读(108) 评论(0) 推荐(0)

士兵杀敌 一

摘要: 1 #include <cstdio> 2 #include <algorithm> 3 #include <cstring> 4 using namespace std; 5 int n,m,s[1000010],x,y; 6 7 int main() 8 { 9 scanf("%d%d",&n, 阅读全文

posted @ 2016-04-19 14:53 青春的梦想付诸行动 阅读(115) 评论(0) 推荐(0)

2016年4月18日

区间调度问题 选择不相交的区间(最多)

摘要: 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 #define LL long long 5 6 using namespace std; 7 8 struct node{ 9 int x,y; 10 }; 11 n 阅读全文

posted @ 2016-04-18 11:44 青春的梦想付诸行动 阅读(220) 评论(0) 推荐(0)

2016年4月15日

字母有重复全排列

摘要: 1 #include <stdio.h> 2 3 int n; 4 char s[15]; 5 char ss[15]={'A','B','C','D','E','F','G','H','I','J'}; 6 7 void dfs(int cur) //cur表示第几个位置 8 { 9 if(cur 阅读全文

posted @ 2016-04-15 15:57 青春的梦想付诸行动 阅读(365) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

导航