摘要: Right now she actually isn't. But she will be, if you don't solve this problem. You are given integers n, k, A and B. There is a number x, which is in 阅读全文
posted @ 2020-03-08 15:18 DeaL57 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Vasya has a multiset ss consisting of nn integer numbers. Vasya calls some number xx nice if it appears in the multiset exactly once. For example, mul 阅读全文
posted @ 2020-03-07 23:00 DeaL57 阅读(140) 评论(0) 推荐(0) 编辑
摘要: The on-board computer on Polycarp's car measured that the car speed at the beginning of some section of the path equals v1 meters per second, and in t 阅读全文
posted @ 2020-03-07 16:21 DeaL57 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Tanya wants to go on a journey across the cities of Berland. There are nn cities situated along the main railroad line of Berland, and these cities ar 阅读全文
posted @ 2020-03-07 15:31 DeaL57 阅读(202) 评论(0) 推荐(0) 编辑
摘要: This is the easy version of this problem. The only difference is the constraint on kk — the number of gifts in the offer. In this version: k=2k=2. Vas 阅读全文
posted @ 2020-03-07 09:50 DeaL57 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Consider a sequence of digits of length 2k2k [a1,a2,…,a2k][a1,a2,…,a2k]. We perform the following operation with it: replace pairs (a2i+1,a2i+2)(a2i+1 阅读全文
posted @ 2020-03-06 17:33 DeaL57 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <queue> #include <map> #include <sstream> #includ 阅读全文
posted @ 2020-03-04 16:45 DeaL57 阅读(119) 评论(0) 推荐(0) 编辑
摘要: You are given a system of pipes. It consists of two rows, each row consists of nn pipes. The top left pipe has the coordinates (1,1)(1,1) and the bott 阅读全文
posted @ 2020-03-01 17:27 DeaL57 阅读(318) 评论(0) 推荐(0) 编辑
摘要: It is the middle of 2018 and Maria Stepanovna, who lives outside Krasnokamensk (a town in Zabaikalsky region), wants to rent three displays to highlig 阅读全文
posted @ 2020-03-01 17:04 DeaL57 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Constanze is the smartest girl in her village but she has bad eyesight. One day, she was able to invent an incredible machine! When you pronounce lett 阅读全文
posted @ 2020-02-29 18:00 DeaL57 阅读(246) 评论(0) 推荐(0) 编辑