Codeforces Global Round 21

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
1696 Codeforces Global Round 21 FINISHED False 8100 81012263 June 25, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 992 ) F Tree Recovery PROGRAMMING bitmasks brute force constructive algorithms dfs and similar ds graphs trees

B'Fishingprince loves trees. A tree is a connected undirected graph without cycles. Fishingprince has a tree of n vertices. The vertices are numbered 1 through n . Let d(x,y) denote the shortest distance on the tree from vertex x to vertex y , assuming that the length of each edge is 1 . However, the tree was lost in an accident. Fortunately, Fishingprince still remembers some information about the tree. More specifically, for every triple of integers x,y,z ( 1 <= x<y <= n , 1 <= z <= n ) he remembers whether d(x,z)=d(y,z) or not. Help him recover the structure of the tree, or report that no tree satisfying the constraints exists. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 200 ). Description of the test cases follows. The first line of each test case contains an integer n ( 2 <= n <= 100 ) -- the number of vertices in the tree. Then n-1 lines follow. The i -th line of these n-1 lines contains n-i strings of length n consisting of 0 and 1. If the k -th character in the j -th string of the i -th line is 0, it means that d(i,k) ne d(i+j,k) ; if the k -th character in the j -th string of the i -th line is 1, it means that d(i,k)=d(i+j,k) . It is guaranteed that in one input file, For each test case: When printing Yes and No, you can print each letter in any case (upper or lower). '...

Tutorials

Editorial of Codeforces Global Round 21

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
161809422 ajpiano F June 25, 2022, 7:29 p.m. OK GNU C11 TESTS 41 327 4812800
161820511 lin7xu F June 26, 2022, 12:59 a.m. OK GNU C++14 TESTS 41 31 2969600
161829021 cyh_toby F June 26, 2022, 4:59 a.m. OK GNU C++14 TESTS 41 31 5734400
161790451 Barichek F June 25, 2022, 4:26 p.m. OK GNU C++14 TESTS 41 46 2355200
161828940 sbzhangjianjun F June 26, 2022, 4:57 a.m. OK GNU C++14 TESTS 41 46 2355200
161796872 surwdkgo F June 25, 2022, 4:49 p.m. OK GNU C++14 TESTS 41 46 2457600
161786678 Suiseiseki F June 25, 2022, 4:12 p.m. OK GNU C++14 TESTS 41 46 2560000
161820457 lin7xu F June 26, 2022, 12:56 a.m. OK GNU C++14 TESTS 41 46 2969600
161800993 luogubot F June 25, 2022, 5:45 p.m. OK GNU C++14 TESTS 41 46 3174400
161802173 hualian F June 25, 2022, 5:55 p.m. OK GNU C++14 TESTS 41 46 3174400
161822009 leukocyte F June 26, 2022, 1:52 a.m. OK GNU C++14 TESTS 41 46 6246400
161814956 IsaacMoris F June 25, 2022, 9:27 p.m. OK GNU C++17 TESTS 41 31 1433600
161822409 juju527 F June 26, 2022, 2:06 a.m. OK GNU C++17 TESTS 41 31 2355200
161790254 SiRiehn_nx F June 25, 2022, 4:25 p.m. OK GNU C++17 TESTS 41 46 1536000
161830979 danxmz2006 F June 26, 2022, 5:37 a.m. OK GNU C++17 TESTS 41 46 2457600
161792674 penguinhacker F June 25, 2022, 4:34 p.m. OK GNU C++17 TESTS 41 46 2662400
161806752 Tima F June 25, 2022, 6:48 p.m. OK GNU C++17 TESTS 41 46 2969600
161790896 gisp_zjz F June 25, 2022, 4:28 p.m. OK GNU C++17 TESTS 41 46 3891200
161790851 moe.tsuki F June 25, 2022, 4:28 p.m. OK GNU C++17 TESTS 41 46 16281600
161794711 Sooke F June 25, 2022, 4:42 p.m. OK GNU C++17 TESTS 41 61 2457600
161788594 TeaPot F June 25, 2022, 4:19 p.m. OK GNU C++17 TESTS 41 61 6041600
161794065 Gom F June 25, 2022, 4:40 p.m. OK GNU C++17 (64) TESTS 41 31 2252800
161792452 dfcmd F June 25, 2022, 4:34 p.m. OK GNU C++17 (64) TESTS 41 31 2457600
161796888 AutumnKite F June 25, 2022, 4:49 p.m. OK GNU C++17 (64) TESTS 41 31 3174400
161788625 Crabby_Maskiv F June 25, 2022, 4:19 p.m. OK GNU C++17 (64) TESTS 41 46 1536000
161797001 dario2994 F June 25, 2022, 4:49 p.m. OK GNU C++17 (64) TESTS 41 46 2457600
161799939 TLE F June 25, 2022, 5:38 p.m. OK GNU C++17 (64) TESTS 41 46 2457600
161794022 rniya F June 25, 2022, 4:40 p.m. OK GNU C++17 (64) TESTS 41 46 2867200
161788110 Xellos F June 25, 2022, 4:17 p.m. OK GNU C++17 (64) TESTS 41 46 2867200
161800909 KevinWan F June 25, 2022, 5:44 p.m. OK GNU C++17 (64) TESTS 41 46 9830400
161789219 DK1227 F June 25, 2022, 4:21 p.m. OK GNU C++17 (64) TESTS 41 46 20582400
161794256 BlueDiamond F June 25, 2022, 4:41 p.m. OK GNU C++20 (64) TESTS 41 31 2867200
161800125 2qbingxuan F June 25, 2022, 5:39 p.m. OK GNU C++20 (64) TESTS 41 31 3276800
161792302 SSerxhs F June 25, 2022, 4:33 p.m. OK GNU C++20 (64) TESTS 41 46 1740800
161788720 S2speed F June 25, 2022, 4:20 p.m. OK GNU C++20 (64) TESTS 41 46 2048000
161821968 okwedook F June 26, 2022, 1:51 a.m. OK GNU C++20 (64) TESTS 41 46 2048000
161819539 AlanSkarica F June 26, 2022, 12:17 a.m. OK GNU C++20 (64) TESTS 41 46 2355200
161819570 AlanSkarica F June 26, 2022, 12:19 a.m. OK GNU C++20 (64) TESTS 41 46 2355200
161786722 waynetu F June 25, 2022, 4:12 p.m. OK GNU C++20 (64) TESTS 41 46 2457600
161793464 Brovko F June 25, 2022, 4:38 p.m. OK GNU C++20 (64) TESTS 41 46 2560000
161790078 Icecream2001 F June 25, 2022, 4:24 p.m. OK GNU C++20 (64) TESTS 41 46 2764800
161807182 freehandle F June 25, 2022, 6:54 p.m. OK Java 11 TESTS 41 218 25292800
161789655 eatmore F June 25, 2022, 4:23 p.m. OK Java 11 TESTS 41 264 25907200
161799229 mmaxio F June 25, 2022, 5:35 p.m. OK Java 11 TESTS 41 358 25190400
161788192 iakovlev.zakhar F June 25, 2022, 4:18 p.m. OK Java 8 TESTS 41 202 26214400
161800543 machine_solution F June 25, 2022, 5:41 p.m. OK MS C++ 2017 TESTS 41 187 1843200
161800594 machine_solution F June 25, 2022, 5:42 p.m. OK MS C++ 2017 TESTS 41 202 1843200
161799906 machine_solution F June 25, 2022, 5:38 p.m. OK MS C++ 2017 TESTS 41 218 2048000
161799384 r57shell F June 25, 2022, 5:36 p.m. OK MS C++ 2017 TESTS 41 717 15769600
161794112 chinerist F June 25, 2022, 4:40 p.m. OK PyPy 3-64 TESTS 41 732 46284800
161821372 Thallium54 F June 26, 2022, 1:31 a.m. OK Rust 2021 TESTS 41 77 5427200
161821138 Thallium54 F June 26, 2022, 1:22 a.m. OK Rust 2021 TESTS 41 78 5427200

remove filters

Back to search problems