随笔分类 - online judge Codeforces
摘要:B. Glass Half Spilled There are 𝑛 glasses on the table numbered 1,…,𝑛. The glass 𝑖 can hold up to 𝑎𝑖 units of water, and currently contains 𝑏𝑖
阅读全文
摘要:E. Plan of Lectures Ivan is a programming teacher. During the academic year, he plans to give 𝑛 lectures on 𝑛 different topics. Each topic should be
阅读全文
摘要:E. Water Level In recent years John has very successfully settled at his new job at the office. But John doesn't like to idly sit around while his cod
阅读全文
摘要:D. Cakes for Clones You live on a number line. You are initially (at time moment 𝑡=0) located at point 𝑥=0. There are 𝑛 events of the following typ
阅读全文
摘要:看错题系列 cf622C C2. Skyscrapers (hard version) 看成了 对于所有的i不能满足a[i 1] a[i]&&a[i] using namespace std; const int maxn = 5e5+7; int n,m[maxn]; long long ans,
阅读全文
摘要:F. Coffee Varieties time limit per test1 second memory limit per test256 megabytes This is the easy version of the problem. You can find the hard vers
阅读全文
摘要:E. Prefix Enlightenment time limit per test3 seconds memory limit per test256 megabytes There are n lamps on a line, numbered from 1 to n. Each one ha
阅读全文
摘要:D. Irreducible Anagrams time limit per test2 seconds memory limit per test256 megabytes Let's call two strings s and t anagrams of each other if it is
阅读全文
摘要:C. Mind Control time limit per test1 second memory limit per test256 megabytes You and your n−1 friends have found an array of integers a1,a2,…,an. Yo
阅读全文
摘要:B. Array Sharpening time limit per test1 second memory limit per test256 megabytes You're given an array a1,…,an of n non negative integers. Let's cal
阅读全文
摘要:A. Even But Not Even time limit per test1 second memory limit per test256 megabytes Let's define a number ebne (even but not even) if and only if its
阅读全文
摘要:F. Economic Difficulties An electrical grid in Berland palaces consists of 2 grids: main and reserve. Wires in palaces are made of expensive material,
阅读全文
摘要:E. Editor The development of a text editor is a hard problem. You need to implement an extra module for brackets coloring in text. Your editor consist
阅读全文
摘要:D. Secret Passwords One unknown hacker wants to get the admin's password of AtForces testing system, to get problems from the next contest. To achieve
阅读全文
摘要:C. Everyone is a Winner! On the well known testing system MathForces, a draw of n rating units is arranged. The rating will be distributed according t
阅读全文
摘要:B. PIN Codes A PIN code is a string that consists of exactly 4 digits. Examples of possible PIN codes: 7013, 0000 and 0990. Please note that the PIN c
阅读全文
摘要:A. Sweet Problem the first pile contains only red candies and there are r candies in it, the second pile contains only green candies and there are g c
阅读全文
摘要:F2. Wrong Answer on test 233 (Hard Version) Your program fails again. This time it gets "Wrong answer on test 233" . This is the harder version of the
阅读全文
摘要:E. Arson In Berland Forest The Berland Forest can be represented as an infinite cell plane. Every cell contains a tree. That is, contained before the
阅读全文
摘要:D2. Optimal Subsequences (Hard Version) This is the harder version of the problem. In this version, 1≤n,m≤2⋅105. You can hack this problem if you lock
阅读全文