Codeforces Round 236 (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
402 Codeforces Round 236 (Div. 2) FINISHED False 7200 342455387 March 16, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5997 ) C Searching for Graph PROGRAMMING brute force constructive algorithms graphs 1500

B"Let's call an undirected graph of n vertices p-interesting, if the following conditions fulfill: A subgraph of a graph is some set of the graph vertices and some set of the graph edges. At that, the set of edges must meet the condition: both ends of each edge from the set must belong to the chosen set of vertices. Your task is to find a p-interesting graph consisting of n vertices. The first line contains a single integer t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895) -- the number of tests in the input. Next t lines each contains two space-separated integers: n, p (5 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8924; p xe2 x80 x89 xe2 x89 xa5 xe2 x80 x890; ) -- the number of vertices in the graph and the interest value for the appropriate test. It is guaranteed that the required graph exists. For each of the t tests print 2n xe2 x80 x89+ xe2 x80 x89p lines containing the description of the edges of a p-interesting graph: the i-th line must contain two space-separated integers ai, xe2 x80 x89bi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; ai xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89bi) -- two vertices, connected by an edge in the resulting graph. Consider the graph vertices numbered with integers from 1 to n. Print the answers to the tests in the order the tests occur in the input. If there are multiple solutions, you can print any of them."...

Tutorials

Editorial Codeforces Round #236

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46745844 saimanoj812 C Dec. 8, 2018, 6:45 a.m. OK Clang++17 Diagnostics TESTS 21 46 0 1500
46431762 manogna_sunkara C Dec. 1, 2018, 6:11 a.m. OK Clang++17 Diagnostics TESTS 21 46 0 1500
42222044 rr_ C Aug. 28, 2018, 9:40 p.m. OK D TESTS 21 15 4300800 1500
42222015 rr_ C Aug. 28, 2018, 9:38 p.m. OK D TESTS 21 31 4300800 1500
6102785 AHTuTTuTyX C March 22, 2014, 7:26 a.m. OK Delphi TESTS 21 15 0 1500
6048116 Misha100896 C March 16, 2014, 7:01 p.m. OK Delphi TESTS 21 31 0 1500
6032476 AMendel C March 16, 2014, 3:52 p.m. OK Delphi TESTS 21 31 102400 1500
6041427 timeas C March 16, 2014, 5:26 p.m. OK Delphi TESTS 21 46 0 1500
6037529 ruban C March 16, 2014, 4:41 p.m. OK Delphi TESTS 21 62 0 1500
12270584 VAVAvile C July 30, 2015, 2:11 a.m. OK FPC TESTS 21 15 0 1500
6959771 WARenie C June 25, 2014, 7:54 p.m. OK FPC TESTS 21 15 0 1500
6132138 DeWitt C March 24, 2014, 3:40 p.m. OK FPC TESTS 21 15 0 1500
6124876 Latens C March 23, 2014, 11:57 a.m. OK FPC TESTS 21 15 0 1500
6067653 BlueHya C March 19, 2014, 1:51 p.m. OK FPC TESTS 21 15 0 1500
6062404 AndrewVychev C March 18, 2014, 4:37 p.m. OK FPC TESTS 21 15 0 1500
6059549 HaRiSK C March 18, 2014, 7:32 a.m. OK FPC TESTS 21 15 0 1500
6059523 huyntptnk C March 18, 2014, 7:18 a.m. OK FPC TESTS 21 15 0 1500
6055648 ZeRoGerc C March 17, 2014, 1:53 p.m. OK FPC TESTS 21 15 0 1500
6053808 graceoflives C March 17, 2014, 10:07 a.m. OK FPC TESTS 21 15 0 1500
16324220 OsamaFathy C Feb. 25, 2016, 9:57 a.m. OK GNU C TESTS 21 15 0 1500
11968642 sanketM C July 8, 2015, 7:40 a.m. OK GNU C TESTS 21 15 0 1500
11414828 ving.xia C June 4, 2015, 2:27 p.m. OK GNU C TESTS 21 15 0 1500
11407782 optimus___prime C June 3, 2015, 11:52 p.m. OK GNU C TESTS 21 15 0 1500
9287156 NAKATA C Dec. 27, 2014, 8:45 p.m. OK GNU C TESTS 21 15 0 1500
8758357 abcde12345 C Nov. 19, 2014, 6:56 p.m. OK GNU C TESTS 21 15 0 1500
7050347 vjudge3 C July 9, 2014, 3:35 a.m. OK GNU C TESTS 21 15 0 1500
6415429 ckeling C April 19, 2014, 5:42 a.m. OK GNU C TESTS 21 15 0 1500
6302004 shubhangipri C April 8, 2014, 6:39 p.m. OK GNU C TESTS 21 15 0 1500
6198048 WCED C March 31, 2014, 1:25 p.m. OK GNU C TESTS 21 15 0 1500
39750319 yolo_5590 C June 28, 2018, 5:55 p.m. OK GNU C++ TESTS 21 15 0 1500
39748954 vjudge4 C June 28, 2018, 4:52 p.m. OK GNU C++ TESTS 21 15 0 1500
39339610 vjudge2 C June 17, 2018, 4:09 p.m. OK GNU C++ TESTS 21 15 0 1500
30970681 ziad.khobeiz C Oct. 3, 2017, 2:52 p.m. OK GNU C++ TESTS 21 15 0 1500
30898322 rc_4594 C Oct. 1, 2017, 4:43 a.m. OK GNU C++ TESTS 21 15 0 1500
29962456 vjudge4 C Sept. 1, 2017, 1:23 a.m. OK GNU C++ TESTS 21 15 0 1500
27660376 walaa.khafagy C June 8, 2017, 12:12 a.m. OK GNU C++ TESTS 21 15 0 1500
27616738 flyingzen C June 6, 2017, 3:03 p.m. OK GNU C++ TESTS 21 15 0 1500
26915321 sergiogyoz C May 7, 2017, 3:50 a.m. OK GNU C++ TESTS 21 15 0 1500
22901784 uma2609 C Dec. 12, 2016, 10:43 a.m. OK GNU C++ TESTS 21 15 0 1500
9959886 nitinj C Feb. 22, 2015, 1:54 p.m. OK GNU C++0x TESTS 21 15 0 1500
9947215 dredwerkz C Feb. 21, 2015, 11:01 a.m. OK GNU C++0x TESTS 21 15 0 1500
9793934 Khaled91 C Feb. 10, 2015, 11:33 p.m. OK GNU C++0x TESTS 21 15 0 1500
9724222 urusant C Feb. 5, 2015, 7:06 a.m. OK GNU C++0x TESTS 21 15 0 1500
9549900 MohamadAdel C Jan. 25, 2015, 2:14 p.m. OK GNU C++0x TESTS 21 15 0 1500
9506376 KhaledKEE C Jan. 22, 2015, 9:19 p.m. OK GNU C++0x TESTS 21 15 0 1500
9162572 JohStraat C Dec. 17, 2014, 2:22 p.m. OK GNU C++0x TESTS 21 15 0 1500
9153835 T0RRES C Dec. 16, 2014, 4:31 p.m. OK GNU C++0x TESTS 21 15 0 1500
8929036 qwertyuiop C Dec. 2, 2014, 8:07 a.m. OK GNU C++0x TESTS 21 15 0 1500
8928988 CMaster C Dec. 2, 2014, 8 a.m. OK GNU C++0x TESTS 21 15 0 1500
50808227 luogu_bot4 C March 5, 2019, 6:57 a.m. OK GNU C++11 TESTS 21 15 0 1500
50808203 vjudge4 C March 5, 2019, 6:56 a.m. OK GNU C++11 TESTS 21 15 0 1500
50664072 vjudge1 C March 2, 2019, 2:30 a.m. OK GNU C++11 TESTS 21 15 0 1500
50663493 vjudge2 C March 2, 2019, 1:56 a.m. OK GNU C++11 TESTS 21 15 0 1500
50662814 vjudge5 C March 2, 2019, 1:19 a.m. OK GNU C++11 TESTS 21 15 0 1500
50662790 vjudge2 C March 2, 2019, 1:17 a.m. OK GNU C++11 TESTS 21 15 0 1500
44888708 Hejita C Oct. 26, 2018, 1:12 a.m. OK GNU C++11 TESTS 21 15 0 1500
31982303 detamos C Nov. 2, 2017, 1:56 p.m. OK GNU C++11 TESTS 21 15 0 1500
30990870 lavee.singh C Oct. 4, 2017, 11:46 a.m. OK GNU C++11 TESTS 21 15 0 1500
30698166 rohan23chhabra C Sept. 25, 2017, 8:03 a.m. OK GNU C++11 TESTS 21 15 0 1500
67934766 Mel1odas C Dec. 29, 2019, 7:36 p.m. OK GNU C++14 TESTS 21 15 0 1500
66417511 Omar_Elaraby C Dec. 6, 2019, 5:38 p.m. OK GNU C++14 TESTS 21 15 0 1500
65603110 Tanmoy_Datta C Nov. 23, 2019, 7:05 p.m. OK GNU C++14 TESTS 21 15 0 1500
65601361 raju95 C Nov. 23, 2019, 6:13 p.m. OK GNU C++14 TESTS 21 15 0 1500
60917502 Ola.Abdallah C Sept. 20, 2019, 9 a.m. OK GNU C++14 TESTS 21 15 0 1500
57631168 2017ccut_wuqishuo C July 24, 2019, 8:48 a.m. OK GNU C++14 TESTS 21 15 0 1500
57612533 7amasa C July 23, 2019, 10:09 p.m. OK GNU C++14 TESTS 21 15 0 1500
55927997 Gankutsuou C June 22, 2019, 10:11 a.m. OK GNU C++14 TESTS 21 15 0 1500
55716600 sawhil C June 18, 2019, 1:02 p.m. OK GNU C++14 TESTS 21 15 0 1500
54861388 soba C May 31, 2019, 2:21 a.m. OK GNU C++14 TESTS 21 15 0 1500
68229411 jignesh1604 C Jan. 5, 2020, 8:36 a.m. OK GNU C++17 TESTS 21 15 0 1500
62312095 nksx C Oct. 10, 2019, 2:12 p.m. OK GNU C++17 TESTS 21 15 0 1500
61035756 codetiger099 C Sept. 21, 2019, 7:45 p.m. OK GNU C++17 TESTS 21 15 0 1500
59835222 zoro25 C Sept. 1, 2019, 3:25 a.m. OK GNU C++17 TESTS 21 15 0 1500
58222933 charity C Aug. 3, 2019, 1:18 p.m. OK GNU C++17 TESTS 21 15 0 1500
58189185 anujsingh14 C Aug. 2, 2019, 6:35 p.m. OK GNU C++17 TESTS 21 15 0 1500
57906088 Abdelrahman_Mohammed C July 28, 2019, 5:41 p.m. OK GNU C++17 TESTS 21 15 0 1500
55403018 vss16996 C June 10, 2019, 3 p.m. OK GNU C++17 TESTS 21 15 0 1500
54386852 vjudge1 C May 19, 2019, 1:51 p.m. OK GNU C++17 TESTS 21 15 0 1500
51830483 ahmedibrahim404 C March 25, 2019, 3:57 p.m. OK GNU C++17 TESTS 21 15 0 1500
8067662 7rx C Oct. 3, 2014, 11 a.m. OK Go TESTS 21 30 0 1500
8036861 rizalgow C Sept. 30, 2014, 1:49 p.m. OK Go TESTS 21 30 0 1500
6051627 AcOnFingers C March 17, 2014, 2:53 a.m. OK Go TESTS 21 30 0 1500
8175056 sadewa C Oct. 11, 2014, 1:17 p.m. OK Go TESTS 21 31 0 1500
6036180 y111 C March 16, 2014, 4:26 p.m. OK Go TESTS 21 31 0 1500
8082268 kaiysh C Oct. 5, 2014, 5:14 a.m. OK Go TESTS 21 46 0 1500
8042069 arnoldjulians C Oct. 1, 2014, 2:37 a.m. OK Go TESTS 21 46 102400 1500
8064112 Michael542 C Oct. 3, 2014, 1:06 a.m. OK Go TESTS 21 62 0 1500
6036205 autotaker C March 16, 2014, 4:27 p.m. OK Haskell TESTS 21 31 0 1500
63761704 zekigurbuz C Oct. 30, 2019, 4:12 a.m. OK Java 11 TESTS 21 202 0 1500
6126427 slycelote C March 23, 2014, 4:14 p.m. OK Java 6 TESTS 21 62 204800 1500
6096883 mashinist C March 21, 2014, 7:28 a.m. OK Java 6 TESTS 21 62 204800 1500
6053965 alibaba C March 17, 2014, 10:37 a.m. OK Java 6 TESTS 21 62 204800 1500
9342333 xiaowuc1 C Jan. 1, 2015, 10:45 p.m. OK Java 6 TESTS 21 77 0 1500
7732267 maitony C Sept. 10, 2014, 4:09 a.m. OK Java 6 TESTS 21 77 0 1500
6104701 GR1n C March 22, 2014, 11:51 a.m. OK Java 6 TESTS 21 77 204800 1500
6097877 deepshine C March 21, 2014, 11:01 a.m. OK Java 6 TESTS 21 78 204800 1500
6067272 uuisafresh C March 19, 2014, 1:04 p.m. OK Java 6 TESTS 21 93 204800 1500
6039986 rudolf C March 16, 2014, 5:10 p.m. OK Java 6 TESTS 21 93 307200 1500
6036746 g_vk C March 16, 2014, 4:32 p.m. OK Java 6 TESTS 21 108 204800 1500
6246255 OKA_1010 C April 3, 2014, 12:02 a.m. OK Java 7 TESTS 21 62 0 1500
6056212 alexey.kasatkin C March 17, 2014, 3:26 p.m. OK Java 7 TESTS 21 62 0 1500
6035191 aladdin3 C March 16, 2014, 4:16 p.m. OK Java 7 TESTS 21 62 0 1500
6034876 bluepichu C March 16, 2014, 4:14 p.m. OK Java 7 TESTS 21 62 0 1500
8351499 x_x_z C Oct. 22, 2014, 12:18 p.m. OK Java 7 TESTS 21 77 0 1500
7329781 upsolving C Aug. 2, 2014, 3:10 p.m. OK Java 7 TESTS 21 77 0 1500
7003583 asheshvidyut C July 3, 2014, 10:42 a.m. OK Java 7 TESTS 21 77 0 1500
6715681 Javanochka C May 26, 2014, 1:06 p.m. OK Java 7 TESTS 21 77 0 1500
6068051 dwoolley3 C March 19, 2014, 3:07 p.m. OK Java 7 TESTS 21 77 0 1500
6067569 mohamednabil00000 C March 19, 2014, 1:39 p.m. OK Java 7 TESTS 21 77 0 1500
25419618 Hoda_Hisham C March 11, 2017, 9:51 p.m. OK Java 8 TESTS 21 108 20377600 1500
68363281 Baroudy C Jan. 7, 2020, 2:56 p.m. OK Java 8 TESTS 21 109 0 1500
66959346 mennafadali C Dec. 15, 2019, 10:41 a.m. OK Java 8 TESTS 21 109 0 1500
57780720 hasan5788 C July 26, 2019, 5:51 a.m. OK Java 8 TESTS 21 109 0 1500
54880686 lebaur C May 31, 2019, 2:09 p.m. OK Java 8 TESTS 21 109 0 1500
48113921 Anonymous C Jan. 9, 2019, 11:24 a.m. OK Java 8 TESTS 21 109 0 1500
45316294 sameer_hack C Nov. 5, 2018, 8:13 a.m. OK Java 8 TESTS 21 109 0 1500
30773501 zodiacleo C Sept. 27, 2017, 10:03 a.m. OK Java 8 TESTS 21 109 0 1500
20563654 anuj64 C Sept. 13, 2016, 9:34 a.m. OK Java 8 TESTS 21 109 0 1500
18598334 osama.alb96 C June 19, 2016, 1:10 p.m. OK Java 8 TESTS 21 109 0 1500
6036649 LowB C March 16, 2014, 4:31 p.m. OK JavaScript TESTS 21 78 0 1500
6036953 kvart714 C March 16, 2014, 4:34 p.m. OK MS C# TESTS 21 46 102400 1500
6477287 antofik C April 26, 2014, 7:10 a.m. OK MS C# TESTS 21 61 2252800 1500
6036722 sanyo.gorbunov C March 16, 2014, 4:31 p.m. OK MS C# TESTS 21 62 102400 1500
6096392 azukun C March 21, 2014, 5:14 a.m. OK MS C# TESTS 21 62 512000 1500
9773160 Encse C Feb. 8, 2015, 4:34 p.m. OK MS C# TESTS 21 62 2150400 1500
17764905 Mem C May 6, 2016, 4:12 p.m. OK MS C# TESTS 21 62 11571200 1500
6039992 kasarino C March 16, 2014, 5:10 p.m. OK MS C# TESTS 21 77 204800 1500
6038448 hadiaminiv C March 16, 2014, 4:51 p.m. OK MS C# TESTS 21 77 2150400 1500
6817016 og.kostya C June 5, 2014, 5:28 a.m. OK MS C# TESTS 21 93 204800 1500
8882483 megaspazz C Nov. 28, 2014, 7:02 p.m. OK MS C# TESTS 21 108 3993600 1500
20827167 customer101 C Sept. 22, 2016, 9:51 p.m. OK MS C++ TESTS 21 15 0 1500
15211931 Adai_is C Jan. 6, 2016, 4:18 p.m. OK MS C++ TESTS 21 15 0 1500
10667011 Dv0rec C April 12, 2015, 12:37 p.m. OK MS C++ TESTS 21 15 0 1500
10636017 vjudge2 C April 9, 2015, 2:09 a.m. OK MS C++ TESTS 21 15 0 1500
8992937 Nicky94 C Dec. 5, 2014, 4:04 p.m. OK MS C++ TESTS 21 15 0 1500
8895198 BayHarborButcher C Nov. 30, 2014, 3:19 a.m. OK MS C++ TESTS 21 15 0 1500
8895155 Alex7 C Nov. 30, 2014, 3:09 a.m. OK MS C++ TESTS 21 15 0 1500
8748388 Agabek C Nov. 18, 2014, 4:22 p.m. OK MS C++ TESTS 21 15 0 1500
8697572 NVAL C Nov. 14, 2014, 7:23 p.m. OK MS C++ TESTS 21 15 0 1500
7409232 laiba2004 C Aug. 10, 2014, 12:48 a.m. OK MS C++ TESTS 21 15 0 1500
63736414 felix412441 C Oct. 29, 2019, 3:27 p.m. OK MS C++ 2017 TESTS 21 31 0 1500
61043989 vjudge2 C Sept. 22, 2019, 3:05 a.m. OK MS C++ 2017 TESTS 21 31 0 1500
56781396 Natali1 C July 10, 2019, 6:25 a.m. OK MS C++ 2017 TESTS 21 31 0 1500
69584404 Yomapeed C Jan. 26, 2020, 6:46 p.m. OK MS C++ 2017 TESTS 21 31 307200 1500
6053172 rsFalse C March 17, 2014, 8:16 a.m. OK Perl TESTS 21 15 0 1500
6053216 rsFalse C March 17, 2014, 8:24 a.m. OK Perl TESTS 21 30 0 1500
27325857 Yash_ C May 24, 2017, 8:08 p.m. OK PyPy 2 TESTS 21 78 307200 1500
56612384 Mr.Inconsistent C July 6, 2019, 7:57 a.m. OK PyPy 3 TESTS 21 140 3072000 1500
53591344 limabeans C May 1, 2019, 12:01 a.m. OK PyPy 3 TESTS 21 155 1740800 1500
65153049 durgesh30508 C Nov. 16, 2019, 8:17 a.m. OK PyPy 3 TESTS 21 155 3276800 1500
69676897 beethoven97 C Jan. 28, 2020, 2:31 p.m. OK PyPy 3 TESTS 21 156 3174400 1500
68070609 slam3085 C Jan. 2, 2020, 10:06 a.m. OK PyPy 3 TESTS 21 156 3276800 1500
11520449 engarde C June 10, 2015, 11:25 a.m. OK Python 2 TESTS 21 46 0 1500
9273439 Lei_Xufei C Dec. 26, 2014, 7:25 a.m. OK Python 2 TESTS 21 46 0 1500
7679557 LouisCK C Sept. 4, 2014, 7:09 a.m. OK Python 2 TESTS 21 46 0 1500
7679359 LouisCK C Sept. 4, 2014, 6:40 a.m. OK Python 2 TESTS 21 46 0 1500
6060720 hhddff C March 18, 2014, 12:03 p.m. OK Python 2 TESTS 21 46 0 1500
6034097 kryzius C March 16, 2014, 4:07 p.m. OK Python 2 TESTS 21 46 0 1500
6034078 Martial C March 16, 2014, 4:06 p.m. OK Python 2 TESTS 21 46 0 1500
6032680 TonyJiang C March 16, 2014, 3:54 p.m. OK Python 2 TESTS 21 46 0 1500
33498161 ytz123 C Dec. 22, 2017, 8:25 a.m. OK Python 2 TESTS 21 46 4608000 1500
10825884 gkeesh7 C April 22, 2015, 4:38 p.m. OK Python 2 TESTS 21 46 4608000 1500
11958924 pikmike C July 7, 2015, 10:42 a.m. OK Python 3 TESTS 21 46 0 1500
30049473 omid_gh C Sept. 4, 2017, 8:40 a.m. OK Python 3 TESTS 21 62 0 1500
26992767 vjudge4 C May 10, 2017, 9:09 a.m. OK Python 3 TESTS 21 62 0 1500
26914207 PachoMayorga C May 7, 2017, 1:23 a.m. OK Python 3 TESTS 21 62 0 1500
10544174 merolish C April 1, 2015, 5:03 p.m. OK Python 3 TESTS 21 62 0 1500
9266550 CHVRCHES C Dec. 25, 2014, 10:51 a.m. OK Python 3 TESTS 21 62 0 1500
7931319 AbdoA2 C Sept. 23, 2014, 9:30 p.m. OK Python 3 TESTS 21 62 0 1500
6510125 yugle7 C April 30, 2014, 11:18 a.m. OK Python 3 TESTS 21 62 0 1500
6058499 antonydeepak C March 18, 2014, 1:16 a.m. OK Python 3 TESTS 21 62 0 1500
6051340 acafterwa C March 17, 2014, 1:47 a.m. OK Python 3 TESTS 21 62 0 1500
6053310 rsFalse C March 17, 2014, 8:42 a.m. OK Ruby TESTS 21 62 204800 1500
35870125 ______u______ C March 3, 2018, 6:22 a.m. OK Ruby TESTS 21 62 6553600 1500
35864234 ______n______ C March 2, 2018, 11:04 p.m. OK Ruby TESTS 21 62 6553600 1500
35863829 _____i_____ C March 2, 2018, 10:55 p.m. OK Ruby TESTS 21 62 6553600 1500
35863787 _____k_____ C March 2, 2018, 10:53 p.m. OK Ruby TESTS 21 62 6553600 1500
35860780 ______k______ C March 2, 2018, 9:49 p.m. OK Ruby TESTS 21 62 6553600 1500
35860767 ______h______ C March 2, 2018, 9:49 p.m. OK Ruby TESTS 21 62 6553600 1500
35860249 ______i______ C March 2, 2018, 9:37 p.m. OK Ruby TESTS 21 62 6553600 1500
35858712 ______M______ C March 2, 2018, 9:05 p.m. OK Ruby TESTS 21 62 6553600 1500

remove filters

Back to search problems