随笔分类 -  CF

摘要:http://codeforces.com/problemset/problem/848/A 题目大意:刚开始集合里面都是单字符可认为是字符串,然后让你去合并任意两个串合并要消耗∑c=(a~z) f ( s , c ) * f ( t , c ) 的能量,其中 f ( s , c )表示字符串s中单 阅读全文
posted @ 2017-09-04 17:05 Wally的博客 阅读(227) 评论(0) 推荐(0)
摘要:To stay woke and attentive during classes, Karen needs some coffee! Karen, a coffee aficionado, wants to know the optimal temperature for brewing the 阅读全文
posted @ 2017-08-26 21:08 Wally的博客 阅读(215) 评论(0) 推荐(0)
摘要:You are given a sequence a1, a2, ..., an consisting of different integers. It is required to split this sequence into the maximum number of subsequenc 阅读全文
posted @ 2017-08-25 20:14 Wally的博客 阅读(359) 评论(0) 推荐(0)
摘要:Slastyona and her loyal dog Pushok are playing a meaningless game that is indeed very interesting. The game consists of multiple rounds. Its rules are 阅读全文
posted @ 2017-08-01 11:01 Wally的博客 阅读(306) 评论(0) 推荐(0)
摘要:D. The Bakery time limit per test 2.5 seconds memory limit per test 256 megabytes input standard input output standard output Some time ago Slastyona 阅读全文
posted @ 2017-08-01 10:47 Wally的博客 阅读(475) 评论(0) 推荐(0)
摘要:Although Inzane successfully found his beloved bone, Zane, his owner, has yet to return. To search for Zane, he would need a lot of money, of which he 阅读全文
posted @ 2017-05-03 14:47 Wally的博客 阅读(298) 评论(0) 推荐(0)
摘要:https://vjudge.net/contest/160830#problem/I 题意:给你一堆不同颜色的不同长度的棍,问你是否这些棍是否能够组成三角形且所有三角形的每个边的颜色都不相同。 思路:在添加三角形的边时,如果颜色相同就取最大的边,如果找的了三条边,就去比较第一以及第三条边和是否能够 阅读全文
posted @ 2017-04-29 14:55 Wally的博客 阅读(199) 评论(0) 推荐(0)
摘要:https://vjudge.net/contest/160830#problem/B 题意:给你n个参赛团队,m个问题,每个问题要r分钟,比赛的总时间是t,总的团队数量k。输出要解决的问题数量以及花费的总时间,然后输出解决问题的人和解决的问题号以及解决问题的开始时间。 1 #include <io 阅读全文
posted @ 2017-04-29 14:38 Wally的博客 阅读(206) 评论(0) 推荐(0)
摘要:Sasha and Kolya decided to get drunk with Coke, again. This time they have k types of Coke. i-th type is characterised by its carbon dioxide concentra 阅读全文
posted @ 2017-04-09 21:10 Wally的博客 阅读(265) 评论(0) 推荐(0)
摘要:Something happened in Uzhlyandia again... There are riots on the streets... Famous Uzhlyandian superheroes Shean the Sheep and Stas the Giraffe were c 阅读全文
posted @ 2017-04-09 19:57 Wally的博客 阅读(235) 评论(0) 推荐(0)
摘要:Anton likes permutations, especially he likes to permute their elements. Note that a permutation of n elements is a sequence of numbers {a1, a2, ...,  阅读全文
posted @ 2017-04-03 18:00 Wally的博客 阅读(263) 评论(0) 推荐(0)
摘要:As you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Bracketology lessons students usuall 阅读全文
posted @ 2017-04-03 15:16 Wally的博客 阅读(161) 评论(0) 推荐(1)
摘要:C. Anton and Fairy Tale time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Anton likes to li 阅读全文
posted @ 2017-03-30 17:20 Wally的博客 阅读(132) 评论(0) 推荐(0)
摘要:http://codeforces.com/contest/785/problem/A 一个简单的加法题,但是当你是用的是cin输入时时间是483ms而scanf时间被压缩到62ms cin版 scanf版 阅读全文
posted @ 2017-03-26 20:48 Wally的博客 阅读(483) 评论(0) 推荐(0)
摘要:Little Nastya has a hobby, she likes to remove some letters from word, to obtain another word. But it turns out to be pretty hard for her, because she 阅读全文
posted @ 2017-03-06 20:35 Wally的博客 阅读(246) 评论(0) 推荐(0)
摘要:There are n employees in Alternative Cake Manufacturing (ACM). They are now voting on some very important question and the leading world media are try 阅读全文
posted @ 2016-12-22 20:32 Wally的博客 阅读(211) 评论(0) 推荐(0)
摘要:题目链接: http://codeforces.com/contest/732/problem/D 题意:给出n,m然后给出n天的计划(第i天考试考试科目)再给出m个数表示第i个的预习时间,问多少天能把所有的科目考完?? 思路:用二分法找出天数k然后从第k天往第1天推,如果满足当前所需天数小于k则把 阅读全文
posted @ 2016-10-21 13:12 Wally的博客 阅读(147) 评论(0) 推荐(0)