![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
cf
STILLxjy
不要让任何人打乱你生活的节奏
展开
-
(cf 219D Choosing Capital for Treeland) 树型DP + 常规
Choosing Capital for Treelandtime limit per test:3 seconds memory limit per test:256 megabytesThe country Treeland consists of n cities, some pairs of them are connected with unidirectional roads. Ove原创 2017-03-15 22:25:18 · 692 阅读 · 0 评论 -
(Coderforces 1013B)B.And 贪心 + 思维
B. And time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard outputThere is an array with n elements a1, a2, …, an and the number x.In one operation...原创 2018-07-31 17:08:01 · 454 阅读 · 0 评论 -
(Codeforces 873B)B. Balanced Substring [前缀和]+思维
B. Balanced Substring time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a string s consisting only of characters 0 and 1. A sub原创 2017-10-17 10:44:33 · 490 阅读 · 0 评论 -
(Coderforces 875A)A. Classroom Watch 暴力 + 思维
A. Classroom Watchtime limit per test: 1 secondmemory limit per test: 512 megabytesinput: standard inputoutput: standard outputEighth-grader Vova is on duty today in the class. After classes, he we原创 2017-10-17 21:59:51 · 813 阅读 · 0 评论 -
(Coderforces 873C)C. Strange Game On Matrix 贪心+模拟
C. Strange Game On Matrixtime limit per test: 1 secondmemory limit per test: 256 megabytesinput: standard inputoutput: standard outputIvan is playing a strange game.He has a matrix a with n rows an原创 2017-10-17 21:05:43 · 429 阅读 · 0 评论 -
(codeforces 853A)Planning 贪心
A. Planning time limit per test1 second memory limit per test512 megabytes inputstandard input outputstandard output Helen works in Metropolis airport. She is responsible for creating a departure原创 2017-09-08 20:42:27 · 854 阅读 · 0 评论 -
(CF 788)C. The Great Mixing <BFS>
题目链接: http://codeforces.com/problemset/problem/788/CC. The Great Mixingtime limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Sasha and Kolya decid原创 2017-04-05 20:23:22 · 965 阅读 · 0 评论 -
(CF 788) B. Weird journey 欧拉通路 + dfs判断图的连通性
题目链接:http://codeforces.com/problemset/problem/788/BB. Weird journey time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Little boy Igor wants原创 2017-04-05 09:55:03 · 480 阅读 · 0 评论 -
(CF 792E Colored Balls) 思维题 贪心
题目链接: http://codeforces.com/problemset/problem/792/EE. Colored Ballstime limit per test: 1 secondmemory limit per test: 256 megabytesinput: standard inputoutput: standard outputThere are n boxes wi原创 2017-04-03 13:13:38 · 1674 阅读 · 0 评论 -
(CF792 ABCD题解) 模拟,树状数组
A题目链接:http://codeforces.com/problemset/problem/792/A//题意: 给你n个数,问你两个数直接的差值得绝对值最小为多少,及有多少对满足这样的数/分析:排序后直接扫一遍即可//#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include原创 2017-04-02 22:57:20 · 729 阅读 · 0 评论 -
(Coderforces 1015D)D. Walking Between Houses 思维+贪心
题目链接: D. Walking Between Houses 题意: 现在有n个房子排成一列,编号为1~n,起初你在第1个房子里,现在你要进行k次移动,每次移动一都可以从一个房子i移动到另外一个其他的房子j里(i != j),移动的距离为|j - i|。问你进过k次移动后,移动的总和可以刚好是s吗?若可以则输出YES并依次输出每次到达的房子的编号,否则输出NO。分析: 每次至少移动一...原创 2018-08-02 19:19:10 · 575 阅读 · 0 评论