会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
null1019
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
16
17
18
19
20
21
22
23
24
···
52
下一页
2014年8月28日
cf C. Levko and Array Recovery
摘要: http://codeforces.com/contest/361/problem/C这道题倒着一次,然后正着一次,在正着的一次的时候判断合不合法就可以。 1 #include 2 #include 3 #include 4 using namespace std; 5 const int i...
阅读全文
posted @ 2014-08-28 19:27 null1019
阅读(218)
评论(0)
推荐(0)
2014年8月27日
cf B. Levko and Permutation
摘要: http://codeforces.com/contest/361/problem/B 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int n,k; 7 8 int main() 9 {10 while(s...
阅读全文
posted @ 2014-08-27 20:57 null1019
阅读(151)
评论(0)
推荐(0)
cf E. Neatness
摘要: http://codeforces.com/contest/359/problem/E题意:要关掉所有房间的灯,一个步骤要么开灯,要么关灯,要么向有灯的方向前进一格。输出一种关掉所有灯的方案。不能关掉所有灯输出NO往前搜索时点灯,后退时关灯。 1 #include 2 #include 3 #i...
阅读全文
posted @ 2014-08-27 16:56 null1019
阅读(170)
评论(0)
推荐(0)
cf D. Pair of Numbers
摘要: http://codeforces.com/contest/359/problem/D题意:给你n个数,然后找出在[l,r]中有一个数a[j],l 2 #include 3 #include 4 #define maxn 300100 5 using namespace std; 6 7 in...
阅读全文
posted @ 2014-08-27 09:23 null1019
阅读(155)
评论(0)
推荐(0)
2014年8月26日
cf C. Prime Number
摘要: http://codeforces.com/contest/359/problem/C先求出分子的公因子,然后根据分子上会除以公因子会长生1,然后记录1的个数就可以。 1 #include 2 #include 3 #include 4 #define maxn 200000 5 #defin...
阅读全文
posted @ 2014-08-26 21:27 null1019
阅读(129)
评论(0)
推荐(0)
cf B. Permutation
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int a[100010]; 7 int main() 8 { 9 int n,k;10 scanf("%d%d",&n,&k);11 for(i...
阅读全文
posted @ 2014-08-26 18:07 null1019
阅读(130)
评论(0)
推荐(0)
cf D. Dima and Hares
摘要: http://codeforces.com/contest/358/problem/D题意:ai代表相邻的两个野兔都没有吃食物情况下的快乐系数,bi代表的是在相邻的两个野兔中有一个吃到食物的快乐系数,ci代表的是相邻的两个野兔都迟到事物的快乐系数,给你n个野兔的快乐系数,求最大快乐系数。dp[i][...
阅读全文
posted @ 2014-08-26 15:10 null1019
阅读(143)
评论(0)
推荐(0)
cf C. Dima and Containers
摘要: http://codeforces.com/contest/358/problem/C将最大的放在stack里面,第二大的放在queue中,第三大的放在deck里面。然后模拟就可以了。 1 #include 2 #include 3 #include 4 #include 5 using n...
阅读全文
posted @ 2014-08-26 09:50 null1019
阅读(314)
评论(0)
推荐(0)
2014年8月25日
cf B. Dima and Text Messages
摘要: http://codeforces.com/contest/358/problem/B先按照题意说的构造一个字符串s,然后与对比的字符串T比较,看看在字符串T中顺序查找有没有字符串S的所有字符,有输出yes,否则输出no. 1 #include 2 #include 3 #include 4 ...
阅读全文
posted @ 2014-08-25 20:03 null1019
阅读(132)
评论(0)
推荐(0)
cf D. Xenia and Hamming
摘要: http://codeforces.com/contest/357/problem/D题意:给你两个数n和m,表示两个字符串的循环次数,然后给出两个字符串,求出其相同位置字符不同的个数。先求出两个字符串长度的最大公约数和最小公倍数,然后求出在最小公倍数范围内的不同字符的个数,后面的和前面的一样,最终...
阅读全文
posted @ 2014-08-25 18:13 null1019
阅读(119)
评论(0)
推荐(0)
上一页
1
···
16
17
18
19
20
21
22
23
24
···
52
下一页
公告