随笔分类 -  刷题笔记: CF

上一页 1 ··· 4 5 6 7 8
摘要:A new e-mail service "Berlandesk" is going to be opened in Berland in the near future. The site administration wants to launch their project as soon a 阅读全文
posted @ 2020-07-22 15:13 RioTian 阅读(194) 评论(2) 推荐(1) 编辑
摘要:Xenia lives in a city that has n houses built along the main ringroad. The ringroad houses are numbered 1 through n in the clockwise order. The ringro 阅读全文
posted @ 2020-07-22 14:44 RioTian 阅读(235) 评论(0) 推荐(0) 编辑
摘要:题目链接 Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: After the cutting each r 阅读全文
posted @ 2020-07-21 15:16 RioTian 阅读(251) 评论(0) 推荐(1) 编辑
摘要:Codeforces Round #656 (Div. 3)题解 A.Three Pairwise Maximums 解题思路: 依照题意和样例,三个整数x,y,z必须有两个相同且都比第三个数大。 如果x==y则说明a为最大值,此时需要满足a>=z,如果不满足该条件,则无解,因为z=max(b,c) 阅读全文
posted @ 2020-07-20 16:25 RioTian 阅读(168) 评论(0) 推荐(0) 编辑
摘要:https://codeforces.com/problemset/problem/489/C C. Given Length and Sum of Digits... You have a positive integer m and a non-negative integer s. Your 阅读全文
posted @ 2020-07-17 20:16 RioTian 阅读(206) 评论(0) 推荐(0) 编辑
摘要:A. 每组给一个和个数(),每次操作可以给一个加2,求是否能使n个数相等 4 3 1 1 3 4 1 1 2 1 2 11 11 1 100 YES NO YES YES 直接扫一遍,记录最大值与当前的差是否能被2整除。 #include<bits/stdc++.h> using namespace 阅读全文
posted @ 2020-07-14 21:05 RioTian 阅读(178) 评论(0) 推荐(1) 编辑
摘要:解题思路 题目说的意思是,给一个2n个数的数组,注意n为奇数,将这个数组平均分为2份,假设为c1和c2。 c1和c2是奇数个元素的数组,比如数组[1,2,3],那么中位数就是2。 那么如何求得中位数差值最小的两个数组呢? 对于数组[1, 2, 3, 4, 5, 6],显然只要一个数组的中位数是3,另 阅读全文
posted @ 2020-07-14 20:02 RioTian 阅读(163) 评论(0) 推荐(1) 编辑
摘要:题意:不同奶茶店里同样的奶茶价格不同,问在当天Yuki持有的零钱能在几家店购买 思路:对价格数组排序,先优先判断是否会比较最大值和最小值,然后二分查找 #include<bits/stdc++.h> using namespace std; int main() { int n, q, m, a[1 阅读全文
posted @ 2020-07-14 19:14 RioTian 阅读(156) 评论(0) 推荐(0) 编辑
摘要:A Ministry for Defense sent a general to inspect the Super Secret Military Squad under the command of the Colonel SuperDuper. Having learned the news, 阅读全文
posted @ 2020-06-30 21:22 RioTian 阅读(163) 评论(0) 推荐(0) 编辑
摘要:记第一场CF赛,完成3道题 代码更新(降低时间复杂度和修改写法):21.1.23 A题 Required Remainder 题意:给你 x、y、n 求最大的k (k<=n) 使得k%x==y **做法:模拟 ** 寻找最大整除数,一开始while循环找,直接TLE2 #include<bits/s 阅读全文
posted @ 2020-06-29 20:32 RioTian 阅读(225) 评论(0) 推荐(1) 编辑
摘要:https://codeforces.com/contest/1360/problem/C We call two numbers xx and yy similar if they have the same parity (the same remainder when divided by 2 阅读全文
posted @ 2020-06-28 22:11 RioTian 阅读(417) 评论(0) 推荐(1) 编辑
摘要:7 4 2 4 1 4 3 4 统计技能种类数量 4种不同技能 统计同一技能最大数量 技能1(数量1) 技能2(数量1) 技能3(数量1) 技能4(数量4) 选出 技能4(数量4) 作为 第2组 扣除技能4,还有4-1=3种不同技能 作为 第1组 发现,第2组数量4,第1组数量3 输出结果为3 5 阅读全文
posted @ 2020-06-28 21:39 RioTian 阅读(154) 评论(0) 推荐(1) 编辑
摘要:There is a game called "I Wanna Be the Guy", consisting of n levels. Little X and his friend Little Y are addicted to the game. Each of them wants to 阅读全文
posted @ 2020-06-27 21:32 RioTian 阅读(456) 评论(0) 推荐(1) 编辑
摘要:Vasya works as a DJ in the best Berland nightclub, and he often uses dubstep music in his performance. Recently, he has decided to take a couple of ol 阅读全文
posted @ 2020-06-24 22:58 RioTian 阅读(190) 评论(0) 推荐(0) 编辑
摘要:The end of the school year is near and Ms. Manana, the teacher, will soon have to say goodbye to a yet another class. She decided to prepare a goodbye 阅读全文
posted @ 2020-06-23 20:24 RioTian 阅读(168) 评论(0) 推荐(0) 编辑
摘要:Being a nonconformist, Volodya is displeased with the current state of things, particularly with the order of natural numbers (natural number is posit 阅读全文
posted @ 2020-06-23 20:06 RioTian 阅读(455) 评论(0) 推荐(0) 编辑
摘要:原题链接 ╮(╯▽╰)╭这题题目一开始没看明白,导致wa几次。如果全是大写或者出了首字母是小写其他为大写,则转换为第一个字母大写,其他的小写 ,如果不是以上两种情况则不作处理。 ╮(╯▽╰)╭水题还错。 #include<bits/stdc++.h> using namespace std; int 阅读全文
posted @ 2020-06-19 11:42 RioTian 阅读(145) 评论(0) 推荐(0) 编辑
摘要:1. 4A.Watermelon **题目链接:**https // s.com/problemset/problem/4/A **题意:**两人分瓜,但每一部分都得是偶数 **分析:**直接 对2取余,且 w != 2 #include<bits/stdc++.h> using namespace 阅读全文
posted @ 2020-06-05 19:53 RioTian 阅读(238) 评论(0) 推荐(0) 编辑
摘要:A. Watermelon time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output One hot summer day Pete and 阅读全文
posted @ 2020-01-14 15:43 RioTian 阅读(420) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8
点击右上角即可分享
微信分享提示