04 2017 档案

摘要:https://vjudge.net/contest/160830#problem/I 题意:给你一堆不同颜色的不同长度的棍,问你是否这些棍是否能够组成三角形且所有三角形的每个边的颜色都不相同。 思路:在添加三角形的边时,如果颜色相同就取最大的边,如果找的了三条边,就去比较第一以及第三条边和是否能够 阅读全文
posted @ 2017-04-29 14:55 Wally的博客 阅读(202) 评论(0) 推荐(0)
摘要:https://vjudge.net/contest/160830#problem/B 题意:给你n个参赛团队,m个问题,每个问题要r分钟,比赛的总时间是t,总的团队数量k。输出要解决的问题数量以及花费的总时间,然后输出解决问题的人和解决的问题号以及解决问题的开始时间。 1 #include <io 阅读全文
posted @ 2017-04-29 14:38 Wally的博客 阅读(207) 评论(0) 推荐(0)
摘要:ACM (ACMers' Chatting Messenger) is a famous instant messaging software developed by Marjar Technology Company. To attract more users, Edward, the bos 阅读全文
posted @ 2017-04-22 20:38 Wally的博客 阅读(211) 评论(0) 推荐(0)
摘要:Japari Park is a large zoo home to extant species, endangered species, extinct species, cryptids and some legendary creatures. Due to a mysterious sub 阅读全文
posted @ 2017-04-22 20:26 Wally的博客 阅读(230) 评论(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的博客 阅读(268) 评论(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的博客 阅读(238) 评论(0) 推荐(0)
摘要:http://codeforces.com/gym/100623/attachments A题 题意:有n个球(0~n-1)先放在A个盒子(0~A-1)里面,然后将(0~n-1)放在B个盒子(0~B-1),问abs(A盒子所在位置-B盒子所在位置)的和是多少? 思路:现将小球分成两部分(1.k个A与 阅读全文
posted @ 2017-04-09 19:02 Wally的博客 阅读(151) 评论(0) 推荐(0)
摘要:https://vjudge.net/contest/156696 这是2014年多校5的比赛重新开了一遍 A题 题意:给你长度为n的序列,问让你进行最多k次相邻的数之间交换之后序列的最小逆序数是多少 思路:先求当前数的最小逆序数num,然后num-k即为最后的结果。由于n挺大的直接进行计算的话时间 阅读全文
posted @ 2017-04-04 12:00 Wally的博客 阅读(158) 评论(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的博客 阅读(264) 评论(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的博客 阅读(166) 评论(0) 推荐(1)
摘要:http://codeforces.com/gym/100623/attachments A题 B题 题意:给你一个长度为w有h个单位宽的广告牌,然后给你长度为 wi 的一个单位宽的广告,问第 i 个最低能放在哪个单位上,如果不存在打印-1. 思路:一道线段树的问题,套用线段树模板就能很简单的解答了 阅读全文
posted @ 2017-04-02 19:46 Wally的博客 阅读(210) 评论(0) 推荐(0)