05 2017 档案

摘要:E :Partial Sum 每次取任意两个不同的前缀,取过之后不能再取,最多取M次 将前缀和排序,优先取最大,最小就行了 #include<bits/stdc++.h> using namespace std; #pragma comment(linker, "/STACK:102400000,1 阅读全文
posted @ 2017-05-15 21:28 meekyan 阅读(328) 评论(0) 推荐(1)
摘要:F. Leha and security system Bankopolis, the city you already know, finally got a new bank opened! Unfortunately, its security system is not yet workin 阅读全文
posted @ 2017-05-14 14:03 meekyan 阅读(527) 评论(0) 推荐(0)
摘要:B. 分词 B. 分词 有一句句子因为粘贴的时候出现了一点问题空格全部丢失了。现在给一本字典,每个词都对应这个词出现的频率(每十亿)。根据这个频率,我们可以根据下面的公式算出这个词带来的收益 P(word): P(word)=len2(word)⋅ln(frequency(word)) 其中 fre 阅读全文
posted @ 2017-05-13 14:14 meekyan 阅读(367) 评论(0) 推荐(0)
摘要:BZOJ1221:http://www.lydsy.com/JudgeOnline/problem.php?id=1221 trick:将每天用完的,和要用的分来开处理,避免花费的重叠计算,也就是拆点 #include<bits/stdc++.h> using namespace std; #pra 阅读全文
posted @ 2017-05-09 20:03 meekyan 阅读(133) 评论(0) 推荐(0)
摘要:E. Prairie Partition It can be shown that any positive integer x can be uniquely represented as x = 1 + 2 + 4 + ... + 2k - 1 + r, where k and r are in 阅读全文
posted @ 2017-05-08 20:07 meekyan 阅读(426) 评论(0) 推荐(0)