![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
cf水题
@java小白
Software Developer Engineer
展开
-
A. New Year Candles
刷水题了。A. New Year CandlesVasily the Programmer loves romance, so this year he decided to illuminate his room with candles.Vasily has a candles.When Vasily lights up a new candle, it first burns for ...原创 2019-02-01 17:49:11 · 424 阅读 · 0 评论 -
A. Word Capitalization
地址:https://codeforces.com/problemset/problem/281/A题意:第一个字符小写变大写#include<iostream>#include<algorithm>#include<cstring>using namespace std;int main(){ char n[1001]; cin >...原创 2019-03-20 12:11:58 · 427 阅读 · 0 评论 -
B. Discounts
地址:https://codeforces.com/contest/1132/problem/B你来到一家当地的商店,想买一些巧克力棒。商店里有n个巧克力棒,其中i个的价格是ai硬币(你想买所有的巧克力棒)。你有m种优惠券,可以买巧克力棒。第一张优惠券允许你购买气巧克力棒,而你只需要支付最昂贵的气1(所以,这些气棒中最便宜的是免费的)。您只能使用一张优惠券;如果你使用优惠券i,你必须选择气棒...原创 2019-03-16 11:07:22 · 1168 阅读 · 0 评论 -
A. Superhero Transformation
地址:https://codeforces.com/problemset/problem/1111/A一直很少刷字符串的题目,试着做一下。错误代码:#include<iostream>#include<algorithm>#include<cstring>using namespace std;int main(){ long long i...原创 2019-03-17 10:22:15 · 254 阅读 · 0 评论 -
A. Sasha and His Trip
地址:https://codeforces.com/problemset/problem/1113/A题意:就是让车在1号城市加满油,然后每走一个城市加一升油,加到足够开完n个城市就好了。还有要注意下v大于等于n-1的情况。#include <stdlib.h>#include<iostream>using namespace std;int main(){...原创 2019-03-27 10:59:12 · 322 阅读 · 0 评论 -
A. Watermelon
cf地址:https://codeforces.com/contest/4/problem/Atime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputOne hot summer day Pete and his friend Billy dec...原创 2019-04-05 14:57:33 · 308 阅读 · 0 评论 -
16A - Flag
cf题目地址:https://codeforces.com/problemset/problem/16/A题意:每行数字一样,相邻行不一样,则输出YES。AC代码:#include<iostream>#include<cstring>#include<cmath>using namespace std;int main(){ int n,...原创 2019-04-01 11:26:48 · 224 阅读 · 0 评论 -
B. Array Stabilization
cf地址:https://codeforces.com/problemset/problem/1054/B题意:先排序,然后选择去掉第一个还是最后一个(比大小)#include<iostream>#include <algorithm>using namespace std;int main(){ long int n; int i, temp, m1, ...原创 2019-03-28 09:07:29 · 367 阅读 · 0 评论 -
A. IQ test
cf题目地址:https://codeforces.com/problemset/problem/25/AA. IQ testtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob is preparing to pass IQ t...原创 2019-04-02 13:08:11 · 612 阅读 · 0 评论 -
B. Chocolates
cf题目地址:https://codeforces.com/problemset/problem/1139/BYou went to the store, selling n types of chocolates. There are ai chocolates of type i in stock.You have unlimited amount of cash (so you are ...原创 2019-04-16 13:38:02 · 510 阅读 · 0 评论 -
A. Case of the Zeros and Ones
地址:https://codeforces.com/problemset/problem/556/Atime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrewid the Android is a galaxy-famous dete...原创 2019-04-21 11:13:40 · 265 阅读 · 0 评论 -
A. New Year and Hurry
题目地址:http://codeforces.com/contest/750/problem/ALimak is going to participate in a contest on the last day of the 2016. The contest will start at 20:00 and will last four hours, exactly until midnigh...原创 2019-05-27 11:07:32 · 183 阅读 · 0 评论 -
A. Garden
欺负人的水题:http://codeforces.com/problemset/problem/915/A错误代码:#include<iostream>#include<algorithm>using namespace std;int main(){ int n, k, i; int a[101]; cin >> n >> k;...原创 2019-03-11 13:30:34 · 234 阅读 · 0 评论 -
A. Increasing Sequence
水题:https://codeforces.com/problemset/problem/11/A题目大意:如果a[]后面的数比前面的小,就加d,加到比前面的数大为止。#include<iostream>using namespace std;int main(){ long long int i, d, n, t1, sum, a[100001]; cin >...原创 2019-03-19 15:03:21 · 588 阅读 · 0 评论 -
A. Juicer
题目地址:https://codeforces.com/problemset/problem/709/A科亚要做新鲜的橙汁。他有n个大小为a1 a2…an的橘子。科亚会把它们按固定的顺序放入榨汁机,从a1大小的橙子开始,然后是a2大小的橙子,以此类推。要放入榨汁机,橙子的大小必须不超过b,所以如果科里亚看到一个严格意义上更大的橙子,他就把它扔掉,继续下一个。榨汁机有一个专门的区域来收集废物。如...原创 2019-03-10 10:06:42 · 551 阅读 · 0 评论 -
A. Vasya the Hipster
地址:超级水题一天,赶时髦的瓦西娅决定数一数他有多少只袜子。原来他有一只红袜子和两只蓝袜子。根据最新的时尚潮流,潮人应该穿不同颜色的袜子:左脚穿红色的,右脚穿蓝色的。每天早上,Vasya都会穿上新袜子,在睡觉前扔掉,因为他不想洗。瓦西娅想知道,他最多能穿多少天的时装,穿多少天不同的袜子,然后,他能穿多少天相同的袜子,直到他的袜子用完了,或者不能用他现有的袜子做出一双袜子。你能帮助他吗?...原创 2019-02-15 20:39:11 · 211 阅读 · 0 评论 -
A. Snowball
地址: 超级水题今天早上格外下雪。梅沙尼亚决定到外面去,注意到一个巨大的雪球滚下山来!幸运的是,那座山上有两块石头。最初,雪球是在高度h和w。重量每秒钟以下发生的事件序列:斯诺鲍的重量增加了,我,我——是当前高度的雪球,然后雪球击中石头(如果是出席当前高度),然后雪球移动1米。如果雪球的高度为零,它就会停下来。山上正好有两块石头。第一块石头重u1,高d1,第二块石头重u2,高d2。当雪球击...原创 2019-02-15 21:05:23 · 279 阅读 · 0 评论 -
A. Brain's Photos
地址:水题小,但很勇敢,老鼠:大脑不被暑期学校的小坏蛋接受。他很沮丧,决定推迟他的计划来接管世界,而是成为一名摄影师。您可能知道,最酷的照片是在影片上(因为您可以为此类照片指定#film标签)。布莱恩在彩色和黑白胶片上拍了很多彩色照片。然后他开发并翻译成数字形式。但是现在,彩色和黑白照片都在一个文件夹里,要分类它们,一个人需要花一个多小时!只要Brain现在是一个摄影师而不是程序员,他就会...原创 2019-02-16 20:04:41 · 251 阅读 · 0 评论 -
A. Choosing Teams
水题地址萨拉托夫州立大学奥林匹克程序员培训中心(SSU OPTC)有n名学生。对于每个学生,您知道他/她参加ACM ICPC世界编程锦标赛的次数。根据ACM ICPC规则,每人最多可参加5次世锦赛。SSU OPTC的负责人最近正在召集球队参加世界锦标赛。每个团队必须恰好由三个人组成,在这一点上,任何人都不能是两个或两个以上团队的成员。如果头头想让每支球队以相同的成员参加至少k次的世界锦标赛,他...原创 2019-02-17 15:51:40 · 308 阅读 · 0 评论 -
A. Duff and Meat
水题地址达夫对肉上瘾了!马利克想让她开心n天。为了在第一天过得开心,她需要吃整整一公斤的肉。住宅区有一家大商店,马利克想从那里给她买肉。第一天,他们以每公斤几美元的价格卖肉。Malek知道所有的数字a1,…, an和p1,…,pn。在每一天,他可以买任意数量的肉,也可以为将来保留一些肉。马利克煮肉有点累了,所以他请求你的帮助。帮他把他为了让达夫开心n天而花的钱减到最少。输入输入的第一行包...原创 2019-02-24 09:49:28 · 147 阅读 · 0 评论 -
A. Fake NP
水题地址塔瓦克和赛义德是好朋友。赛义德非常有趣,他告诉塔瓦克解决以下问题,而不是最长的路径。已知l和r,对于从l到r的所有整数,包括,我们写下除1之外的所有整数因子。找出我们写下的最大次数的整数。解决这个问题来证明它不是NP问题。#include<iostream>#include<cstdio>using namespace std;int main()...原创 2019-02-18 22:07:58 · 163 阅读 · 0 评论 -
A. Dragons
水题地址outputstandard输出基里托现在还停留在MMORPG的水平上。为了在游戏中继续前进,他必须打败所有生活在这个级别的n条龙。基里托和龙有力量,力量用一个整数表示。在两个对手之间的决斗中,决斗的结果是由他们的力量决定的。一开始,基里托的力等于s。如果Kirito开始决斗的i(1≤≤n)龙和Kirito的实力并不比龙的力量,然后Kirito失去决斗而死。但是如果基里托的力量大于龙...原创 2019-02-25 11:59:06 · 340 阅读 · 0 评论 -
A. Oath of the Night's Watch
水题地址懒得有道了,直接贴代码得了。#include<iostream>#include<cstring>#include<algorithm>using namespace std;int main(){ long long int a[1000010], n; long long int i, sum=0; cin >> n...原创 2019-02-19 20:55:21 · 160 阅读 · 0 评论 -
A. Holidays
水题地址在火星上,一年正好是n天(火星上没有闰年)。但是火星人和地球人有同样的周数——5个工作日,然后是2天的假期。你的任务是确定火星上每年可能的最小休假天数和最大休假天数。输入输入的第一行包含一个正整数n (1≤n≤1 000 000) - - -一年的天数在火星上。输出打印两个整数——火星上每年可能休假的最小天数和最大天数。所以在火星和地球上生活都没啥区别。。#include&l...原创 2019-02-19 21:24:55 · 248 阅读 · 0 评论 -
A. Contest
cf水题地址:点这里Misha和Vasya参加了一个Codeforces竞赛。不幸的是,他们每个人只解决了一个问题,尽管在第一次尝试时成功提交了它。Misha解决了a分的问题Vasya解决了b分的问题此外,Misha在比赛开始后c分钟提交了问题,Vasya在比赛开始后d分钟交了问题。如您所知,在Codeforces上,问题的成本会随着轮询的继续而降低。也就是说,如果你在比赛开始后的几分钟内提...原创 2019-03-01 13:53:33 · 398 阅读 · 0 评论 -
A. Multiplication Table
地址:cf水题直接看图就开花了#include<iostream>using namespace std;int main(){ long long int n, x; int i, sum = 0; cin >> n >> x; for (i = 1; i <= n; i++) if (x%i == 0 &&...原创 2019-03-06 13:46:24 · 596 阅读 · 0 评论 -
B. A and B and Compilation Errors
题目地址:http://codeforces.com/problemset/problem/519/BA and B are preparing themselves for programming contests.B loves to debug his code. But before he runs the solution and starts debugging, he has t...原创 2019-05-28 13:25:16 · 460 阅读 · 0 评论