. A. Adjacent Replacements 执行1e9次命令,输出的最后数组的样子 一个奇数执行两次命令 会变回原来的数字 一个偶数只会执行一次命令 变成比自身小1的数 #include<bits/stdc++.h> #define int long long #define MAX(a,b,c) max(a,max(b,c)) #de…
感觉自己有点强迫症 不都写出来就找理由不写题解 http://codeforces.com/contest/1015 题目链接 A. Points in Segments 题目意思 n个线段 去覆盖1-m 中的点 问你没有覆盖的点的个数和位置 这个数据很小,可以直接暴力查找 思考:如果n<1e6, m<=1e8 呢? #include<bits/stdc++.h> #define int long long #define MAX(a,b,c) max(a,max(b,c)…
A: 题目没读, 啥也不会的室友帮我写的. #include<bits/stdc++.h> using namespace std; #define Fopen freopen("_in.txt","r",stdin); freopen("_out.txt","w",stdout); #define LL long long #define ULL unsigned LL #define fi first #def…
hhhh感觉我真的太久没有接触过OI了 大约是前天听到JK他们约着一起刷codeforces,假期里觉得有些颓废的我忽然也心血来潮来看看题目 今天看codeforces才知道居然有div3了,感觉应该看名字比div2还要简单吧,于是我就做了做....发现确实还蛮简单的hhhh 但是我又突发奇想,干脆更新一篇博客吧,毕竟这也是我少有的能刷完一整套CF的题,那也可以记录一下啦...(虽然div3的题解似乎拿来充当一个题解还是有点水的hhhh) A - Two distinct points 题目大意…
Problem F. Door LockTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100500/attachments Description It was a beautiful night at Yekaterinburg, the sky was crystal clear with no clouds, and the view of the moon and the stars was…
Problem F "Folding" Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100002 Description Bill is trying to compactly represent sequences of capital alphabetic characters from 'A' to 'Z' by folding repeating subsequences insid…
题目链接:http://codeforces.com/contest/818 A. Diplomas and Certificates 题解:水题 #include <iostream> #include <cstring> #include <cmath> using namespace std; typedef long long ll; int main() { ll n , k; cin >> n >> k; ll gg = n / 2;…
Problem F. Fibonacci SystemTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=86821#problem/B Description Little John studies numeral systems. After learning all about fixed-base systems, he became inte…