![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CF
文章平均质量分 92
lyhuohuo
这个作者很懒,什么都没留下…
展开
-
CF 792 B. Counting-out Rhyme(水题)
Counting-out Rhymen children are standing in a circle and playing the counting-out game. Children are numbered clockwise from 1 to n. In the beginning, the first child is considered the leader. The gam原创 2017-03-30 16:41:45 · 951 阅读 · 0 评论 -
Codeforce 803E. Roma and Poker(dp)
题意:给你一个n长度的字符串,‘W’和‘L’个数的差值在中途要小于k,且在最后的时候差值正好为k,‘D’表示平局,‘?’表示不确定。问是否存在这样的字符串,存在就输出,不存在就NO。 解法:首先可以用一个dp在确定在这过程能否有这样的情况产生。 用dp[i][j]表示前i个字符‘W’和‘L’相差j个是否存在。那么 如果s[i]=‘W’ dp[i][j]=dp[i-1][j-1]; 如果s[i原创 2017-05-11 21:05:29 · 349 阅读 · 0 评论 -
CF 808E. Selling Souvenirs
E. Selling Souvenirs time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output After several latest reforms many tourists are planning to visit Berl原创 2017-05-25 20:01:02 · 445 阅读 · 0 评论 -
CF 808D D. Array Division(二分)
题目:Vasya has an array a consisting of positive integer numbers. Vasya wants to divide this array into two non-empty consecutive parts (the prefix and the suffix) so that the sum of all elements in the原创 2017-05-18 10:57:24 · 478 阅读 · 0 评论 -
优先队列贪心
最近做了几个用优先队列进行贪心的题目,这里写下来,以免忘了。 1、CF 799 B http://codeforces.com/problemset/problem/799/B 每次选最便宜的衣服,没什么好说的,一发过 代码:#include<iostream>#include<cstring>#include<math.h>#include<cstdio>#include<alg原创 2017-05-18 11:22:21 · 324 阅读 · 0 评论 -
CF 803 F. Coprime Subsequences(数论题,莫比乌斯,容斥原理)
题目:Let’s call a non-empty sequence of positive integers a1, a2… ak coprime if the greatest common divisor of all elements of this sequence is equal to 1.Given an array a consisting of n positive intege原创 2017-05-20 16:56:42 · 452 阅读 · 0 评论 -
CF Round 415 Div.2解题报告
由于是晚上2点的比赛,打了一个小时就撑不住了,溜了。。。只做了3题,下面上题。 题目:A. Straight «A» time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Noora is a student of one famou原创 2017-05-21 15:00:29 · 441 阅读 · 0 评论