随笔分类 - 其他 水题
摘要: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
阅读全文
摘要: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
阅读全文
摘要:A. Math Problem Your math teacher gave you the following problem: There are n segments on the x axis, [l1;r1],[l2;r2],…,[ln;rn]. The segment [l;r] inc
阅读全文
摘要:C. Dominated Subarray Let's call an array 𝑡 dominated by value 𝑣 in the next situation. At first, array 𝑡 should have at least 2 elements. Now, let
阅读全文
摘要:B. Magic Stick Recently Petya walked in the forest and found a magic stick. Since Petya really likes numbers, the first thing he learned was spells fo
阅读全文
摘要:A. Two Rival Students There are 𝑛 students in the row. And there are two rivalling students among them. The first one is in position 𝑎, the second i
阅读全文
摘要:B. Grow The Tree Gardener Alexey teaches competitive programming to high school students. To congratulate Alexey on the Teacher's Day, the students ha
阅读全文
摘要:A. Integer Points DLS and JLS are bored with a Math lesson. In order to entertain themselves, DLS took a sheet of paper and drew 𝑛 distinct lines, gi
阅读全文
摘要:B1. Character Swap (Easy Version) This problem is different from the hard version. In this version Ujan makes exactly one exchange. You can hack this
阅读全文
摘要:A. Maximum Square Ujan decided to make a new wooden roof for the house. He has 𝑛 rectangular planks numbered from 1 to 𝑛. The 𝑖 th plank has size �
阅读全文
摘要:A. Payment Without Change You have a coins of value n and b coins of value 1. You always pay in exact change, so you want to know if there exist such
阅读全文
摘要:B2. TV Subscriptions (Hard Version) The only difference between easy and hard versions is constraints. The BerTV channel every day broadcasts one epis
阅读全文
摘要:A. Forgetting Things Kolya is very absent minded. Today his math teacher asked him to solve a simple problem with the equation 𝑎+1=𝑏 with positive i
阅读全文
摘要:B. Tokitsukaze and Mahjong time limit per test1 second memory limit per test256 megabytes Tokitsukaze is playing a game derivated from Japanese mahjon
阅读全文
摘要:D2. RGB Substring (hard version) inputstandard input outputstandard output The only difference between easy and hard versions is the size of the input
阅读全文
摘要:C. Array Splitting You are given a sorted array 𝑎1,𝑎2,…,𝑎𝑛 (for each index 𝑖 1 condition 𝑎𝑖≥𝑎𝑖−1 holds) and an integer 𝑘. You are asked to d
阅读全文
摘要:B. Bear and Friendship Condition 题目连接: http://codeforces.com/contest/791/problem/B Description Bear Limak examines a social network. Its main function
阅读全文
摘要:B. Anton and Classes 题目连接: http://codeforces.com/contest/785/problem/B Description Anton likes to play chess. Also he likes to do programming. No wond
阅读全文