随笔分类 -  Coder Forces

Codeforces Round #298 (Div. 2)
摘要:前几天的比赛,很久没做题了,加上前几题数学成分重,只过了一题,简单写下。A. Exam 构造数列,满足相邻两个数之差大于1。比较容易得出的结论是,个数比较大的时候,是完全可以奇偶分开 e.g: 1 3 5 7 9 2 4 6 8 这样是没有问题的,需要考虑个数少的时候情况特殊,1~4分开列... 阅读全文
posted @ 2015-04-16 02:01 Gemmeg 阅读(186) 评论(0) 推荐(0)
Codeforces Round #282 (Div. 2)
摘要:也是几百年没做CF咯,这场还是赛后做的,退化很多啦A.Digital Counter找规律 可能有火柴棍丢失,问你可能组成的数字有多少种,只需要肉眼看看每个数字填上火柴棍可能形成的数字,打个表就行了#include #include using namespace std;const int pos... 阅读全文
posted @ 2014-12-18 00:14 Gemmeg 阅读(203) 评论(0) 推荐(0)
Codeforces Round #265 (Div. 2)
摘要:A.inc ARG 感觉题意不是很清楚,看样例才看懂,就是一串二进制数,左边是低位,就扫一遍记录下改变的bit数#include #include #include using namespace std;const int maxn = 200;int n, cnt;char lis[maxn]... 阅读全文
posted @ 2014-09-11 16:27 Gemmeg 阅读(265) 评论(0) 推荐(0)
Codeforces Round #258
摘要:A.Game With Sticks 就发现选定一个点之后,会删除相应的行列,即n-1,m-1,所以只需要看min(n,m)是基是偶#include #include #include using namespace std;int n, m;int main(){#ifdef LOCAL ... 阅读全文
posted @ 2014-07-26 10:52 Gemmeg 阅读(147) 评论(0) 推荐(0)
Codeforces Round #257 (Div. 2)
摘要:A.Jzzhu and Children 计算每个人会出现的轮次数,取最后一个且轮次数最大的,注意是用a[i]-1 % m,倒着扫一遍就行了#include #include #include using namespace std;const int maxn = 100+10;int n, m... 阅读全文
posted @ 2014-07-25 14:34 Gemmeg 阅读(172) 评论(0) 推荐(0)
Codeforces Round #FF
摘要:A.DZY Loves Hash hash函数 h(x) = x % p 输出第一次冲突的位置#include#include#includeusing namespace std;const int maxn = 4000;int p, n;bool inhash[maxn];int ma... 阅读全文
posted @ 2014-07-18 22:38 Gemmeg 阅读(183) 评论(0) 推荐(0)