
Codeforces
文章平均质量分 80
普通网友
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #257 (Div. 2)
#include#include#include#include#include#includeusing namespace std;int main(){ int n,m,s[109],i,sum; while(scanf("%d%d",&n,&m)==2) { int max=0; for(i=1;i<=n;i++)原创 2014-10-04 18:18:05 · 437 阅读 · 0 评论 -
Codeforces Round #270
A :一个签到的题目,题意懂了记原创 2014-10-03 19:48:03 · 318 阅读 · 0 评论 -
Codeforces Round #271 (Div. 2)
A :简单的题目,看过刘汝佳书的就可以简单地做了。#include#include#include#includeusing namespace std;char *s = "qwertyuiopasdfghjkl;zxcvbnm,./";int main(){ char d; int c,i; scanf("%c",&d); getchar();原创 2014-10-08 20:59:03 · 387 阅读 · 0 评论 -
Codeforces Round #273 (Div. 2)
A - Initial Bet,A原创 2014-10-28 20:06:03 · 411 阅读 · 0 评论 -
Codeforces Round #292 (Div. 2)
A:简单判断,首先得到最短到达Varda's home的步数s,如果step大于最短的s是偶数步则证明可以返回(Yes),否则(No)。B:题目意思好判断,根据sample就可以得出,由于所给数据非常小,则直接可以暴力解决。C:2->23->3 4->3225->5 6->537->7 8->72229->7332得到这些,则可以直接在最后进行排序得出。515A -原创 2015-02-18 10:48:10 · 370 阅读 · 0 评论 -
C. New Year Ratings Change
理解题意是关键。。。。思路:1、先把A数列排序,用pair或struct,记录好数值和下标的对应关系;2、然后把A数列最小的值开始填到B数列,第一个最小的值直接填到B就可以了;3、然后把A数列当前的值和上一个填写值比较,填写较大值到B数列中;4、利用已经记录好的下标就可以快速定位需要填写在B数列中的那个位置了。#include #includeusing namespace原创 2015-01-23 16:16:19 · 638 阅读 · 0 评论 -
2A - Winner
题意根据sample就可以看出来。。。。。最主要是可以学会map。。。。。。#include #include#include#include#includeusing namespace std;mapf,g;//map的用法string s[1000];int c[1000],i,m=0;int main(){ int n; cin>>n;原创 2015-01-23 17:10:23 · 457 阅读 · 0 评论 -
538A - Cutting Banner
切一段看是否可以组成"CODEFORCES",一个sunstr函数的应用。。。#include#include#include#include#includeusing namespace std;int main(){ string s; while(cin>>s) { int str=s.length(); for(int原创 2015-05-20 00:21:45 · 591 阅读 · 0 评论 -
codeforces377B Modulo Sum(抽屉+dp)
You are given a sequence of numbers a1, a2, ..., an, and a number m.Check if it is possible to choose a non-empty subsequence aij such that the sum of numbers in this subsequence is divisible by m原创 2015-10-22 22:30:24 · 844 阅读 · 0 评论