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 |
---|---|---|---|---|---|---|
1407 | Codeforces Round 669 (Div. 2) | FINISHED | False | 7200 | 137777111 | Sept. 8, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 12391 ) | C | Chocolate Bunny | PROGRAMMING | constructive algorithms interactive math two pointers |
B'This is an interactive problem. We hid from you a permutation p of length n , consisting of the elements from 1 to n . You want to guess it. To do that, you can give us 2 different indices i and j , and we will reply with p_{i} bmod p_{j} (remainder of division p_{i} by p_{j} ). We have enough patience to answer at most 2 cdot n queries, so you should fit in this constraint. Can you do it? As a reminder, a permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation ( 2 appears twice in the array) and [1,3,4] is also not a permutation ( n=3 but there is 4 in the array). The only line of the input contains a single integer n ( 1 <= n <= 10^4 ) -- length of the permutation. The interaction starts with reading n . Then you are allowed to make at most 2 cdot n queries in the following way: After each one, you should read an integer k , that equals p_x bmod p_y . When you have guessed the permutation, print a single line "! " (without quotes), followed by array p and quit. After printing a query do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use: Exit immediately after receiving "-1" and you will see Wrong answer verdict. Otherwise you can get an arbitrary verdict because your solution will continue to read from a closed stream. Hack format In the first line output n ( 1 <= n <= 10^4 ). In the second line print the permutation of n integers p_1, p_2, ldots, p_n . '... |
Codeforces Round #669 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
92311075 | Rose_max | C | Sept. 9, 2020, 1:59 a.m. | OK | Clang++17 Diagnostics | TESTS | 35 | 296 | 2150400 | ||
92300424 | samari06 | C | Sept. 8, 2020, 7:51 p.m. | OK | GNU C11 | TESTS | 35 | 249 | 102400 | ||
92288857 | samari06 | C | Sept. 8, 2020, 5:21 p.m. | OK | GNU C11 | TESTS | 35 | 264 | 40755200 | ||
92300702 | samari06 | C | Sept. 8, 2020, 7:56 p.m. | OK | GNU C11 | TESTS | 35 | 311 | 409600 | ||
92311617 | snowpatrol | C | Sept. 9, 2020, 2:18 a.m. | OK | GNU C++11 | TESTS | 35 | 124 | 0 | ||
92283599 | dengsh | C | Sept. 8, 2020, 4:33 p.m. | OK | GNU C++11 | TESTS | 35 | 124 | 102400 | ||
92287449 | Allah_Akba | C | Sept. 8, 2020, 5:11 p.m. | OK | GNU C++11 | TESTS | 35 | 124 | 307200 | ||
92313482 | DDDickWWW | C | Sept. 9, 2020, 3:08 a.m. | OK | GNU C++11 | TESTS | 35 | 124 | 2457600 | ||
92311784 | little_bear_ | C | Sept. 9, 2020, 2:22 a.m. | OK | GNU C++11 | TESTS | 35 | 139 | 0 | ||
92310213 | juruoyhn | C | Sept. 9, 2020, 1:27 a.m. | OK | GNU C++11 | TESTS | 35 | 139 | 0 | ||
92288951 | lemonaaaaa | C | Sept. 8, 2020, 5:22 p.m. | OK | GNU C++11 | TESTS | 35 | 139 | 1228800 | ||
92318051 | cy90 | C | Sept. 9, 2020, 4:44 a.m. | OK | GNU C++11 | TESTS | 35 | 140 | 0 | ||
92315127 | yzl_233 | C | Sept. 9, 2020, 3:45 a.m. | OK | GNU C++11 | TESTS | 35 | 140 | 102400 | ||
92320126 | killerclaws_07 | C | Sept. 9, 2020, 5:20 a.m. | OK | GNU C++11 | TESTS | 35 | 140 | 102400 | ||
92297283 | mesumit | C | Sept. 8, 2020, 7 p.m. | OK | GNU C++14 | TESTS | 35 | 170 | 0 | ||
92285752 | gibberish | C | Sept. 8, 2020, 5:03 p.m. | OK | GNU C++14 | TESTS | 35 | 171 | 102400 | ||
92280364 | t98slider | C | Sept. 8, 2020, 4:27 p.m. | OK | GNU C++14 | TESTS | 35 | 171 | 102400 | ||
92322717 | LincolnYe | C | Sept. 9, 2020, 6:01 a.m. | OK | GNU C++14 | TESTS | 35 | 171 | 409600 | ||
92320304 | thaizhenleng | C | Sept. 9, 2020, 5:23 a.m. | OK | GNU C++14 | TESTS | 35 | 171 | 512000 | ||
92308013 | shivam011 | C | Sept. 8, 2020, 11:53 p.m. | OK | GNU C++14 | TESTS | 35 | 186 | 204800 | ||
92281404 | bitmask_ | C | Sept. 8, 2020, 4:29 p.m. | OK | GNU C++14 | TESTS | 35 | 186 | 716800 | ||
92312644 | kiet8627 | C | Sept. 9, 2020, 2:45 a.m. | OK | GNU C++14 | TESTS | 35 | 186 | 819200 | ||
92322077 | wicher3 | C | Sept. 9, 2020, 5:51 a.m. | OK | GNU C++14 | TESTS | 35 | 186 | 8908800 | ||
92310121 | Strengthen_Lin | C | Sept. 9, 2020, 1:24 a.m. | OK | GNU C++14 | TESTS | 35 | 186 | 9216000 | ||
92303298 | shubhamandro | C | Sept. 8, 2020, 8:55 p.m. | OK | GNU C++17 | TESTS | 35 | 155 | 102400 | ||
92289894 | AshwaniSrivastava | C | Sept. 8, 2020, 5:30 p.m. | OK | GNU C++17 | TESTS | 35 | 155 | 307200 | ||
92287278 | RJ_BlackHat | C | Sept. 8, 2020, 5:10 p.m. | OK | GNU C++17 | TESTS | 35 | 156 | 0 | ||
92285552 | DYf3244 | C | Sept. 8, 2020, 5:02 p.m. | OK | GNU C++17 | TESTS | 35 | 170 | 307200 | ||
92315334 | Frank_Chen831X | C | Sept. 9, 2020, 3:49 a.m. | OK | GNU C++17 | TESTS | 35 | 171 | 0 | ||
92288932 | MehulJ | C | Sept. 8, 2020, 5:22 p.m. | OK | GNU C++17 | TESTS | 35 | 171 | 102400 | ||
92306004 | naim6246 | C | Sept. 8, 2020, 10:22 p.m. | OK | GNU C++17 | TESTS | 35 | 171 | 102400 | ||
92297096 | Elisey_Muxin | C | Sept. 8, 2020, 6:57 p.m. | OK | GNU C++17 | TESTS | 35 | 171 | 512000 | ||
92287036 | royal_risi | C | Sept. 8, 2020, 5:09 p.m. | OK | GNU C++17 | TESTS | 35 | 171 | 819200 | ||
92320171 | Twod | C | Sept. 9, 2020, 5:21 a.m. | OK | GNU C++17 | TESTS | 35 | 171 | 819200 | ||
92298315 | bigbrain | C | Sept. 8, 2020, 7:15 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 124 | 409600 | ||
92313155 | dhiraj-01 | C | Sept. 9, 2020, 2:59 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 155 | 102400 | ||
92300055 | KDVinit | C | Sept. 8, 2020, 7:44 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 170 | 204800 | ||
92318520 | kira201 | C | Sept. 9, 2020, 4:53 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 102400 | ||
92321246 | wistful23 | C | Sept. 9, 2020, 5:38 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 102400 | ||
92286188 | vanlaMonarchuwuday | C | Sept. 8, 2020, 5:04 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 102400 | ||
92286070 | FlowerOfSorrow | C | Sept. 8, 2020, 5:04 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 307200 | ||
92294744 | rky673 | C | Sept. 8, 2020, 6:23 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 307200 | ||
92301271 | FominSergey | C | Sept. 8, 2020, 8:07 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 186 | 102400 | ||
92306323 | JaroPaska | C | Sept. 8, 2020, 10:34 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 186 | 102400 | ||
92304550 | skittles1412 | C | Sept. 8, 2020, 9:32 p.m. | OK | Java 11 | TESTS | 35 | 733 | 307200 | ||
92285488 | atishay127 | C | Sept. 8, 2020, 5:02 p.m. | OK | Java 11 | TESTS | 35 | 764 | 0 | ||
92279722 | saikaushik | C | Sept. 8, 2020, 4:26 p.m. | OK | Java 11 | TESTS | 35 | 764 | 0 | ||
92292047 | rushilpaul | C | Sept. 8, 2020, 5:52 p.m. | OK | Java 11 | TESTS | 35 | 795 | 0 | ||
92287229 | cassiopeia_delphinus | C | Sept. 8, 2020, 5:10 p.m. | OK | Java 11 | TESTS | 35 | 842 | 204800 | ||
92295067 | toxic4u | C | Sept. 8, 2020, 6:28 p.m. | OK | Java 11 | TESTS | 35 | 888 | 0 | ||
92314957 | thapliyaladiti215 | C | Sept. 9, 2020, 3:42 a.m. | OK | Java 11 | TESTS | 35 | 904 | 0 | ||
92279781 | b0bl0blaw | C | Sept. 8, 2020, 4:26 p.m. | OK | Java 11 | TESTS | 35 | 919 | 0 | ||
92304498 | skittles1412 | C | Sept. 8, 2020, 9:30 p.m. | OK | Java 11 | TESTS | 35 | 950 | 307200 | ||
92300291 | mphillotry | C | Sept. 8, 2020, 7:48 p.m. | OK | Java 11 | TESTS | 35 | 967 | 0 | ||
92298923 | mwen | C | Sept. 8, 2020, 7:25 p.m. | OK | Java 8 | TESTS | 35 | 764 | 0 | ||
92310304 | AayushICS | C | Sept. 9, 2020, 1:31 a.m. | OK | Java 8 | TESTS | 35 | 795 | 0 | ||
92292859 | desp__beginner | C | Sept. 8, 2020, 6:01 p.m. | OK | Java 8 | TESTS | 35 | 810 | 0 | ||
92319723 | Whiplash99 | C | Sept. 9, 2020, 5:15 a.m. | OK | Java 8 | TESTS | 35 | 811 | 0 | ||
92292905 | poojakandoi06 | C | Sept. 8, 2020, 6:01 p.m. | OK | Java 8 | TESTS | 35 | 811 | 0 | ||
92307207 | aearly | C | Sept. 8, 2020, 11:16 p.m. | OK | Java 8 | TESTS | 35 | 826 | 0 | ||
92293655 | sudhanshu_lucky | C | Sept. 8, 2020, 6:10 p.m. | OK | Java 8 | TESTS | 35 | 826 | 0 | ||
92293767 | sudhanshu_lucky | C | Sept. 8, 2020, 6:11 p.m. | OK | Java 8 | TESTS | 35 | 841 | 0 | ||
92316054 | adarshm_26 | C | Sept. 9, 2020, 4:05 a.m. | OK | Java 8 | TESTS | 35 | 842 | 0 | ||
92319046 | sumitnitesh123 | C | Sept. 9, 2020, 5:03 a.m. | OK | Java 8 | TESTS | 35 | 857 | 0 | ||
92315140 | Tlatoani | C | Sept. 9, 2020, 3:46 a.m. | OK | Kotlin | TESTS | 35 | 420 | 1126400 | ||
92286639 | Tlatoani | C | Sept. 8, 2020, 5:07 p.m. | OK | Kotlin | TESTS | 35 | 452 | 1228800 | ||
92292986 | koper | C | Sept. 8, 2020, 6:02 p.m. | OK | Kotlin | TESTS | 35 | 498 | 1536000 | ||
92317816 | Tlatoani | C | Sept. 9, 2020, 4:39 a.m. | OK | Kotlin | TESTS | 35 | 654 | 1126400 | ||
92317294 | Tlatoani | C | Sept. 9, 2020, 4:29 a.m. | OK | Kotlin | TESTS | 35 | 841 | 1126400 | ||
92314931 | Tlatoani | C | Sept. 9, 2020, 3:41 a.m. | OK | Kotlin | TESTS | 35 | 904 | 1228800 | ||
92285435 | koboshi | C | Sept. 8, 2020, 5:02 p.m. | OK | Kotlin | TESTS | 35 | 904 | 1740800 | ||
92315021 | Tlatoani | C | Sept. 9, 2020, 3:43 a.m. | OK | Kotlin | TESTS | 35 | 920 | 1945600 | ||
92317355 | Tlatoani | C | Sept. 9, 2020, 4:30 a.m. | OK | Kotlin | TESTS | 35 | 936 | 1126400 | ||
92287288 | dundae | C | Sept. 8, 2020, 5:10 p.m. | OK | MS C++ 2017 | TESTS | 35 | 233 | 102400 | ||
92316112 | P___ | C | Sept. 9, 2020, 4:06 a.m. | OK | MS C++ 2017 | TESTS | 35 | 233 | 409600 | ||
92286315 | oceanlin | C | Sept. 8, 2020, 5:05 p.m. | OK | MS C++ 2017 | TESTS | 35 | 249 | 307200 | ||
92302568 | ustaritz | C | Sept. 8, 2020, 8:35 p.m. | OK | MS C++ 2017 | TESTS | 35 | 264 | 307200 | ||
92294307 | IronArt | C | Sept. 8, 2020, 6:18 p.m. | OK | MS C++ 2017 | TESTS | 35 | 265 | 409600 | ||
92285405 | AnnSuperstar | C | Sept. 8, 2020, 5:02 p.m. | OK | MS C++ 2017 | TESTS | 35 | 311 | 102400 | ||
92279920 | AssAsDollar | C | Sept. 8, 2020, 4:26 p.m. | OK | MS C++ 2017 | TESTS | 35 | 327 | 716800 | ||
92318657 | little_lion | C | Sept. 9, 2020, 4:56 a.m. | OK | MS C++ 2017 | TESTS | 35 | 358 | 0 | ||
92288195 | pajenegod | C | Sept. 8, 2020, 5:16 p.m. | OK | PyPy 2 | TESTS | 35 | 296 | 1433600 | ||
92295438 | Satwik_Tiwari | C | Sept. 8, 2020, 6:33 p.m. | OK | PyPy 2 | TESTS | 35 | 576 | 8294400 | ||
92321115 | snape_here | C | Sept. 9, 2020, 5:36 a.m. | OK | PyPy 2 | TESTS | 35 | 686 | 10240000 | ||
92319086 | shehebe | C | Sept. 9, 2020, 5:04 a.m. | OK | PyPy 2 | TESTS | 35 | 732 | 5222400 | ||
92287827 | lebron87 | C | Sept. 8, 2020, 5:13 p.m. | OK | PyPy 2 | TESTS | 35 | 795 | 10649600 | ||
92317609 | pedastrian57 | C | Sept. 9, 2020, 4:35 a.m. | OK | PyPy 2 | TESTS | 35 | 950 | 4300800 | ||
92307637 | pajenegod | C | Sept. 8, 2020, 11:38 p.m. | OK | PyPy 3 | TESTS | 35 | 342 | 2867200 | ||
92309733 | Satwik_Tiwari | C | Sept. 9, 2020, 1:09 a.m. | OK | PyPy 3 | TESTS | 35 | 389 | 2355200 | ||
92308228 | pajenegod | C | Sept. 9, 2020, 12:03 a.m. | OK | PyPy 3 | TESTS | 35 | 639 | 7372800 | ||
92308464 | pajenegod | C | Sept. 9, 2020, 12:13 a.m. | OK | PyPy 3 | TESTS | 35 | 670 | 6451200 | ||
92316324 | Rajdeep2k | C | Sept. 9, 2020, 4:10 a.m. | OK | PyPy 3 | TESTS | 35 | 716 | 7987200 | ||
92312284 | a0976531005 | C | Sept. 9, 2020, 2:36 a.m. | OK | PyPy 3 | TESTS | 35 | 748 | 5222400 | ||
92307825 | pajenegod | C | Sept. 8, 2020, 11:46 p.m. | OK | PyPy 3 | TESTS | 35 | 748 | 7680000 | ||
92316367 | Rajdeep2k | C | Sept. 9, 2020, 4:11 a.m. | OK | PyPy 3 | TESTS | 35 | 795 | 8908800 | ||
92309403 | Satwik_Tiwari | C | Sept. 9, 2020, 12:56 a.m. | OK | PyPy 3 | TESTS | 35 | 795 | 12390400 | ||
92297705 | 2019ucp1350 | C | Sept. 8, 2020, 7:05 p.m. | OK | PyPy 3 | TESTS | 35 | 811 | 7577600 | ||
92292075 | FlakeLCR | C | Sept. 8, 2020, 5:52 p.m. | OK | Python 3 | TESTS | 35 | 639 | 1024000 | ||
92292016 | Gausstein | C | Sept. 8, 2020, 5:52 p.m. | OK | Python 3 | TESTS | 35 | 655 | 716800 | ||
92301763 | avikalpg | C | Sept. 8, 2020, 8:17 p.m. | OK | Python 3 | TESTS | 35 | 655 | 921600 | ||
92292022 | conqueror_of_tourist | C | Sept. 8, 2020, 5:52 p.m. | OK | Python 3 | TESTS | 35 | 655 | 921600 | ||
92315271 | thekushalghosh | C | Sept. 9, 2020, 3:48 a.m. | OK | Python 3 | TESTS | 35 | 670 | 716800 | ||
92314785 | pppss | C | Sept. 9, 2020, 3:38 a.m. | OK | Python 3 | TESTS | 35 | 670 | 921600 | ||
92291983 | conqueror_of_tourist | C | Sept. 8, 2020, 5:51 p.m. | OK | Python 3 | TESTS | 35 | 685 | 921600 | ||
92315373 | thekushalghosh | C | Sept. 9, 2020, 3:50 a.m. | OK | Python 3 | TESTS | 35 | 701 | 716800 | ||
92315356 | thekushalghosh | C | Sept. 9, 2020, 3:50 a.m. | OK | Python 3 | TESTS | 35 | 701 | 716800 | ||
92293605 | tanmay104 | C | Sept. 8, 2020, 6:09 p.m. | OK | Python 3 | TESTS | 35 | 701 | 716800 | ||
92288297 | pandrei | C | Sept. 8, 2020, 5:17 p.m. | OK | Rust | TESTS | 35 | 358 | 0 | ||
92288122 | fatemender | C | Sept. 8, 2020, 5:16 p.m. | OK | Rust | TESTS | 35 | 467 | 0 | ||
92312046 | bqn | C | Sept. 9, 2020, 2:30 a.m. | OK | Rust | TESTS | 35 | 468 | 409600 |
Back to search problems