Codeforces Round 569 (Div. 1)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1179 Codeforces Round 569 (Div. 1) FINISHED False 7200 176302487 June 21, 2019, 5:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10786 ) A Valeriy and Deque PROGRAMMING data structures implementation 1500

B"Recently, on the course of algorithms and data structures, Valeriy learned how to use a deque. He built a deque filled with n elements. The i -th element is a_i ( i = 1, 2, ldots, n ). He gradually takes the first two leftmost elements from the deque (let's call them A and B , respectively), and then does the following: if A > B , he writes A to the beginning and writes B to the end of the deque, otherwise, he writes to the beginning B , and A writes to the end of the deque. We call this sequence of actions an operation. For example, if deque was [2, 3, 4, 5, 1] , on the operation he will write B=3 to the beginning and A=2 to the end, so he will get [3, 4, 5, 1, 2] . The teacher of the course, seeing Valeriy, who was passionate about his work, approached him and gave him q queries. Each query consists of the singular number m_j (j = 1, 2, ldots, q) . It is required for each query to answer which two elements he will pull out on the m_j -th operation. Note that the queries are independent and for each query the numbers A and B should be printed in the order in which they will be pulled out of the deque. Deque is a data structure representing a list of elements where insertion of new elements or deletion of existing elements can be made from both sides. The first line contains two integers n and q ( 2 <= q n <= q 10^5 , 0 <= q q <= q 3 cdot 10^5 ) -- the number of elements in the deque and the number of queries. The second line contains n integers a_1 , a_2 , ..., a_n , where a_i (0 <= q a_i <= q 10^9) -- the deque element in i -th position. The next q lines contain one number each, meaning m_j ( 1 <= q m_j <= q 10^{18} ). For each teacher's query, output two numbers A and B -- the numbers that Valeriy pulls out of the deque for the m_j -t"...

Tutorials

Editorial of Round #569

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58241683 201816070427 A Aug. 4, 2019, 1:48 a.m. OK GNU C11 TESTS 79 2214 48128000 1500
55999487 chenyewei_1234 A June 24, 2019, 12:19 p.m. OK GNU C++11 TESTS 79 93 3891200 1500
55876502 1919810 A June 21, 2019, 5:10 p.m. OK GNU C++11 TESTS 79 108 2560000 1500
59267138 luogu_bot1 A Aug. 22, 2019, 11:16 a.m. OK GNU C++11 TESTS 79 109 1638400 1500
55878009 Umi A June 21, 2019, 5:13 p.m. OK GNU C++11 TESTS 79 109 2560000 1500
59259466 C20200904 A Aug. 22, 2019, 7:59 a.m. OK GNU C++11 TESTS 79 109 2662400 1500
55954705 LJC00118 A June 23, 2019, 6:10 a.m. OK GNU C++11 TESTS 79 124 1638400 1500
55878207 LJC00118 A June 21, 2019, 5:13 p.m. OK GNU C++11 TESTS 79 140 1638400 1500
59259436 OIERS A Aug. 22, 2019, 7:58 a.m. OK GNU C++11 TESTS 79 140 5120000 1500
59443337 luogu_bot3 A Aug. 25, 2019, 12:13 p.m. OK GNU C++11 TESTS 79 171 4096000 1500
65710539 huanggs A Nov. 25, 2019, 2:12 p.m. OK GNU C++11 TESTS 79 171 7782400 1500
55880459 wleung_bvg A June 21, 2019, 5:20 p.m. OK GNU C++14 TESTS 79 109 3993600 1500
56250680 tokitsukaze A June 29, 2019, 2:50 a.m. OK GNU C++14 TESTS 79 171 4915200 1500
55879147 Linkus A June 21, 2019, 5:16 p.m. OK GNU C++14 TESTS 79 233 7782400 1500
56132009 shreyadubey070 A June 26, 2019, 7:15 p.m. OK GNU C++14 TESTS 79 265 1843200 1500
58503764 efimmanevich A Aug. 9, 2019, 3:28 p.m. OK GNU C++14 TESTS 79 280 1126400 1500
55967816 hubz A June 23, 2019, 1:06 p.m. OK GNU C++14 TESTS 79 280 1433600 1500
55910469 cuibst2 A June 22, 2019, 1:25 a.m. OK GNU C++14 TESTS 79 280 1843200 1500
55921873 BinaryBoy A June 22, 2019, 7:46 a.m. OK GNU C++14 TESTS 79 280 1843200 1500
65032013 atodo A Nov. 15, 2019, 10:16 a.m. OK GNU C++14 TESTS 79 280 2252800 1500
55969066 jjjjj19980806 A June 23, 2019, 1:44 p.m. OK GNU C++14 TESTS 79 280 2764800 1500
55910667 whzzt A June 22, 2019, 1:38 a.m. OK GNU C++17 TESTS 79 108 6656000 1500
57467071 lesskreker A July 21, 2019, 4:03 p.m. OK GNU C++17 TESTS 79 124 1433600 1500
56794351 Unsterblicher_Geist A July 10, 2019, 11:56 a.m. OK GNU C++17 TESTS 79 187 4710400 1500
55981207 m1sch3f A June 23, 2019, 9:16 p.m. OK GNU C++17 TESTS 79 249 16998400 1500
64754822 hinkopihpih A Nov. 12, 2019, 4:31 p.m. OK GNU C++17 TESTS 79 280 1228800 1500
61242595 teapotd A Sept. 24, 2019, 8:45 p.m. OK GNU C++17 TESTS 79 280 1433600 1500
55978594 SecondThread A June 23, 2019, 7:10 p.m. OK GNU C++17 TESTS 79 280 2764800 1500
56058334 lavin A June 26, 2019, 2:59 a.m. OK GNU C++17 TESTS 79 280 3174400 1500
55936143 vjudge5 A June 22, 2019, 2:05 p.m. OK GNU C++17 TESTS 79 280 4198400 1500
65797178 kannav.1 A Nov. 27, 2019, 5:29 a.m. OK GNU C++17 TESTS 79 295 1433600 1500
69862989 Hemose A Jan. 30, 2020, 7:13 p.m. OK Java 11 TESTS 79 514 8908800 1500
55931359 icpc_loser A June 22, 2019, 11:39 a.m. OK Java 8 TESTS 79 248 40140800 1500
55953404 prem_cse A June 23, 2019, 5:16 a.m. OK Java 8 TESTS 79 265 0 1500
55878158 Egor A June 21, 2019, 5:13 p.m. OK Java 8 TESTS 79 296 0 1500
55959667 atharvat77 A June 23, 2019, 9 a.m. OK Java 8 TESTS 79 327 1536000 1500
57398520 Tarun A July 20, 2019, 4:11 p.m. OK Java 8 TESTS 79 343 7782400 1500
55879470 StayAwayFromBitches A June 21, 2019, 5:17 p.m. OK Java 8 TESTS 79 358 8294400 1500
56513758 ISSAM_LAKOUAM A July 4, 2019, 11:45 a.m. OK Java 8 TESTS 79 374 3072000 1500
55883552 Azat_Yusupov A June 21, 2019, 5:31 p.m. OK Java 8 TESTS 79 405 0 1500
55877467 Nutella3000 A June 21, 2019, 5:12 p.m. OK Java 8 TESTS 79 405 0 1500
55975223 AkshajK A June 23, 2019, 5:04 p.m. OK Java 8 TESTS 79 405 1945600 1500
56301410 Spheniscine A June 30, 2019, 9:06 a.m. OK Kotlin TESTS 79 872 44236800 1500
55879861 knightL A June 21, 2019, 5:18 p.m. OK Kotlin TESTS 79 873 41779200 1500
59503384 Spheniscine A Aug. 26, 2019, 4:30 a.m. OK Kotlin TESTS 79 920 50995200 1500
59441952 Spheniscine A Aug. 25, 2019, 11:36 a.m. OK Kotlin TESTS 79 935 50790400 1500
59445166 Spheniscine A Aug. 25, 2019, 1:02 p.m. OK Kotlin TESTS 79 935 50995200 1500
55879356 claw88 A June 21, 2019, 5:16 p.m. OK Mono C# TESTS 79 514 23040000 1500
55993436 omikad A June 24, 2019, 8:58 a.m. OK Mono C# TESTS 79 560 45465600 1500
63873492 m1_k3 A Oct. 30, 2019, 6:13 p.m. OK Mono C# TESTS 79 702 90828800 1500
55897721 omikad A June 21, 2019, 6:35 p.m. OK Mono C# TESTS 79 857 45568000 1500
56015247 SpinDOS A June 24, 2019, 8:38 p.m. OK Mono C# TESTS 79 1310 28364800 1500
56015296 SpinDOS A June 24, 2019, 8:41 p.m. OK Mono C# TESTS 79 1341 28364800 1500
63872880 m1_k3 A Oct. 30, 2019, 6:02 p.m. OK Mono C# TESTS 79 1528 14336000 1500
55886215 lxhgww A June 21, 2019, 5:42 p.m. OK MS C++ TESTS 79 265 1638400 1500
57621523 scorpiowf A July 24, 2019, 5:01 a.m. OK MS C++ TESTS 79 265 3686400 1500
64108404 vjudge5 A Nov. 2, 2019, 5:37 p.m. OK MS C++ TESTS 79 280 4812800 1500
55880876 math957963 A June 21, 2019, 5:21 p.m. OK MS C++ TESTS 79 280 5632000 1500
64569069 vjudge4 A Nov. 9, 2019, 8:33 a.m. OK MS C++ TESTS 79 296 8089600 1500
55887785 GGOSinon A June 21, 2019, 5:48 p.m. OK MS C++ TESTS 79 296 9625600 1500
57367360 vjudge4 A July 20, 2019, 9:37 a.m. OK MS C++ TESTS 79 1684 6451200 1500
55941712 NVAL A June 22, 2019, 5:03 p.m. OK MS C++ 2017 TESTS 79 342 12390400 1500
68729980 AleksanderBalobanov A Jan. 13, 2020, 7:35 p.m. OK MS C++ 2017 TESTS 79 343 5734400 1500
57366039 vjudge3 A July 20, 2019, 9:14 a.m. OK MS C++ 2017 TESTS 79 374 5120000 1500
55880872 mandinga A June 21, 2019, 5:21 p.m. OK MS C++ 2017 TESTS 79 623 10035200 1500
55886415 sempav A June 21, 2019, 5:43 p.m. OK MS C++ 2017 TESTS 79 654 3481600 1500
55968968 nik1998 A June 23, 2019, 1:40 p.m. OK MS C++ 2017 TESTS 79 810 5632000 1500
55995139 Pricolno A June 24, 2019, 9:56 a.m. OK MS C++ 2017 TESTS 79 826 3481600 1500
55931466 Timonnable A June 22, 2019, 11:42 a.m. OK MS C++ 2017 TESTS 79 841 10035200 1500
64680222 yuanyuan2048 A Nov. 11, 2019, 9:39 a.m. OK MS C++ 2017 TESTS 79 1762 3584000 1500
56022793 devaar100 A June 25, 2019, 5:03 a.m. OK MS C++ 2017 TESTS 79 1794 1740800 1500
56032466 lostamok A June 25, 2019, 10:19 a.m. OK PHP TESTS 79 2121 41574400 1500
56030296 lostamok A June 25, 2019, 9:10 a.m. OK PHP TESTS 79 3181 41574400 1500
55917229 YESMAths A June 22, 2019, 5:59 a.m. OK PyPy 2 TESTS 79 483 56115200 1500
56288487 vjudge4 A June 29, 2019, 9:37 p.m. OK PyPy 2 TESTS 79 2292 27340800 1500
55888902 algmyr A June 21, 2019, 5:53 p.m. OK PyPy 3 TESTS 79 546 37376000 1500
56807770 orailly A July 10, 2019, 2:37 p.m. OK PyPy 3 TESTS 79 1216 53657600 1500
55880657 Kiri8128 A June 21, 2019, 5:20 p.m. OK PyPy 3 TESTS 79 1575 15872000 1500
55894475 titia A June 21, 2019, 6:18 p.m. OK PyPy 3 TESTS 79 1575 48435200 1500
64129758 Ivan_Tea A Nov. 3, 2019, 6:25 a.m. OK PyPy 3 TESTS 79 4445 17203200 1500
60832757 MotaSanyal A Sept. 19, 2019, 7:40 a.m. OK PyPy 3 TESTS 79 4554 14028800 1500
56396040 _apurv_ A July 1, 2019, 2:39 p.m. OK PyPy 3 TESTS 79 4570 24371200 1500
58464099 frederick99 A Aug. 8, 2019, 6:19 p.m. OK PyPy 3 TESTS 79 4710 14540800 1500
56781005 a00920 A July 10, 2019, 6:15 a.m. OK PyPy 3 TESTS 79 5474 14336000 1500
56308064 Carnivorei A June 30, 2019, 1:06 p.m. OK PyPy 3 TESTS 79 5740 13824000 1500
57543684 Helli.code A July 22, 2019, 4:18 p.m. OK Python 2 TESTS 79 1138 43110400 1500
55881396 nwi A June 21, 2019, 5:23 p.m. OK Python 2 TESTS 79 1357 74854400 1500
56466259 vjudge5 A July 3, 2019, 9:03 a.m. OK Python 2 TESTS 79 1871 6144000 1500
55941350 lokaksha A June 22, 2019, 4:50 p.m. OK Python 2 TESTS 79 1934 11776000 1500
56459889 vjudge5 A July 3, 2019, 6:19 a.m. OK Python 2 TESTS 79 2308 6246400 1500
56459829 quirinoflavio A July 3, 2019, 6:17 a.m. OK Python 2 TESTS 79 2776 6246400 1500
56019158 williamhan A June 25, 2019, 1:15 a.m. OK Python 2 TESTS 79 3322 11980800 1500
56807622 orailly A July 10, 2019, 2:34 p.m. OK Python 3 TESTS 79 561 41984000 1500
56437401 MrEmnE A July 2, 2019, 2:46 p.m. OK Python 3 TESTS 79 2074 24268800 1500
56490672 Vovkaez A July 3, 2019, 9:37 p.m. OK Python 3 TESTS 79 2776 9216000 1500
59690792 tnowakow A Aug. 30, 2019, 5:55 a.m. OK Python 3 TESTS 79 2854 16281600 1500
57722286 alexara1123 A July 25, 2019, 5:57 a.m. OK Python 3 TESTS 79 2901 17612800 1500
65595282 Ivan_Tea A Nov. 23, 2019, 3:38 p.m. OK Python 3 TESTS 79 3587 10956800 1500
56536350 kek A July 5, 2019, 1:16 a.m. OK Python 3 TESTS 79 4477 22528000 1500
56468264 S.H_try A July 3, 2019, 9:51 a.m. OK Python 3 TESTS 79 4991 8908800 1500
56093246 DATELOST A June 26, 2019, 3:05 p.m. OK Python 3 TESTS 79 4992 9113600 1500
55965791 M0nstha A June 23, 2019, 12:02 p.m. OK Python 3 TESTS 79 5225 9216000 1500
56824558 orailly A July 11, 2019, 3:12 a.m. OK Ruby TESTS 79 1294 22118400 1500
56814297 orailly A July 10, 2019, 6:08 p.m. OK Ruby TESTS 79 1325 22937600 1500
56058097 ils.orchid A June 26, 2019, 2:40 a.m. OK Ruby TESTS 79 1372 19865600 1500
56824519 orailly A July 11, 2019, 3:10 a.m. OK Ruby TESTS 79 1481 22118400 1500
55882845 EbTech A June 21, 2019, 5:28 p.m. OK Rust TESTS 79 139 3481600 1500
56056935 delta_4d A June 26, 2019, 1:08 a.m. OK Rust TESTS 79 218 7577600 1500
56056854 delta_4d A June 26, 2019, 1:01 a.m. OK Rust TESTS 79 2932 6451200 1500
56039388 delta_4d A June 25, 2019, 1:36 p.m. OK Rust TESTS 79 3119 7577600 1500

remove filters

Back to search problems