Codeforces Round 865 (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
1815 Codeforces Round 865 (Div. 1) FINISHED False 8100 56128463 April 9, 2023, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3124 ) B Sum Graph PROGRAMMING constructive algorithms graphs implementation interactive math shortest paths trees 2000

B'This is an interactive problem. There is a hidden permutation p_1, p_2, ... , p_n . Consider an undirected graph with n nodes only with no edges. You can make two types of queries: Note that you can make both types of queries in any order. Within 2n queries (including type 1 and type 2 ), guess two possible permutations, at least one of which is p_1, p_2, ... , p_n . You get accepted if at least one of the permutations is correct. You are allowed to guess the same permutation twice. 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). Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The first line of each test case contains a single integer n ( 2 <= n <= 10^3 ) -- the length of the permutation. It is guaranteed that the sum of n over all test cases does not exceed 10^3 . The interaction for each test case begins by reading the integer n . Then, make at most 2n queries: At any point of the interaction, if you want to guess two permutations, output "! p_{1,1} p_{1,2} ... p_{1,n} p_{2,1} p_{2,2} ... p_{2,n} ". Note that you should output the two permutations on the same line, and no exclamation mark is needed to separate the two permutations. After doing that read 1 or -2 . If you read 1 your answer was correct, otherwise it was incorrect and your program must terminate immediately to receive a Wrong Answer verdict. After that, move on to the next test case, or terminate the program if there are none. Note that reporting the answer does not co'...

Tutorials

Editorial of Codeforces Round #865

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
201522554 mban259 B April 9, 2023, 3:34 p.m. OK C# 10 TESTS 73 93 409600 2000
201552244 LeonidR B April 9, 2023, 4:33 p.m. OK C# 10 TESTS 73 108 1638400 2000
201497129 hos.lyric B April 9, 2023, 3:04 p.m. OK D TESTS 73 46 4198400 2000
201561039 Gassa B April 9, 2023, 4:55 p.m. OK D TESTS 73 62 4403200 2000
201586780 rainboy B April 9, 2023, 8:45 p.m. OK GNU C11 TESTS 73 62 0 2000
201525721 chro4896 B April 9, 2023, 3:39 p.m. OK GNU C11 TESTS 73 62 0 2000
201605963 cyh_toby B April 10, 2023, 2:40 a.m. OK GNU C++14 TESTS 73 31 204800 2000
201543932 mod998244353 B April 9, 2023, 4:13 p.m. OK GNU C++14 TESTS 73 31 512000 2000
201544187 Uagu B April 9, 2023, 4:13 p.m. OK GNU C++14 TESTS 73 46 0 2000
201533542 XG0000 B April 9, 2023, 3:52 p.m. OK GNU C++14 TESTS 73 46 0 2000
201524543 stOzenghaoweiOrz B April 9, 2023, 3:37 p.m. OK GNU C++14 TESTS 73 46 0 2000
201521487 ForwardJ B April 9, 2023, 3:33 p.m. OK GNU C++14 TESTS 73 46 0 2000
201567230 DaiRuiChen007 B April 9, 2023, 5:43 p.m. OK GNU C++14 TESTS 73 46 0 2000
201557533 baiABC B April 9, 2023, 4:46 p.m. OK GNU C++14 TESTS 73 46 0 2000
201567535 Splashing B April 9, 2023, 5:45 p.m. OK GNU C++14 TESTS 73 46 0 2000
201545340 ExRoc__ B April 9, 2023, 4:16 p.m. OK GNU C++14 TESTS 73 46 0 2000
201609573 Gordon_Z B April 10, 2023, 3:42 a.m. OK GNU C++17 TESTS 73 31 0 2000
201560798 lxyb B April 9, 2023, 4:55 p.m. OK GNU C++17 TESTS 73 31 0 2000
201609480 dreami63 B April 10, 2023, 3:41 a.m. OK GNU C++17 TESTS 73 31 102400 2000
201587609 XDEv11 B April 9, 2023, 8:54 p.m. OK GNU C++17 TESTS 73 31 102400 2000
201541308 savvawr B April 9, 2023, 4:07 p.m. OK GNU C++17 TESTS 73 31 204800 2000
201539990 myoi0905 B April 9, 2023, 4:05 p.m. OK GNU C++17 TESTS 73 31 204800 2000
201529472 elb89 B April 9, 2023, 3:45 p.m. OK GNU C++17 TESTS 73 31 204800 2000
201567164 orangecalculator B April 9, 2023, 5:43 p.m. OK GNU C++17 TESTS 73 31 204800 2000
201586064 Hari03 B April 9, 2023, 8:38 p.m. OK GNU C++17 TESTS 73 31 204800 2000
201613372 MetalPower B April 10, 2023, 4:43 a.m. OK GNU C++17 TESTS 73 46 0 2000
201515575 ttttan B April 9, 2023, 3:25 p.m. OK GNU C++17 (64) TESTS 73 31 0 2000
201517315 cuom1999 B April 9, 2023, 3:27 p.m. OK GNU C++17 (64) TESTS 73 31 0 2000
201547623 Raiden B April 9, 2023, 4:21 p.m. OK GNU C++17 (64) TESTS 73 31 0 2000
201530775 Hackenbush B April 9, 2023, 3:47 p.m. OK GNU C++17 (64) TESTS 73 31 102400 2000
201523000 alegsandyr B April 9, 2023, 3:35 p.m. OK GNU C++17 (64) TESTS 73 31 102400 2000
201514620 koooooooooooooooo B April 9, 2023, 3:24 p.m. OK GNU C++17 (64) TESTS 73 31 102400 2000
201529012 zouyu963l B April 9, 2023, 3:44 p.m. OK GNU C++17 (64) TESTS 73 31 204800 2000
201602881 yzc2005 B April 10, 2023, 1:36 a.m. OK GNU C++17 (64) TESTS 73 46 0 2000
201604299 guoziyang B April 10, 2023, 2:07 a.m. OK GNU C++17 (64) TESTS 73 46 0 2000
201562981 cxm1024 B April 9, 2023, 4:59 p.m. OK GNU C++17 (64) TESTS 73 46 0 2000
201518532 1000--7 B April 9, 2023, 3:29 p.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201603110 jinmingli B April 10, 2023, 1:40 a.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201588894 leovl48 B April 9, 2023, 9:10 p.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201579665 Eddard B April 9, 2023, 7:27 p.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201578736 abeker B April 9, 2023, 7:18 p.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201573734 SashaT9 B April 9, 2023, 6:30 p.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201552087 vladmart B April 9, 2023, 4:33 p.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201543377 IhcNerNaug B April 9, 2023, 4:11 p.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201532715 Rico64 B April 9, 2023, 3:50 p.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201508278 tatyam B April 9, 2023, 3:16 p.m. OK GNU C++20 (64) TESTS 73 31 0 2000
201567249 profchi B April 9, 2023, 5:43 p.m. OK Java 11 TESTS 73 327 0 2000
201558384 TCchen B April 9, 2023, 4:49 p.m. OK Java 17 TESTS 73 405 1126400 2000
201524513 iakovlev.zakhar B April 9, 2023, 3:37 p.m. OK Java 8 TESTS 73 249 0 2000
201538916 golions B April 9, 2023, 4:02 p.m. OK Java 8 TESTS 73 264 0 2000
201540078 goIions B April 9, 2023, 4:05 p.m. OK Java 8 TESTS 73 280 0 2000
201513569 fetetriste B April 9, 2023, 3:23 p.m. OK Java 8 TESTS 73 343 0 2000
201554369 misorin B April 9, 2023, 4:38 p.m. OK PyPy 3 TESTS 73 187 2048000 2000
201515927 shobonvip B April 9, 2023, 3:26 p.m. OK PyPy 3 TESTS 73 296 4505600 2000
201535824 SPD_9X2 B April 9, 2023, 3:56 p.m. OK PyPy 3 TESTS 73 342 6041600 2000
201541223 zacker-22 B April 9, 2023, 4:07 p.m. OK PyPy 3 TESTS 73 483 9113600 2000
201560236 alxwen711 B April 9, 2023, 4:53 p.m. OK PyPy 3-64 TESTS 73 202 5734400 2000
201514776 titia B April 9, 2023, 3:24 p.m. OK PyPy 3-64 TESTS 73 218 6758400 2000
201538312 plevande B April 9, 2023, 4:01 p.m. OK PyPy 3-64 TESTS 73 233 5324800 2000
201507479 dyppp B April 9, 2023, 3:15 p.m. OK PyPy 3-64 TESTS 73 234 6451200 2000
201524522 kyoran B April 9, 2023, 3:37 p.m. OK PyPy 3-64 TESTS 73 248 2764800 2000
201502529 bronze_coder B April 9, 2023, 3:10 p.m. OK PyPy 3-64 TESTS 73 249 8396800 2000
201537080 Kita B April 9, 2023, 3:59 p.m. OK PyPy 3-64 TESTS 73 264 6656000 2000
201524551 yooyou7 B April 9, 2023, 3:37 p.m. OK PyPy 3-64 TESTS 73 264 7065600 2000
201520749 alexwice B April 9, 2023, 3:32 p.m. OK PyPy 3-64 TESTS 73 265 8704000 2000
201527633 yupooh B April 9, 2023, 3:42 p.m. OK PyPy 3-64 TESTS 73 280 6553600 2000
201614561 Akiyama-Mizuki B April 10, 2023, 5 a.m. OK Python 3 TESTS 73 124 0 2000
201502846 sansen B April 9, 2023, 3:10 p.m. OK Rust 2021 TESTS 73 93 102400 2000

remove filters

Back to search problems