
ICPC
文章平均质量分 60
别看了我最酷了_
这个作者很懒,什么都没留下…
展开
-
Codeforces Gym 100623B Problem B. Billboard
题目传送门:http://codeforces.com/gym/100623/attachments 题解:这道题吧,队友做的,听他说是线段树基础题... Code: #include using namespace std; #define ls l,mid,rt*2 #define rs mid+1,r,rt*2+1 #define mi (l+r)>>1 const原创 2017-03-31 10:56:54 · 525 阅读 · 0 评论 -
Codeforces Gym 100623K Problem K. Key to Success
题目传送门:http://codeforces.com/gym/100623/attachments 题解:这道题,就相当于给你n个硬币,问你能组成多少钱,我们就从头开始计数,首先必须要有一个1,然后我们就从头开始加,如果sum小于下一个数-1,那么这中间的数就拼不出来了,我们就要放一个sum+1上去,这样一直跑下去,放完为止,看代码吧,很简单 Code: #include原创 2017-03-31 10:53:30 · 555 阅读 · 1 评论 -
Codeforces Gym 100623H Problem H. Holes
题目传送门:http://codeforces.com/gym/100623/attachments 题解:额...这道题不能再简单了...输入1输出0,输入0输出1,输入其他的奇数先来个4,然后/2,输出那么多个8 Code: #include #include using namespace std; int main() { freopen("holes原创 2017-03-31 10:50:13 · 508 阅读 · 0 评论 -
Codeforces Gym 100623E Problem E. Enchanted Mirror
题目传送门:http://codeforces.com/gym/100623/attachments 题解:一道暴力的题...先把第一个字符串换成正确的字符串,如果换不了就直接输出No,刚开始没注意到这里,错了第6组,换的时候第二个字符串也对应交换,然后一个字符串里重复的字母可以互换位置,对应第二个字符串里的位置也可以互换,看一下能不能换成第二个目标字符串 Code: #in原创 2017-03-31 10:47:59 · 549 阅读 · 0 评论 -
Codeforces Gym 100623D Problem D. Deposits
题目传送门:http://codeforces.com/gym/100623/attachments 题解:暴力解决...先把第一组的数数量存起来,然后第二组数开始遍历10^6之内他的整数倍的数,然后把数量加起来,用了个小技巧,就是第二组数里如果找过了直接加,算了一下,总共最多跑10^7次,不会超时 Code: #include #include #include #i原创 2017-03-31 10:44:42 · 588 阅读 · 0 评论 -
Codeforces Gym 100623C Problem C. Class
题目传送门:http://codeforces.com/gym/100623/attachments 思路:一道比较简单的思维题吧,要求任一横行学生和任一纵列学生的最小值最大,如果学生人数大于行数和列数最小值*2-1,就输出行数和列数最小值,否则输出(人数+1)/2,很好理解,剩下的学生随便排就行 Code: #include #include using namesp原创 2017-03-31 10:30:10 · 384 阅读 · 0 评论 -
Codeforces Gym 100623F Problem F. Fenwick Tree
题目传送门:http://codeforces.com/gym/100623/attachments 题解:一个找规律的题,b[2]=a[2]要求a[1]=0,b[4]=a[4]要求a[2]+a[3]=0,b[6]=a[6]要求a[5]=0,b[8]=a[8]要求a[4]+a[6]+a[7]=0,到这里就可以看出来规律了,一个偶数可以对2^n取余为0,则要求他前面的n个数和为0,这个n个原创 2017-03-31 13:55:52 · 508 阅读 · 0 评论 -
Codeforces Gym 100623J Problem J. Just Too Lucky 数位DP
题目传送门:http://codeforces.com/gym/100623/attachments 题解:数位DP经典题目,先暴力一遍,把可能出现的各位数字和都跑一遍,然后就是经典数位DP了,记忆化搜索写完的,详见代码 Code: #include #include #include using namespace std; long long n,dp[15][原创 2017-04-01 10:21:01 · 483 阅读 · 0 评论 -
Codeforces Gym 100623I Problem I. Important Wires
题目传送门:http://codeforces.com/gym/100623/attachments 题解:这道题...说了一大堆没用的....如果你看了题不会做再看代码...你会大喊我去.... Code: #include #include #include using namespace std; int main() { freopen("impor原创 2017-04-01 11:16:37 · 301 阅读 · 0 评论