Codeforces Round 488 by NEAR (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
993 Codeforces Round 488 by NEAR (Div. 1) FINISHED False 9000 202656299 June 16, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1956 ) B Open Communication PROGRAMMING bitmasks brute force 1900

B"Two participants are each given a pair of distinct numbers from 1 to 9 such that there's exactly one number that is present in both pairs. They want to figure out the number that matches by using a communication channel you have access to without revealing it to you. Both participants communicated to each other a set of pairs of numbers, that includes the pair given to them. Each pair in the communicated sets comprises two different numbers. Determine if you can with certainty deduce the common number, or if you can determine with certainty that both participants know the number but you do not. The first line contains two integers n and m ( 1 <= n, m <= 12 ) -- the number of pairs the first participant communicated to the second and vice versa. The second line contains n pairs of integers, each between 1 and 9 , -- pairs of numbers communicated from first participant to the second. The third line contains m pairs of integers, each between 1 and 9 , -- pairs of numbers communicated from the second participant to the first. All pairs within each set are distinct (in particular, if there is a pair (1,2) , there will be no pair (2,1) within the same set), and no pair contains the same number twice. It is guaranteed that the two sets do not contradict the statements, in other words, there is pair from the first set and a pair from the second set that share exactly one number. If you can deduce the shared number with certainty, print that number. If you can with certainty deduce that both participants know the shared number, but you do not know it, print 0 . Otherwise print -1 . In the first example the first participant communicated pairs (1,2) and (3,4) , and the second communicated (1,5) , (3,4) . Since we know that the actual pairs they received share exactly one number, it can't be that they both have (3,4) . Thus, the first participant has (1,2) and "...

Tutorials

Codeforces Round #488 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
69417050 hos.lyric B Jan. 23, 2020, 1:23 p.m. OK D TESTS 52 31 0 1900
39644440 1668 B June 25, 2018, 9:15 a.m. OK FPC TESTS 52 31 0 1900
39676877 Administratom B June 26, 2018, 1:32 p.m. OK GNU C++ TESTS 52 15 0 1900
39348044 luhong B June 18, 2018, 6 a.m. OK GNU C++ TESTS 52 15 0 1900
39346038 dqa2020 B June 18, 2018, 2:53 a.m. OK GNU C++ TESTS 52 15 0 1900
40055803 dhuacm11 B July 7, 2018, 8:45 a.m. OK GNU C++ TESTS 52 30 0 1900
39351471 fksquare B June 18, 2018, 8:59 a.m. OK GNU C++ TESTS 52 30 0 1900
39344767 luogu_bot3 B June 17, 2018, 11:46 p.m. OK GNU C++ TESTS 52 30 0 1900
39337659 Elegia B June 17, 2018, 2:24 p.m. OK GNU C++ TESTS 52 30 0 1900
39308317 sheepp B June 16, 2018, 6:06 p.m. OK GNU C++ TESTS 52 30 0 1900
39304318 zhaimingshuzms B June 16, 2018, 5:39 p.m. OK GNU C++ TESTS 52 30 0 1900
39303888 yuyinohama B June 16, 2018, 5:36 p.m. OK GNU C++ TESTS 52 30 0 1900
39327964 atatomir B June 17, 2018, 7:28 a.m. OK GNU C++11 TESTS 52 15 0 1900
39309960 lyflyf B June 16, 2018, 6:18 p.m. OK GNU C++11 TESTS 52 15 102400 1900
42833923 Anson529 B Sept. 13, 2018, 2:27 p.m. OK GNU C++11 TESTS 52 30 0 1900
39671601 AlexLuchianov B June 26, 2018, 9:39 a.m. OK GNU C++11 TESTS 52 30 0 1900
39599484 krigan B June 24, 2018, 10:54 a.m. OK GNU C++11 TESTS 52 30 0 1900
39453879 RNS_MHB B June 21, 2018, 7:13 a.m. OK GNU C++11 TESTS 52 30 0 1900
39440573 aurinegro B June 20, 2018, 3:51 p.m. OK GNU C++11 TESTS 52 30 0 1900
39433103 Amaryllis3 B June 20, 2018, 10:36 a.m. OK GNU C++11 TESTS 52 30 0 1900
39396971 Tommyr7 B June 19, 2018, 3:20 a.m. OK GNU C++11 TESTS 52 30 0 1900
39335280 kristevalex B June 17, 2018, 12:39 p.m. OK GNU C++11 TESTS 52 30 0 1900
50079941 vjudge3 B Feb. 18, 2019, 2:55 a.m. OK GNU C++14 TESTS 52 15 0 1900
48516504 KasugaAyumu B Jan. 18, 2019, 4:34 a.m. OK GNU C++14 TESTS 52 15 0 1900
39413932 pazabol B June 19, 2018, 2:31 p.m. OK GNU C++14 TESTS 52 15 0 1900
39337993 Kuzey B June 17, 2018, 2:39 p.m. OK GNU C++14 TESTS 52 15 0 1900
39325070 sdssudhu B June 17, 2018, 5:06 a.m. OK GNU C++14 TESTS 52 15 0 1900
39323483 hank55663 B June 17, 2018, 3:10 a.m. OK GNU C++14 TESTS 52 15 0 1900
39321348 shdut B June 17, 2018, 12:04 a.m. OK GNU C++14 TESTS 52 15 0 1900
39320918 kobortor B June 16, 2018, 11:23 p.m. OK GNU C++14 TESTS 52 15 0 1900
39319918 Ralsei B June 16, 2018, 9:57 p.m. OK GNU C++14 TESTS 52 15 0 1900
39319308 shoemakerjo B June 16, 2018, 9:20 p.m. OK GNU C++14 TESTS 52 15 0 1900
39430238 eddy1021 B June 20, 2018, 8:32 a.m. OK GNU C++17 TESTS 52 15 0 1900
39348299 BlueDiamond B June 18, 2018, 6:14 a.m. OK GNU C++17 TESTS 52 15 0 1900
39330346 karasek B June 17, 2018, 9:01 a.m. OK GNU C++17 TESTS 52 15 0 1900
39326501 Nebuchadnezzar B June 17, 2018, 6:26 a.m. OK GNU C++17 TESTS 52 15 0 1900
39301486 Thiagohnc B June 16, 2018, 5:21 p.m. OK GNU C++17 TESTS 52 15 0 1900
39300116 Ekler B June 16, 2018, 5:13 p.m. OK GNU C++17 TESTS 52 15 0 1900
39297760 alex9801 B June 16, 2018, 5 p.m. OK GNU C++17 TESTS 52 15 0 1900
39319795 Chameleon2460 B June 16, 2018, 9:48 p.m. OK GNU C++17 TESTS 52 15 102400 1900
39296798 zscoder B June 16, 2018, 4:55 p.m. OK GNU C++17 TESTS 52 15 102400 1900
39426403 BatyrAkhmetov B June 20, 2018, 4:58 a.m. OK GNU C++17 TESTS 52 15 204800 1900
60588823 vjudge2 B Sept. 15, 2019, 12:03 a.m. OK Go TESTS 52 31 0 1900
60588799 WangJialei B Sept. 15, 2019, 12:02 a.m. OK Go TESTS 52 31 0 1900
45706460 wadissimo B Nov. 14, 2018, 11:49 a.m. OK Java 8 TESTS 52 108 0 1900
52418439 KulikAlex B April 6, 2019, 4:04 p.m. OK Java 8 TESTS 52 109 0 1900
51795674 GiantTornado B March 24, 2019, 3:01 p.m. OK Java 8 TESTS 52 124 0 1900
39655242 AkshajK B June 25, 2018, 4:39 p.m. OK Java 8 TESTS 52 124 0 1900
39360570 SevenDeadlySins B June 18, 2018, 4:21 p.m. OK Java 8 TESTS 52 124 0 1900
39297400 lucasr B June 16, 2018, 4:58 p.m. OK Java 8 TESTS 52 124 0 1900
39309832 tri B June 16, 2018, 6:17 p.m. OK Java 8 TESTS 52 139 0 1900
39307185 fnch B June 16, 2018, 5:58 p.m. OK Java 8 TESTS 52 139 0 1900
39300393 Jeel_Vaishnav B June 16, 2018, 5:15 p.m. OK Java 8 TESTS 52 139 0 1900
39297334 uwi B June 16, 2018, 4:58 p.m. OK Java 8 TESTS 52 139 0 1900
39300550 Sergey.Bankevich B June 16, 2018, 5:15 p.m. OK Kotlin TESTS 52 171 0 1900
39300241 elizarov B June 16, 2018, 5:14 p.m. OK Kotlin TESTS 52 171 0 1900
63284327 vjudge1 B Oct. 24, 2019, 9:47 a.m. OK MS C++ TESTS 52 31 0 1900
63282822 vjudge5 B Oct. 24, 2019, 9:16 a.m. OK MS C++ TESTS 52 31 0 1900
63282346 vjudge3 B Oct. 24, 2019, 9:07 a.m. OK MS C++ TESTS 52 31 0 1900
56748323 vjudge4 B July 9, 2019, 10:50 a.m. OK MS C++ TESTS 52 31 0 1900
56716324 vjudge4 B July 8, 2019, 2:48 p.m. OK MS C++ TESTS 52 31 0 1900
45267339 LoneFox B Nov. 4, 2018, 6:38 a.m. OK MS C++ TESTS 52 31 0 1900
40471015 j4357j B July 17, 2018, 9:28 a.m. OK MS C++ TESTS 52 31 0 1900
40470903 j4357j B July 17, 2018, 9:24 a.m. OK MS C++ TESTS 52 31 0 1900
39339723 nik1998 B June 17, 2018, 4:16 p.m. OK MS C++ TESTS 52 31 0 1900
62961792 vjudge1 B Oct. 20, 2019, 1:20 a.m. OK MS C++ 2017 TESTS 52 31 0 1900
62941635 Y_is_sunshine B Oct. 19, 2019, 3:48 p.m. OK MS C++ 2017 TESTS 52 31 0 1900
56748327 shijieshu B July 9, 2019, 10:50 a.m. OK MS C++ 2017 TESTS 52 31 0 1900
39348431 mayakin B June 18, 2018, 6:22 a.m. OK PHP TESTS 52 31 409600 1900
39318386 kevinsogo B June 16, 2018, 8:43 p.m. OK PyPy 2 TESTS 52 109 921600 1900
39296167 --d B June 16, 2018, 4:52 p.m. OK PyPy 3 TESTS 52 124 0 1900
39302230 sparkyyyy B June 16, 2018, 5:25 p.m. OK PyPy 3 TESTS 52 139 0 1900
39324570 nwi B June 17, 2018, 4:31 a.m. OK Python 2 TESTS 52 93 0 1900
39341005 Ali_Pi B June 17, 2018, 5:42 p.m. OK Python 2 TESTS 52 108 0 1900
39300617 WNG B June 16, 2018, 5:16 p.m. OK Python 2 TESTS 52 109 0 1900
39319491 Ferume B June 16, 2018, 9:31 p.m. OK Python 3 TESTS 52 92 0 1900
39346113 orailly B June 18, 2018, 3:01 a.m. OK Python 3 TESTS 52 93 0 1900
39306743 yum B June 16, 2018, 5:55 p.m. OK Python 3 TESTS 52 93 0 1900
39302256 SoMuchDrama B June 16, 2018, 5:26 p.m. OK Python 3 TESTS 52 93 0 1900
39298378 satja B June 16, 2018, 5:03 p.m. OK Python 3 TESTS 52 109 0 1900
53195921 v.y B April 23, 2019, 3:17 p.m. OK Python 3 TESTS 52 109 307200 1900
53088882 Thaumer B April 21, 2019, 10:13 a.m. OK Python 3 TESTS 52 109 307200 1900
39404643 xh286286 B June 19, 2018, 9:09 a.m. OK Python 3 TESTS 52 109 512000 1900
42462000 nns2009 B Sept. 4, 2018, 2:02 p.m. OK Python 3 TESTS 52 124 0 1900
42132877 Mk_Python_v1 B Aug. 26, 2018, 8:01 p.m. OK Python 3 TESTS 52 124 0 1900
39323887 cyand1317 B June 17, 2018, 3:44 a.m. OK Ruby TESTS 52 77 0 1900
39522032 LemonTree B June 22, 2018, 4:23 p.m. OK Rust TESTS 52 31 0 1900
39303700 limed B June 16, 2018, 5:35 p.m. OK Scala TESTS 52 592 0 1900

remove filters

Back to search problems