[codeforces 549]G. Happy Line 试题描述 Do you like summer? Residents of Berland do. They especially love eating ice cream in the hot summer. So this summer day a large queue of n Berland residents lined up in front of the ice cream stall. We know that ea…
看起来非常神,但仅仅有三种情况 -1 , 1 ,2..... A. Cutting Figure time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You've gotten an n × m sheet of squared paper. Some of its squares are painted. Let's mark…
Description Little Petya likes points a lot. Recently his mom has presented him n points lying on the line OX. Now Petya is wondering in how many ways he can choose three distinct points so that the distance between the two farthest of them doesn't e…
A. Cutting Banner Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/538/problem/A Description A large banner with word CODEFORCES was ordered for the 1000-th onsite round of Codeforcesω that takes place on the Miami beach. Un…
A. Cutting Banner time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A large banner with word CODEFORCES was ordered for the 1000-th onsite round of Codeforcesω that takes place on the Mi…
A. Cutting Banner time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output A large banner with word CODEFORCES was ordered for the 1000-th onsite round of Codeforcesω that takes place on the Miami…
A. Cutting Banner time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A large banner with word CODEFORCES was ordered for the 1000-th onsite round of Codeforcesω that takes place on the Miami…
B. Ancient Berland Hieroglyphs 题目连接: http://codeforces.com/problemset/problem/164/B Descriptionww.co Polycarpus enjoys studying Berland hieroglyphs. Once Polycarp got hold of two ancient Berland pictures, on each of which was drawn a circle of hierog…
D. Super M Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/592/problem/D Description Ari the monster is not an ordinary monster. She is the hidden identity of Super M, the Byteforces’ superhero. Byteforces is a country that…
Time limit 2000 ms Memory limit 262144 kB Source Codeforces Round #328 (Div. 2) Ari the monster is not an ordinary monster. She is the hidden identity of Super M, the Byteforces’ superhero. Byteforces is a country that consists of n cities, connected…
Ari the monster is not an ordinary monster. She is the hidden identity of Super M, the Byteforces’ superhero. Byteforces is a country that consists of n cities, connected by n - 1 bidirectional roads. Every road connects exactly two distinct cities,…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Ari the monster is not an ordinary monster. She is the hidden identity of Super M, the Byteforces' superhero. Byteforces is a country that consi…
yy or Y to copy the line or dd to delete (cutting) the line then p to paste the copied or deleted text after the current line or P to paste the copied or deleted text before the current line…
浅谈从 Lyndon Words 到 Three Squares Lemma By zghtyarecrenj 本文包括:Lyndon Words & Significant Suffixes & Lyndon Array & Runs & Lyndon Tree & Three Squares Lemma. 禁止转载全文,转载部分需要注明出处. 前言 本文正在重写 如果你发现笔者有写错的地方,请联系笔者.(尽量不要用博客园评论,我不会经常看,建议用洛谷私信我或者加…
B - 楼下水题 Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 7C Description A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coo…
A.Warrior and Archer(思维) 战士一定会ban掉当前边缘的位置.而战士和射手就会选择剩下的最远的两点.我们让剩下的最远的两点最近就达到了均衡.于是我们枚举战士ban掉的边缘,ban的次数是一定的. # include <cstdio> # include <cstring> # include <cstdlib> # include <iostream> # include <vector> # include <que…
任意门:http://codeforces.com/contest/1118/problem/F1 F1. Tree Cutting (Easy Version) time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given an undirected tree of nn vertices. Some vert…
任意门:http://codeforces.com/contest/1077/problem/D D. Cutting Out time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given an array ss consisting of nn integers. You have to find any ar…
http://codeforces.com/contest/1077/problem/D You are given an array ss consisting of nn integers. You have to find any array tt of length kk such that you can cut out maximum number of copies of array tt from array ss. Cutting out the copy of tt mean…
[Educational Codeforces Round 16]B. Optimal Point on a Line 试题描述 You are given n points on a line with their coordinates xi. Find the point x so the sum of distances to the given points is minimal. 输入 The first line contains integer n (1 ≤ n ≤ 3·105)…