Codeforces Round 594 (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
1248 Codeforces Round 594 (Div. 2) FINISHED False 7200 165617663 Oct. 20, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14263 ) A Integer Points PROGRAMMING geometry math 900

B'DLS and JLS are bored with a Math lesson. In order to entertain themselves, DLS took a sheet of paper and drew n distinct lines, given by equations y = x + p_i for some distinct p_1, p_2, ldots, p_n . Then JLS drew on the same paper sheet m distinct lines given by equations y = -x + q_i for some distinct q_1, q_2, ldots, q_m . DLS and JLS are interested in counting how many line pairs have integer intersection points, i.e. points with both coordinates that are integers. Unfortunately, the lesson will end up soon, so DLS and JLS are asking for your help. The first line contains one integer t ( 1 <= t <= 1000 ), the number of test cases in the input. Then follow the test case descriptions. The first line of a test case contains an integer n ( 1 <= n <= 10^5 ), the number of lines drawn by DLS. The second line of a test case contains n distinct integers p_i ( 0 <= p_i <= 10^9 ) describing the lines drawn by DLS. The integer p_i describes a line given by the equation y = x + p_i . The third line of a test case contains an integer m ( 1 <= m <= 10^5 ), the number of lines drawn by JLS. The fourth line of a test case contains m distinct integers q_i ( 0 <= q_i <= 10^9 ) describing the lines drawn by JLS. The integer q_i describes a line given by the equation y = -x + q_i . The sum of the values of n over all test cases in the input does not exceed 10^5 . Similarly, the sum of the values of m over all test cases in the input does not exceed 10^5 . In hacks it is allowed to use only one test case in the input, so t=1 should be satisfied. For each test case in the input print a single integer -- the number of line pairs with integer intersection points. The picture shows the lines from the first test case of the example. Black circles denote intersection points with integer coordinates. '...

Tutorials

Editorial of Codeforces Round #594 (on the problems of Moscow Team Olympiad)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
64457524 vjudge2 A Nov. 7, 2019, 9:12 a.m. OK Clang++17 Diagnostics TESTS 14 108 0 900
67298062 Dariush_M A Dec. 20, 2019, 5:37 p.m. OK Clang++17 Diagnostics TESTS 14 1044 0 900
64754194 ruban A Nov. 12, 2019, 4:19 p.m. OK Delphi TESTS 14 77 51609600 900
62980248 Fidisk A Oct. 20, 2019, 9:14 a.m. OK FPC TESTS 14 62 0 900
63013210 tranminhprvt01 A Oct. 20, 2019, 12:13 p.m. OK FPC TESTS 14 62 7987200 900
63013674 tranminhprvt01 A Oct. 20, 2019, 12:19 p.m. OK FPC TESTS 14 77 0 900
63001167 hengxin11111jy A Oct. 20, 2019, 10:31 a.m. OK FPC TESTS 14 77 0 900
62988786 romanporsh A Oct. 20, 2019, 9:34 a.m. OK FPC TESTS 14 77 819200 900
63006390 melery_kin A Oct. 20, 2019, 10:56 a.m. OK FPC TESTS 14 93 0 900
66565423 cleyclun A Dec. 9, 2019, 9:36 p.m. OK GNU C11 TESTS 14 46 0 900
65558877 Yulina A Nov. 23, 2019, 1:23 a.m. OK GNU C11 TESTS 14 46 0 900
64512529 ivan.kraus A Nov. 8, 2019, 9:21 a.m. OK GNU C11 TESTS 14 46 0 900
63965664 fabiankmroh A Nov. 1, 2019, 7:04 a.m. OK GNU C11 TESTS 14 46 0 900
63203255 rickalicious A Oct. 22, 2019, 9:51 p.m. OK GNU C11 TESTS 14 46 0 900
63292294 alavrentiev A Oct. 24, 2019, 12:05 p.m. OK GNU C11 TESTS 14 46 0 900
63385997 ftycvyt A Oct. 25, 2019, 1:47 p.m. OK GNU C11 TESTS 14 46 0 900
63615309 vjudge3 A Oct. 27, 2019, 7:10 p.m. OK GNU C11 TESTS 14 46 0 900
69244257 vaibhavnandan A Jan. 21, 2020, 12:25 p.m. OK GNU C11 TESTS 14 46 0 900
66590252 cleyclun A Dec. 10, 2019, 12:44 p.m. OK GNU C11 TESTS 14 46 0 900
66026649 vjudge1 A Nov. 30, 2019, 8:53 a.m. OK GNU C++11 TESTS 14 31 0 900
63698441 vjudge1 A Oct. 29, 2019, 6:25 a.m. OK GNU C++11 TESTS 14 31 0 900
63957788 zxynothing A Nov. 1, 2019, 3:10 a.m. OK GNU C++11 TESTS 14 31 0 900
64055463 Q612 A Nov. 2, 2019, 1:07 a.m. OK GNU C++11 TESTS 14 31 0 900
64196266 jangjie A Nov. 4, 2019, 9:49 a.m. OK GNU C++11 TESTS 14 31 0 900
64520055 luogu_bot3 A Nov. 8, 2019, 12:01 p.m. OK GNU C++11 TESTS 14 31 0 900
65793170 Adelard A Nov. 27, 2019, 1:16 a.m. OK GNU C++11 TESTS 14 31 0 900
66656570 __trrbivial_innocence A Dec. 11, 2019, 11:39 p.m. OK GNU C++11 TESTS 14 31 0 900
66268748 jiaangk_ A Dec. 4, 2019, 11:30 a.m. OK GNU C++11 TESTS 14 31 0 900
66026679 Karry5307 A Nov. 30, 2019, 8:54 a.m. OK GNU C++11 TESTS 14 31 0 900
62988822 qq574118090 A Oct. 20, 2019, 9:34 a.m. OK GNU C++14 TESTS 14 31 0 900
63775229 tokitsukaze A Oct. 30, 2019, 9:17 a.m. OK GNU C++14 TESTS 14 31 102400 900
63062262 a_solo_player A Oct. 21, 2019, 9:11 a.m. OK GNU C++14 TESTS 14 46 819200 900
63107767 Chr1stopher A Oct. 22, 2019, 5:52 a.m. OK GNU C++14 TESTS 14 61 0 900
67995682 ftuknights A Dec. 31, 2019, 7:58 a.m. OK GNU C++14 TESTS 14 61 0 900
63012705 tigerh A Oct. 20, 2019, 12:06 p.m. OK GNU C++14 TESTS 14 61 819200 900
63538715 Hwhailly A Oct. 27, 2019, 8:55 a.m. OK GNU C++14 TESTS 14 61 819200 900
69840951 phamnhatnam BrokenBlade Luzivanlt A Jan. 30, 2020, 1:08 p.m. OK GNU C++14 TESTS 14 62 0 900
68999262 prakhar28 A Jan. 17, 2020, 6:46 p.m. OK GNU C++14 TESTS 14 62 0 900
68894615 ashu12_chi A Jan. 16, 2020, 3:55 a.m. OK GNU C++14 TESTS 14 62 0 900
65259587 ioyeoa A Nov. 17, 2019, 2:34 p.m. OK GNU C++17 TESTS 14 31 819200 900
63953975 yuruhiya A Oct. 31, 2019, 11:46 p.m. OK GNU C++17 TESTS 14 31 819200 900
64884290 xh29 A Nov. 14, 2019, 12:37 p.m. OK GNU C++17 TESTS 14 46 0 900
64883344 Ewketr A Nov. 14, 2019, 12:20 p.m. OK GNU C++17 TESTS 14 46 0 900
64684407 lijiatu A Nov. 11, 2019, 11:16 a.m. OK GNU C++17 TESTS 14 46 0 900
63110263 ydh A Oct. 22, 2019, 7:05 a.m. OK GNU C++17 TESTS 14 46 0 900
63014576 Tachibana_Rui A Oct. 20, 2019, 12:33 p.m. OK GNU C++17 TESTS 14 46 819200 900
63423636 vjudge3 A Oct. 26, 2019, 7:11 a.m. OK GNU C++17 TESTS 14 46 1638400 900
63967682 mycho2003 A Nov. 1, 2019, 7:52 a.m. OK GNU C++17 TESTS 14 61 0 900
64863592 vjudge5 A Nov. 14, 2019, 4:48 a.m. OK GNU C++17 TESTS 14 61 0 900
62980305 reanimatorzon A Oct. 20, 2019, 9:14 a.m. OK Go TESTS 14 61 4505600 900
64186244 lalala179 A Nov. 4, 2019, 5:19 a.m. OK Go TESTS 14 78 0 900
62981500 maguroguma A Oct. 20, 2019, 9:17 a.m. OK Go TESTS 14 78 4505600 900
68390017 ktateish A Jan. 8, 2020, 8:10 a.m. OK Go TESTS 14 78 4608000 900
62987671 z20124528 A Oct. 20, 2019, 9:31 a.m. OK Go TESTS 14 187 0 900
64450353 brosucks A Nov. 7, 2019, 6:50 a.m. OK Go TESTS 14 187 4505600 900
62982321 cojna A Oct. 20, 2019, 9:18 a.m. OK Haskell TESTS 14 62 4300800 900
62981360 torus711 A Oct. 20, 2019, 9:16 a.m. OK Haskell TESTS 14 62 4300800 900
68633250 warrioramrit A Jan. 12, 2020, 4:24 a.m. OK Java 11 TESTS 14 218 0 900
64742233 Captain_7 A Nov. 12, 2019, 12:21 p.m. OK Java 11 TESTS 14 218 0 900
67009054 satya_p54 A Dec. 16, 2019, 9:08 a.m. OK Java 11 TESTS 14 233 0 900
66361559 Silver_Lining A Dec. 5, 2019, 6:09 p.m. OK Java 11 TESTS 14 436 102400 900
63545391 enricogi A Oct. 27, 2019, 10:23 a.m. OK Java 11 TESTS 14 436 102400 900
64136919 ZZZXXXCCCWXY999 A Nov. 3, 2019, 7:23 a.m. OK Java 11 TESTS 14 452 102400 900
66457494 raba11aha A Dec. 7, 2019, 1:40 p.m. OK Java 11 TESTS 14 467 102400 900
63965916 ZZZXXXCCCWXY999 A Nov. 1, 2019, 7:10 a.m. OK Java 11 TESTS 14 467 102400 900
66203819 bluesky111 A Dec. 3, 2019, 12:01 a.m. OK Java 8 TESTS 14 109 0 900
63941549 Mann_27__ A Oct. 31, 2019, 5:37 p.m. OK Java 8 TESTS 14 109 0 900
68040723 _IAm_PM_ A Jan. 1, 2020, 2:11 p.m. OK Java 8 TESTS 14 124 0 900
63058511 sancode A Oct. 21, 2019, 7:34 a.m. OK Java 8 TESTS 14 124 0 900
63033175 wabadabakalakaboo A Oct. 20, 2019, 7:23 p.m. OK Java 8 TESTS 14 124 0 900
63030706 i_am_noob1999 A Oct. 20, 2019, 6:18 p.m. OK Java 8 TESTS 14 124 0 900
63016644 Nirav412000 A Oct. 20, 2019, 1:06 p.m. OK Java 8 TESTS 14 124 0 900
62994086 johnny16 A Oct. 20, 2019, 9:56 a.m. OK Java 8 TESTS 14 124 0 900
62982258 elkadymohammed01 A Oct. 20, 2019, 9:18 a.m. OK Java 8 TESTS 14 124 0 900
63116759 pushpraj17307 A Oct. 22, 2019, 9:37 a.m. OK Java 8 TESTS 14 139 0 900
62982477 Loremon A Oct. 20, 2019, 9:18 a.m. OK JavaScript TESTS 14 109 18534400 900
62986117 madmonl A Oct. 20, 2019, 9:26 a.m. OK JavaScript TESTS 14 140 18636800 900
68874805 AsuraPro A Jan. 15, 2020, 4:31 p.m. OK Kotlin TESTS 14 343 6144000 900
63896667 mendel_vv A Oct. 31, 2019, 2:29 a.m. OK Kotlin TESTS 14 358 7680000 900
64701240 IsTinG A Nov. 11, 2019, 2:54 p.m. OK Kotlin TESTS 14 358 10752000 900
62984135 pavlo.liapota A Oct. 20, 2019, 9:22 a.m. OK Kotlin TESTS 14 358 10854400 900
63082885 predator A Oct. 21, 2019, 3:41 p.m. OK Kotlin TESTS 14 374 7065600 900
62981698 SeD A Oct. 20, 2019, 9:17 a.m. OK Kotlin TESTS 14 389 0 900
62980467 Denzed A Oct. 20, 2019, 9:15 a.m. OK Kotlin TESTS 14 389 7884800 900
65587517 wbars A Nov. 23, 2019, 12:58 p.m. OK Kotlin TESTS 14 421 512000 900
62990681 nopopon A Oct. 20, 2019, 9:41 a.m. OK Kotlin TESTS 14 436 512000 900
62988770 Vesbat A Oct. 20, 2019, 9:34 a.m. OK Kotlin TESTS 14 436 10854400 900
63002552 vitaly_megabyte A Oct. 20, 2019, 10:38 a.m. OK Mono C# TESTS 14 109 21708800 900
63052158 m1_k3 A Oct. 21, 2019, 3:27 a.m. OK Mono C# TESTS 14 124 716800 900
63092929 hloya A Oct. 21, 2019, 7:14 p.m. OK Mono C# TESTS 14 124 21708800 900
63025969 harry_toOn A Oct. 20, 2019, 4:17 p.m. OK Mono C# TESTS 14 124 21708800 900
63018298 1champ10n A Oct. 20, 2019, 1:37 p.m. OK Mono C# TESTS 14 124 21708800 900
63022231 TRR A Oct. 20, 2019, 2:58 p.m. OK Mono C# TESTS 14 124 22425600 900
69425012 nastya1199 A Jan. 23, 2020, 3:31 p.m. OK Mono C# TESTS 14 124 22630400 900
63239990 Tan42 A Oct. 23, 2019, 1:13 p.m. OK Mono C# TESTS 14 124 23244800 900
63010583 iwkjosec A Oct. 20, 2019, 11:41 a.m. OK Mono C# TESTS 14 124 29081600 900
63039426 1champ10n A Oct. 20, 2019, 11:13 p.m. OK Mono C# TESTS 14 139 21708800 900
63651670 vjudge4 A Oct. 28, 2019, 11:34 a.m. OK MS C++ TESTS 14 46 0 900
63518322 vjudge4 A Oct. 27, 2019, 2:15 a.m. OK MS C++ TESTS 14 46 0 900
63993116 vjudge5 A Nov. 1, 2019, 1:45 p.m. OK MS C++ TESTS 14 46 0 900
63012048 YTICpoch A Oct. 20, 2019, 11:57 a.m. OK MS C++ TESTS 14 46 819200 900
63429409 vjudge4 A Oct. 26, 2019, 8:43 a.m. OK MS C++ TESTS 14 46 1638400 900
63082455 nauynehc A Oct. 21, 2019, 3:33 p.m. OK MS C++ TESTS 14 46 1638400 900
63427816 vjudge2 A Oct. 26, 2019, 8:19 a.m. OK MS C++ TESTS 14 46 1638400 900
63698247 vjudge4 A Oct. 29, 2019, 6:21 a.m. OK MS C++ TESTS 14 46 16076800 900
63429733 vjudge3 A Oct. 26, 2019, 8:48 a.m. OK MS C++ TESTS 14 61 0 900
63551889 vjudge2 A Oct. 27, 2019, 11:53 a.m. OK MS C++ TESTS 14 61 0 900
63518828 GomBu A Oct. 27, 2019, 2:35 a.m. OK MS C++ 2017 TESTS 14 62 819200 900
62991044 GlassesSnake A Oct. 20, 2019, 9:43 a.m. OK MS C++ 2017 TESTS 14 77 0 900
67682702 Fire_ass A Dec. 27, 2019, 7:15 a.m. OK MS C++ 2017 TESTS 14 77 0 900
67673047 Tangerine A Dec. 26, 2019, 10:01 p.m. OK MS C++ 2017 TESTS 14 77 0 900
63122013 DZY666 A Oct. 22, 2019, 11:36 a.m. OK MS C++ 2017 TESTS 14 77 0 900
62989804 TX1802FHT A Oct. 20, 2019, 9:38 a.m. OK MS C++ 2017 TESTS 14 77 0 900
62981993 succ1815406055 A Oct. 20, 2019, 9:17 a.m. OK MS C++ 2017 TESTS 14 77 0 900
63123213 ChaLemon A Oct. 22, 2019, noon OK MS C++ 2017 TESTS 14 78 0 900
63711890 dundae A Oct. 29, 2019, 10:20 a.m. OK MS C++ 2017 TESTS 14 78 0 900
64688727 hwangganzi A Nov. 11, 2019, 12:31 p.m. OK MS C++ 2017 TESTS 14 78 0 900
62983488 RohitKaushal A Oct. 20, 2019, 9:20 a.m. OK Node.js TESTS 14 218 25395200 900
63008515 OnTheWayToTop A Oct. 20, 2019, 11:03 a.m. OK Node.js TESTS 14 233 24678400 900
62988129 PAG A Oct. 20, 2019, 9:32 a.m. OK PascalABC.NET TESTS 14 498 409600 900
63769245 codeforceunit A Oct. 30, 2019, 7:21 a.m. OK PascalABC.NET TESTS 14 514 102400 900
62989499 Roman47 A Oct. 20, 2019, 9:37 a.m. OK PascalABC.NET TESTS 14 530 307200 900
65300152 Kiral55 A Nov. 18, 2019, 12:57 p.m. OK PHP TESTS 14 62 18432000 900
65238571 mayakin A Nov. 17, 2019, 8:07 a.m. OK PHP TESTS 14 77 16384000 900
62985392 injust A Oct. 20, 2019, 9:25 a.m. OK PyPy 2 TESTS 14 186 11059200 900
62982209 zaceleiseliakai A Oct. 20, 2019, 9:18 a.m. OK PyPy 2 TESTS 14 186 12390400 900
65753420 Gaurav1 A Nov. 26, 2019, 1:59 p.m. OK PyPy 2 TESTS 14 187 14233600 900
62980532 8e7 A Oct. 20, 2019, 9:15 a.m. OK PyPy 2 TESTS 14 217 10547200 900
62980676 not_original A Oct. 20, 2019, 9:15 a.m. OK PyPy 2 TESTS 14 249 9728000 900
62993228 nagitaosu A Oct. 20, 2019, 9:52 a.m. OK PyPy 3 TESTS 14 187 12902400 900
62981768 H4Wk3ye A Oct. 20, 2019, 9:17 a.m. OK PyPy 3 TESTS 14 264 16281600 900
64044425 vjudge1 A Nov. 1, 2019, 6:55 p.m. OK PyPy 3 TESTS 14 296 11776000 900
64044325 vjudge3 A Nov. 1, 2019, 6:53 p.m. OK PyPy 3 TESTS 14 296 14028800 900
65466113 Tihohon A Nov. 21, 2019, 6 a.m. OK PyPy 3 TESTS 14 296 14540800 900
64358115 Apale A Nov. 6, 2019, 10:55 a.m. OK PyPy 3 TESTS 14 296 14540800 900
64892707 Riolku A Nov. 14, 2019, 3:19 p.m. OK PyPy 3 TESTS 14 296 14643200 900
65569626 sanjailal4 A Nov. 23, 2019, 7:22 a.m. OK PyPy 3 TESTS 14 296 14745600 900
64043981 vjudge1 A Nov. 1, 2019, 6:47 p.m. OK PyPy 3 TESTS 14 311 11878400 900
66191305 Erzed A Dec. 2, 2019, 4:32 p.m. OK PyPy 3 TESTS 14 311 12492800 900
63362933 aaa_bbb_ccc A Oct. 25, 2019, 6:25 a.m. OK Python 2 TESTS 14 280 6348800 900
63130817 sirjan13 A Oct. 22, 2019, 2:08 p.m. OK Python 2 TESTS 14 280 7065600 900
63015516 anshuman16423 A Oct. 20, 2019, 12:48 p.m. OK Python 2 TESTS 14 280 7782400 900
63103628 perfectus A Oct. 22, 2019, 2:53 a.m. OK Python 2 TESTS 14 280 8499200 900
62989423 hritik3878 A Oct. 20, 2019, 9:36 a.m. OK Python 2 TESTS 14 295 7782400 900
63006038 runnphoenix A Oct. 20, 2019, 10:54 a.m. OK Python 2 TESTS 14 295 8601600 900
63212711 Madhur1906 A Oct. 23, 2019, 4:45 a.m. OK Python 2 TESTS 14 296 6860800 900
63014454 timaktimak A Oct. 20, 2019, 12:31 p.m. OK Python 2 TESTS 14 296 8294400 900
63016002 timaktimak A Oct. 20, 2019, 12:55 p.m. OK Python 2 TESTS 14 296 8499200 900
63239923 bhishma A Oct. 23, 2019, 1:12 p.m. OK Python 2 TESTS 14 311 7782400 900
63259233 Mehrdad_ravenS A Oct. 23, 2019, 7:28 p.m. OK Python 3 TESTS 14 186 8806400 900
62981300 amis_v A Oct. 20, 2019, 9:16 a.m. OK Python 3 TESTS 14 186 10547200 900
63259421 Mehrdad_ravenS A Oct. 23, 2019, 7:32 p.m. OK Python 3 TESTS 14 187 7372800 900
63026021 _IchBin_ A Oct. 20, 2019, 4:18 p.m. OK Python 3 TESTS 14 187 7475200 900
62981218 yamatoumi A Oct. 20, 2019, 9:16 a.m. OK Python 3 TESTS 14 187 7475200 900
63019969 rf0one A Oct. 20, 2019, 2:11 p.m. OK Python 3 TESTS 14 187 7577600 900
68330798 agresivebdfighter A Jan. 6, 2020, 6:42 p.m. OK Python 3 TESTS 14 187 7782400 900
63105373 RipityRapity A Oct. 22, 2019, 4:15 a.m. OK Python 3 TESTS 14 187 7782400 900
63302841 NikEvKuz A Oct. 24, 2019, 2:46 p.m. OK Python 3 TESTS 14 187 8704000 900
63033833 m7mdbadawy A Oct. 20, 2019, 7:42 p.m. OK Python 3 TESTS 14 187 10547200 900
63873120 Cpp A Oct. 30, 2019, 6:07 p.m. OK Ruby TESTS 14 342 21811200 900
62994975 BetBit A Oct. 20, 2019, 10 a.m. OK Rust TESTS 14 46 3174400 900
62988407 koka831 A Oct. 20, 2019, 9:33 a.m. OK Rust TESTS 14 46 3891200 900
63258108 fr0st A Oct. 23, 2019, 7 p.m. OK Rust TESTS 14 46 4300800 900
62983381 terraformer A Oct. 20, 2019, 9:20 a.m. OK Rust TESTS 14 61 4403200 900

remove filters

Back to search problems