Codeforces Round 383 (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
741 Codeforces Round 383 (Div. 1) FINISHED False 7200 250788299 Dec. 6, 2016, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2637 ) C Arpa’s overnight party and Mehrdad’s silent entering PROGRAMMING constructive algorithms dfs and similar graphs 2600

B"Note that girls in Arpa xe2 x80 x99s land are really attractive. Arpa loves overnight parties. In the middle of one of these parties Mehrdad suddenly appeared. He saw n pairs of friends sitting around a table. i-th pair consisted of a boy, sitting on the ai-th chair, and his girlfriend, sitting on the bi-th chair. The chairs were numbered 1 through 2n in clockwise direction. There was exactly one person sitting on each chair. There were two types of food: Kooft and Zahre-mar. Now Mehrdad wonders, was there any way to serve food for the guests such that: Find the answer for the Mehrdad question. If it was possible, find some arrangement of food types that satisfies the conditions. The first line contains an integer n (1 xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89n xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89105) -- the number of pairs of guests. The i-th of the next n lines contains a pair of integers ai and bi (1 xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x892n) -- the number of chair on which the boy in the i-th pair was sitting and the number of chair on which his girlfriend was sitting. It's guaranteed that there was exactly one person sitting on each chair. If there is no solution, print -1. Otherwise print n lines, the i-th of them should contain two integers which represent the type of food for the i-th pair. The first integer in the line is the type of food the boy had, and the second integer is the type of food the girl had. If someone had Kooft, print 1, otherwise print 2. If there are multiple solutions, print any of them. "...

Tutorials

Codeforces Round #383 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
22755882 Gassa C Dec. 6, 2016, 4:05 p.m. OK D TESTS 94 202 14745600 2600
23033211 StarScreamOwl C Dec. 16, 2016, 3:44 p.m. OK Delphi TESTS 94 93 40857600 2600
23078411 s34vv1nd C Dec. 18, 2016, 6:53 a.m. OK FPC TESTS 94 234 8908800 2600
23022931 ngattaro1 C Dec. 16, 2016, 6:01 a.m. OK FPC TESTS 94 265 11980800 2600
40509404 Scut82 C July 18, 2018, 10:11 a.m. OK GNU C++ TESTS 94 31 3993600 2600
22810730 Ajatar C Dec. 8, 2016, 1:13 p.m. OK GNU C++ TESTS 94 31 6656000 2600
29728563 Chenhongkan C Aug. 24, 2017, 10:28 a.m. OK GNU C++ TESTS 94 31 8806400 2600
27277522 SW_Wind C May 22, 2017, 5:35 a.m. OK GNU C++ TESTS 94 46 2457600 2600
40515582 Scut82 C July 18, 2018, 1:11 p.m. OK GNU C++ TESTS 94 46 3276800 2600
40513446 Scut82 C July 18, 2018, 12:12 p.m. OK GNU C++ TESTS 94 46 3276800 2600
29822586 Merln C Aug. 27, 2017, 9:07 a.m. OK GNU C++ TESTS 94 46 4096000 2600
22942584 ShinFeb C Dec. 14, 2016, 6:17 a.m. OK GNU C++ TESTS 94 46 4812800 2600
23672483 Dylans C Jan. 10, 2017, 12:30 a.m. OK GNU C++ TESTS 94 46 6860800 2600
30289965 bestFy C Sept. 12, 2017, 3:30 p.m. OK GNU C++ TESTS 94 46 7168000 2600
61450821 star_magic_young C Sept. 29, 2019, 2:32 a.m. OK GNU C++11 TESTS 94 46 2457600 2600
61449681 star_magic_young C Sept. 29, 2019, 1:18 a.m. OK GNU C++11 TESTS 94 46 2457600 2600
27277540 SW_Wind C May 22, 2017, 5:37 a.m. OK GNU C++11 TESTS 94 46 2457600 2600
22753330 jcvb C Dec. 6, 2016, 3:51 p.m. OK GNU C++11 TESTS 94 46 4710400 2600
22762309 morejarphone C Dec. 6, 2016, 5:03 p.m. OK GNU C++11 TESTS 94 46 11059200 2600
44697407 tianyi_luo C Oct. 22, 2018, 1:29 p.m. OK GNU C++11 TESTS 94 46 22425600 2600
40114618 yanyidu C July 9, 2018, 1:51 p.m. OK GNU C++11 TESTS 94 46 201216000 2600
30288514 zykzhenshuai C Sept. 12, 2017, 2:17 p.m. OK GNU C++11 TESTS 94 61 11366400 2600
33978278 cuizhuyefei C Jan. 7, 2018, 7:41 a.m. OK GNU C++11 TESTS 94 61 26214400 2600
54503690 WOSHIGEPACHONG2 C May 23, 2019, 1:24 a.m. OK GNU C++11 TESTS 94 62 2457600 2600
22747481 OnionPringles C Dec. 6, 2016, 3:24 p.m. OK GNU C++14 TESTS 94 62 5939200 2600
60774213 iotang C Sept. 18, 2019, 1:46 p.m. OK GNU C++14 TESTS 94 62 16076800 2600
26937873 Mohinem C May 7, 2017, 5:29 p.m. OK GNU C++14 TESTS 94 77 4812800 2600
23201496 HaiDang2001VN C Dec. 21, 2016, 2:28 p.m. OK GNU C++14 TESTS 94 77 5120000 2600
22776732 2015190026 C Dec. 7, 2016, 5:29 a.m. OK GNU C++14 TESTS 94 77 5120000 2600
22771999 Ra16bit C Dec. 6, 2016, 11:11 p.m. OK GNU C++14 TESTS 94 77 5120000 2600
27011344 square1001 C May 11, 2017, 11:47 a.m. OK GNU C++14 TESTS 94 77 5529600 2600
57351724 KevinWan C July 20, 2019, 4:05 a.m. OK GNU C++14 TESTS 94 77 5632000 2600
22878362 NiroBC C Dec. 11, 2016, 12:44 p.m. OK GNU C++14 TESTS 94 78 3174400 2600
23613510 -XraY- C Jan. 6, 2017, 9:48 p.m. OK GNU C++14 TESTS 94 78 3891200 2600
37239089 q234rty C April 12, 2018, 4:37 a.m. OK GNU C++17 TESTS 94 62 22937600 2600
53896156 HIT_Attacker C May 9, 2019, 6:06 a.m. OK GNU C++17 TESTS 94 92 12800000 2600
43577835 XTyuan C Sept. 29, 2018, 3:50 p.m. OK GNU C++17 TESTS 94 93 2457600 2600
57302053 Vexoben C July 19, 2019, 12:50 a.m. OK GNU C++17 TESTS 94 93 6348800 2600
64613044 user202729_ C Nov. 10, 2019, 3 a.m. OK GNU C++17 TESTS 94 93 6553600 2600
41401365 tkj C Aug. 9, 2018, 1:53 p.m. OK GNU C++17 TESTS 94 93 13619200 2600
61605963 31415926535x C Oct. 1, 2019, 12:41 p.m. OK GNU C++17 TESTS 94 93 14848000 2600
66550754 krazy ZXyang HeRaNO C Dec. 9, 2019, 2:49 p.m. OK GNU C++17 TESTS 94 93 39526400 2600
56533147 shubham__36 C July 4, 2019, 9:17 p.m. OK GNU C++17 TESTS 94 109 6451200 2600
41934638 2002chenhan C Aug. 21, 2018, 12:18 p.m. OK GNU C++17 TESTS 94 109 13619200 2600
22813449 Junior94 C Dec. 8, 2016, 3:10 p.m. OK Go TESTS 94 124 39424000 2600
22847169 tangbingchang C Dec. 10, 2016, 2:19 a.m. OK Go TESTS 94 560 62771200 2600
22849675 digiter C Dec. 10, 2016, 6:59 a.m. OK Go TESTS 94 639 47104000 2600
22829251 tangbingchang C Dec. 9, 2016, 8:51 a.m. OK Go TESTS 94 780 66150400 2600
22834869 fnch C Dec. 9, 2016, 1:40 p.m. OK Java 8 TESTS 94 186 0 2600
22762606 darnley C Dec. 6, 2016, 5:07 p.m. OK Java 8 TESTS 94 186 20684800 2600
22834755 fnch C Dec. 9, 2016, 1:36 p.m. OK Java 8 TESTS 94 187 0 2600
23871212 alexrcoleman C Jan. 16, 2017, 2:08 a.m. OK Java 8 TESTS 94 202 20480000 2600
22763385 uwi C Dec. 6, 2016, 5:16 p.m. OK Java 8 TESTS 94 202 28364800 2600
24256801 IgorKoval C Jan. 29, 2017, 10:28 p.m. OK Java 8 TESTS 94 202 54374400 2600
24256788 IgorKoval C Jan. 29, 2017, 10:27 p.m. OK Java 8 TESTS 94 233 44748800 2600
24256769 IgorKoval C Jan. 29, 2017, 10:25 p.m. OK Java 8 TESTS 94 233 49664000 2600
22912409 trudwick C Dec. 12, 2016, 7:34 p.m. OK Java 8 TESTS 94 234 0 2600
22785712 hama-du C Dec. 7, 2016, 12:39 p.m. OK Java 8 TESTS 94 514 45875200 2600
22834102 AnatolyTolstobrov C Dec. 9, 2016, 1:06 p.m. OK MS C# TESTS 94 108 9420800 2600
22834151 AnatolyTolstobrov C Dec. 9, 2016, 1:08 p.m. OK MS C# TESTS 94 109 9011200 2600
23112526 bloodbound C Dec. 18, 2016, 6:12 p.m. OK MS C# TESTS 94 654 60108800 2600
22815371 666qwerty C Dec. 8, 2016, 4:36 p.m. OK MS C++ TESTS 94 62 2969600 2600
23010322 TonySnark C Dec. 15, 2016, 3:15 p.m. OK MS C++ TESTS 94 156 12800000 2600
22773944 LLI_E_P_JI_O_K C Dec. 7, 2016, 2:28 a.m. OK MS C++ TESTS 94 156 43110400 2600
22946503 AleksanderBalobanov C Dec. 14, 2016, 10:55 a.m. OK MS C++ TESTS 94 186 31334400 2600
23939687 vjudge3 C Jan. 19, 2017, 8:10 a.m. OK MS C++ TESTS 94 218 15155200 2600
47516136 wladekp C Dec. 26, 2018, 10:03 a.m. OK MS C++ TESTS 94 280 12902400 2600
22762022 Ancient_mage C Dec. 6, 2016, 4:59 p.m. OK MS C++ TESTS 94 530 16076800 2600
24486511 brodyga_45BlyaRomaUmer C Feb. 7, 2017, 11:13 a.m. OK MS C++ TESTS 94 577 16588800 2600
22781327 Deamon C Dec. 7, 2016, 9:23 a.m. OK MS C++ TESTS 94 608 6041600 2600
22784525 gleb.astashkin C Dec. 7, 2016, 11:53 a.m. OK MS C++ TESTS 94 623 32563200 2600
69546434 czyer C Jan. 26, 2020, 3:11 a.m. OK MS C++ 2017 TESTS 94 109 19968000 2600
24276956 Heisenbug C Jan. 30, 2017, 8:20 p.m. OK Ocaml TESTS 94 108 6963200 2600
60082536 anshuman16423 C Sept. 5, 2019, 2:32 p.m. OK PyPy 2 TESTS 94 873 30412800 2600
22770741 cugel C Dec. 6, 2016, 9:25 p.m. OK PyPy 3 TESTS 94 452 33280000 2600
23044496 cugel C Dec. 17, 2016, 10:23 a.m. OK PyPy 3 TESTS 94 717 9523200 2600
22772324 Neumann C Dec. 6, 2016, 11:51 p.m. OK Python 2 TESTS 94 982 36454400 2600

remove filters

Back to search problems