Codeforces Round 758 (Div.1 + Div. 2)

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
1608 Codeforces Round 758 (Div.1 + Div. 2) FINISHED False 7200 97962863 Dec. 11, 2021, 10:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6824 ) C Game Master PROGRAMMING data structures dfs and similar dp graphs greedy two pointers

B' n players are playing a game. There are two different maps in the game. For each player, we know his strength on each map. When two players fight on a specific map, the player with higher strength on that map always wins. No two players have the same strength on the same map. You are the game master and want to organize a tournament. There will be a total of n-1 battles. While there is more than one player in the tournament, choose any map and any two remaining players to fight on it. The player who loses will be eliminated from the tournament. In the end, exactly one player will remain, and he is declared the winner of the tournament. For each player determine if he can win the tournament. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q 10^5 ) -- the number of players. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q 10^9 , a_i neq a_j for i neq j ), where a_i is the strength of the i -th player on the first map. The third line of each test case contains n integers b_1, b_2, ... , b_n ( 1 <= q b_i <= q 10^9 , b_i neq b_j for i neq j ), where b_i is the strength of the i -th player on the second map. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case print a string of length n . i -th character should be "1" if the i -th player can win the tournament, or "0" otherwise. In the first test case, the 4 -th player will beat any other player on any game, so he will definitely win the tournament. In the second test case, everyone can be a winner. In the third test case, there is only one player. Clearly, he will win the tournament. '...

Tutorials

Editorial of Codeforces Round #758 (Div.1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
138771168 cheese-cracker C Dec. 11, 2021, 12:20 p.m. OK D TESTS 50 171 24268800
138778961 lddlinan C Dec. 11, 2021, 1:24 p.m. OK GNU C11 TESTS 50 62 2150400
138788910 RealArtist C Dec. 11, 2021, 2:58 p.m. OK GNU C11 TESTS 50 420 2662400
138761870 jiangxuancheng C Dec. 11, 2021, 11:43 a.m. OK GNU C++14 TESTS 50 46 14131200
138767643 Omar_Elaraby C Dec. 11, 2021, 11:59 a.m. OK GNU C++14 TESTS 50 62 1740800
138819581 Krystallos C Dec. 12, 2021, 12:05 a.m. OK GNU C++14 TESTS 50 62 1740800
138763426 HwSh C Dec. 11, 2021, 11:47 a.m. OK GNU C++14 TESTS 50 62 2150400
138788950 Mryange C Dec. 11, 2021, 2:59 p.m. OK GNU C++14 TESTS 50 77 1331200
138794444 dachui_DC C Dec. 11, 2021, 4:03 p.m. OK GNU C++14 TESTS 50 77 1638400
138771596 Yuki991 C Dec. 11, 2021, 12:22 p.m. OK GNU C++14 TESTS 50 77 1740800
138787364 XQ777 C Dec. 11, 2021, 2:41 p.m. OK GNU C++14 TESTS 50 77 2457600
138779577 bzkk C Dec. 11, 2021, 1:30 p.m. OK GNU C++14 TESTS 50 77 2457600
138790710 Pharaonic_fox C Dec. 11, 2021, 3:19 p.m. OK GNU C++14 TESTS 50 77 2457600
138787715 yyfcpp C Dec. 11, 2021, 2:45 p.m. OK GNU C++17 TESTS 50 61 3174400
138820985 motorcycle C Dec. 12, 2021, 1:12 a.m. OK GNU C++17 TESTS 50 62 1331200
138774829 NULL0x7f C Dec. 11, 2021, 12:46 p.m. OK GNU C++17 TESTS 50 62 2150400
138778531 boldcounselor C Dec. 11, 2021, 1:20 p.m. OK GNU C++17 TESTS 50 62 2867200
138783347 90n C Dec. 11, 2021, 2:03 p.m. OK GNU C++17 TESTS 50 77 1638400
138778942 ezo_tihor C Dec. 11, 2021, 1:24 p.m. OK GNU C++17 TESTS 50 77 1740800
138796215 LilMeyer C Dec. 11, 2021, 4:24 p.m. OK GNU C++17 TESTS 50 77 2048000
138774513 flying_doraemon C Dec. 11, 2021, 12:43 p.m. OK GNU C++17 TESTS 50 77 2150400
138816961 NegaTeeF C Dec. 11, 2021, 10:12 p.m. OK GNU C++17 TESTS 50 77 2150400
138823354 Try_harder_one C Dec. 12, 2021, 2:47 a.m. OK GNU C++17 TESTS 50 77 2457600
138784327 Elias_Obeid C Dec. 11, 2021, 2:12 p.m. OK GNU C++17 (64) TESTS 50 46 1331200
138774382 agrims C Dec. 11, 2021, 12:42 p.m. OK GNU C++17 (64) TESTS 50 46 1740800
138821131 luogu_bot3 C Dec. 12, 2021, 1:17 a.m. OK GNU C++17 (64) TESTS 50 46 3174400
138768707 Aklice C Dec. 11, 2021, 12:02 p.m. OK GNU C++17 (64) TESTS 50 46 6348800
138783151 nohaxjustsoflo C Dec. 11, 2021, 2:01 p.m. OK GNU C++17 (64) TESTS 50 46 8089600
138785457 rb3r C Dec. 11, 2021, 2:23 p.m. OK GNU C++17 (64) TESTS 50 61 1228800
138807457 neeraj_joshi C Dec. 11, 2021, 6:53 p.m. OK GNU C++17 (64) TESTS 50 61 2150400
138783433 Ronnie007 C Dec. 11, 2021, 2:03 p.m. OK GNU C++17 (64) TESTS 50 61 2457600
138810636 Mostafa_Moharram C Dec. 11, 2021, 7:46 p.m. OK GNU C++17 (64) TESTS 50 61 2560000
138776408 prasantkpatel C Dec. 11, 2021, 1 p.m. OK GNU C++17 (64) TESTS 50 61 2662400
138760642 AbdelmagedNour C Dec. 11, 2021, 11:39 a.m. OK GNU C++20 (64) TESTS 50 46 1638400
138773769 lxdlam C Dec. 11, 2021, 12:37 p.m. OK GNU C++20 (64) TESTS 50 46 1740800
138818138 TabulaRasa7 C Dec. 11, 2021, 10:59 p.m. OK GNU C++20 (64) TESTS 50 46 2150400
138788771 imstupid_featCL C Dec. 11, 2021, 2:57 p.m. OK GNU C++20 (64) TESTS 50 46 2457600
138776902 foammm C Dec. 11, 2021, 1:05 p.m. OK GNU C++20 (64) TESTS 50 46 2457600
138763860 yashshingade28 C Dec. 11, 2021, 11:49 a.m. OK GNU C++20 (64) TESTS 50 46 2457600
138787943 lmnopqrst C Dec. 11, 2021, 2:48 p.m. OK GNU C++20 (64) TESTS 50 46 2457600
138806107 queme C Dec. 11, 2021, 6:34 p.m. OK GNU C++20 (64) TESTS 50 46 2457600
138783115 jiuzhem C Dec. 11, 2021, 2 p.m. OK GNU C++20 (64) TESTS 50 46 3174400
138762896 aigor2701 C Dec. 11, 2021, 11:46 a.m. OK GNU C++20 (64) TESTS 50 46 3584000
138761793 vtiptop C Dec. 11, 2021, 11:43 a.m. OK Go TESTS 50 233 4710400
138823879 LongWalk C Dec. 12, 2021, 3:06 a.m. OK Java 11 TESTS 50 296 4505600
138814417 podtelkin C Dec. 11, 2021, 9 p.m. OK Java 11 TESTS 50 311 0
138807503 Satyaa C Dec. 11, 2021, 6:54 p.m. OK Java 11 TESTS 50 311 2764800
138813044 bobib C Dec. 11, 2021, 8:34 p.m. OK Java 11 TESTS 50 327 6656000
138761539 SaberXpro C Dec. 11, 2021, 11:42 a.m. OK Java 11 TESTS 50 342 2048000
138825017 iamavalon C Dec. 12, 2021, 3:44 a.m. OK Java 11 TESTS 50 342 4096000
138775037 ssk4988 C Dec. 11, 2021, 12:48 p.m. OK Java 11 TESTS 50 358 11059200
138766801 _merlin_ C Dec. 11, 2021, 11:56 a.m. OK Java 11 TESTS 50 545 20787200
138768260 naveen4737 C Dec. 11, 2021, 12:01 p.m. OK Java 11 TESTS 50 623 15052800
138815386 ritesharma C Dec. 11, 2021, 9:25 p.m. OK Java 11 TESTS 50 623 25190400
138792560 kishan963 C Dec. 11, 2021, 3:42 p.m. OK Java 8 TESTS 50 265 6553600
138814325 KNIGHT0X300 C Dec. 11, 2021, 8:58 p.m. OK Java 8 TESTS 50 280 0
138762342 kamranm C Dec. 11, 2021, 11:44 a.m. OK Java 8 TESTS 50 311 8908800
138806720 VishuTomar C Dec. 11, 2021, 6:43 p.m. OK Java 8 TESTS 50 374 32665600
138768253 invincible777 C Dec. 11, 2021, noon OK Java 8 TESTS 50 389 24576000
138797404 Vinay_Goel_ C Dec. 11, 2021, 4:38 p.m. OK Java 8 TESTS 50 405 26931200
138807260 VishuTomar C Dec. 11, 2021, 6:50 p.m. OK Java 8 TESTS 50 405 33177600
138767282 VishuTomar C Dec. 11, 2021, 11:58 a.m. OK Java 8 TESTS 50 451 32665600
138793184 shinghalrishabh C Dec. 11, 2021, 3:49 p.m. OK Java 8 TESTS 50 498 12288000
138826123 achyuta.rajaram C Dec. 12, 2021, 4:16 a.m. OK Java 8 TESTS 50 530 71680000
138772879 hcp C Dec. 11, 2021, 12:30 p.m. OK MS C++ 2017 TESTS 50 109 2457600
138774893 Agumon C Dec. 11, 2021, 12:46 p.m. OK MS C++ 2017 TESTS 50 109 14643200
138822187 vjudge4 C Dec. 12, 2021, 2:03 a.m. OK MS C++ 2017 TESTS 50 109 14643200
138760988 Schullz C Dec. 11, 2021, 11:40 a.m. OK MS C++ 2017 TESTS 50 124 4403200
138762383 gronk C Dec. 11, 2021, 11:44 a.m. OK MS C++ 2017 TESTS 50 171 2457600
138824707 A_Pier C Dec. 12, 2021, 3:35 a.m. OK MS C++ 2017 TESTS 50 234 1331200
138765615 charleswang2001 C Dec. 11, 2021, 11:53 a.m. OK MS C++ 2017 TESTS 50 327 7987200
138764838 Tangerine C Dec. 11, 2021, 11:52 a.m. OK MS C++ 2017 TESTS 50 342 12288000
138766899 avtoruxadze C Dec. 11, 2021, 11:57 a.m. OK .NET Core C# TESTS 50 514 32768000
138820285 Liberator187 C Dec. 12, 2021, 12:42 a.m. OK PyPy 3 TESTS 50 374 20582400
138820288 Liberator187 C Dec. 12, 2021, 12:42 a.m. OK PyPy 3 TESTS 50 404 20889600
138765996 mikehAwk C Dec. 11, 2021, 11:54 a.m. OK PyPy 3 TESTS 50 436 16179200
138781419 Coding_RDX C Dec. 11, 2021, 1:46 p.m. OK PyPy 3 TESTS 50 530 16588800
138761244 Malek_souissi C Dec. 11, 2021, 11:41 a.m. OK PyPy 3 TESTS 50 577 22220800
138771302 KanishkGoel C Dec. 11, 2021, 12:21 p.m. OK PyPy 3 TESTS 50 686 15769600
138781925 MILOY C Dec. 11, 2021, 1:50 p.m. OK PyPy 3 TESTS 50 794 28160000
138775826 ca3sar C Dec. 11, 2021, 12:55 p.m. OK PyPy 3 TESTS 50 811 30412800
138776274 Amiy_Tiwari C Dec. 11, 2021, 12:59 p.m. OK PyPy 3 TESTS 50 873 19763200
138772839 Apoorv_Rathore C Dec. 11, 2021, 12:30 p.m. OK PyPy 3 TESTS 50 904 70451200
138798133 eepsilon C Dec. 11, 2021, 4:47 p.m. OK PyPy 3-64 TESTS 50 405 21811200
138795897 eepsilon C Dec. 11, 2021, 4:19 p.m. OK PyPy 3-64 TESTS 50 420 20582400
138785890 nitish420 C Dec. 11, 2021, 2:27 p.m. OK PyPy 3-64 TESTS 50 467 23859200
138768989 ossau_guildo C Dec. 11, 2021, 12:02 p.m. OK PyPy 3-64 TESTS 50 468 21606400
138764670 Mukundan314 C Dec. 11, 2021, 11:51 a.m. OK PyPy 3-64 TESTS 50 514 42803200
138761279 uttharapally.chandra C Dec. 11, 2021, 11:41 a.m. OK PyPy 3-64 TESTS 50 577 22323200
138824468 conqueror_of_tourist C Dec. 12, 2021, 3:27 a.m. OK PyPy 3-64 TESTS 50 607 16384000
138771679 mrobiul C Dec. 11, 2021, 12:23 p.m. OK PyPy 3-64 TESTS 50 654 15155200
138763006 Mattermonkey C Dec. 11, 2021, 11:46 a.m. OK PyPy 3-64 TESTS 50 654 25702400
138790000 jaglike_makkar C Dec. 11, 2021, 3:11 p.m. OK PyPy 3-64 TESTS 50 935 40755200
138800941 OLOGY C Dec. 11, 2021, 5:25 p.m. OK Python 2 TESTS 50 234 8908800
138800897 OLOGY C Dec. 11, 2021, 5:24 p.m. OK Python 2 TESTS 50 249 8806400
138774830 OLOGY C Dec. 11, 2021, 12:46 p.m. OK Python 2 TESTS 50 311 11571200
138790523 OLOGY C Dec. 11, 2021, 3:17 p.m. OK Python 2 TESTS 50 311 13209600
138766118 MorteZ C Dec. 11, 2021, 11:54 a.m. OK Python 3 TESTS 50 607 18329600
138820154 Abdelaleem C Dec. 12, 2021, 12:35 a.m. OK Python 3 TESTS 50 608 18227200
138776234 Bambam_Shivam C Dec. 11, 2021, 12:58 p.m. OK Python 3 TESTS 50 654 24371200
138769653 Bambam_Shivam C Dec. 11, 2021, 12:04 p.m. OK Python 3 TESTS 50 654 24371200
138803910 nabovtl C Dec. 11, 2021, 6:04 p.m. OK Python 3 TESTS 50 733 32665600
138805061 nabovtl C Dec. 11, 2021, 6:20 p.m. OK Python 3 TESTS 50 748 32563200
138761227 ghoshsanchita656 C Dec. 11, 2021, 11:41 a.m. OK Python 3 TESTS 50 920 21504000
138763812 manta1130 C Dec. 11, 2021, 11:49 a.m. OK Rust 2021 TESTS 50 46 9216000
138814001 rustafari C Dec. 11, 2021, 8:53 p.m. OK Rust 2021 TESTS 50 93 13516800

remove filters

Back to search problems