题目链接:http://codeforces.com/problemset/problem/1157/A 题目 Let's denote a function f(x) in such a way: we add 1 to x , then, while there is at least one Read More
posted @ 2019-07-26 19:06 小小笼包包 Views(240) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/1183/F 题目 One important contest will take place on the most famous programming platform (Topforces) very Read More
posted @ 2019-07-26 11:48 小小笼包包 Views(129) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/1183/D 思路: 这个题真是折磨死我了,我一开始用的方法是先用a数组存储数值出现的次数,然后再用b数组记录出现该次数的次数,下表即次数,值即次数的次数,然后从后往前遍历,如果次数的次数大于1,就加到前面, Read More
posted @ 2019-07-25 15:32 小小笼包包 Views(257) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/1183/C 思路 这个题就是尽量玩a类型,就是求如果能玩这个游戏,玩a多少次,一开始我是从最大的值到0遍历,发现超时,然后我就用二分法求,二分果然快。 AC代码 Read More
posted @ 2019-07-25 15:22 小小笼包包 Views(114) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/1183/B 思路 其实b就是序列的最小值加上k,如果这个和与序列的每一个值的差的绝对值小于k,就输出b,否则输出-1. AC代码 Read More
posted @ 2019-07-25 15:19 小小笼包包 Views(100) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/1183/A 思路 其实就是模拟,就是求输入的数值中每一位相加的和能否被4整除,就是将每一位的数值放入数组中,相加求和,不能被整除就加1,要注意进位。 AC代码 Read More
posted @ 2019-07-25 15:15 小小笼包包 Views(179) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/1152/B 思路 这个一开始我觉得看起好像挺难的,但是我就想试一试嘛,然后我就模拟了一下这个过程,就是这输入的数据变成二进制,让该数从第一个1开始往后都变成1,然后异或就是将二进制数中的0变成1,1变成0。 Read More
posted @ 2019-07-25 15:11 小小笼包包 Views(155) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/1141/C 题目 An array of integers p1,p2,…,pn is called a permutation if it contains each number from 1 to n Read More
posted @ 2019-07-25 14:58 小小笼包包 Views(113) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/1141/E 题目 A superhero fights with a monster. The battle consists of rounds, each of which lasts exactly Read More
posted @ 2019-07-25 14:49 小小笼包包 Views(97) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/1138/A 题目 Arkady invited Anna for a dinner to a sushi restaurant. The restaurant is a bit unusual: it of Read More
posted @ 2019-07-25 14:20 小小笼包包 Views(167) Comments(0) Diggs(0)