Educational Codeforces Round 47 (Rated for 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
1009 Educational Codeforces Round 47 (Rated for Div. 2) FINISHED False 7200 205601063 July 14, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6296 ) D Relatively Prime Graph PROGRAMMING brute force constructive algorithms graphs greedy math 1700

B'Let 's call an undirected graph G = (V, E) relatively prime if and only if for each edge (v, u) in E GCD(v, u) = 1 (the greatest common divisor of v and u is 1 ). If there is no edge between some pair of vertices v and u then the value of GCD(v, u) doesn 't matter. The vertices are numbered from 1 to |V| . Construct a relatively prime graph with n vertices and m edges such that it is connected and it contains neither self-loops nor multiple edges. If there exists no valid graph with the given number of vertices and edges then output "Impossible". If there are multiple answers then print any of them. The only line contains two integers n and m ( 1 <= n, m <= 10^5 ) -- the number of vertices and the number of edges. If there exists no valid graph with the given number of vertices and edges then output "Impossible". Otherwise print the answer in the following format: The first line should contain the word "Possible". The i -th of the next m lines should contain the i -th edge (v_i, u_i) of the resulting graph ( 1 <= v_i, u_i <= n, v_i neq u_i ). For each pair (v, u) there can be no more pairs (v, u) or (u, v) . The vertices are numbered from 1 to n . If there are multiple answers then print any of them. Here is the representation of the graph from the first example: '...

Tutorials

60630

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40575942 rr_ D July 20, 2018, 11:15 a.m. OK D TESTS 52 62 4198400 1700
40570243 NSK D July 20, 2018, 7:45 a.m. OK FPC TESTS 52 202 819200 1700
40624862 Potassium D July 22, 2018, 5:16 a.m. OK FPC TESTS 52 202 819200 1700
40562499 __ShaW D July 20, 2018, 2:04 a.m. OK FPC TESTS 52 217 819200 1700
43414134 TShT D Sept. 25, 2018, 2:42 p.m. OK FPC TESTS 52 280 1638400 1700
43414080 TShT D Sept. 25, 2018, 2:42 p.m. OK FPC TESTS 52 280 1638400 1700
47247645 dlightny D Dec. 19, 2018, 6:42 a.m. OK FPC TESTS 52 327 819200 1700
40890201 yeapeen D July 28, 2018, 3:26 p.m. OK GNU C TESTS 52 46 819200 1700
40650662 abkafi D July 22, 2018, 9:04 p.m. OK GNU C TESTS 52 46 819200 1700
40401446 Marii D July 16, 2018, 7:49 a.m. OK GNU C TESTS 52 46 819200 1700
40360746 sansen D July 15, 2018, 1:03 a.m. OK GNU C TESTS 52 46 819200 1700
42089917 vjudge1 D Aug. 25, 2018, 12:41 p.m. OK GNU C++ TESTS 52 46 0 1700
41587140 CQUzbx D Aug. 14, 2018, 11:57 a.m. OK GNU C++ TESTS 52 46 0 1700
41587108 vjudge1 D Aug. 14, 2018, 11:56 a.m. OK GNU C++ TESTS 52 46 0 1700
41309491 CJSHP D Aug. 7, 2018, 3:03 p.m. OK GNU C++ TESTS 52 46 0 1700
40398257 ouuan D July 16, 2018, 6:25 a.m. OK GNU C++ TESTS 52 46 0 1700
40932973 _ShadowSong D July 30, 2018, 2:12 a.m. OK GNU C++ TESTS 52 46 614400 1700
40697738 _CZH D July 24, 2018, 8:52 a.m. OK GNU C++ TESTS 52 46 614400 1700
40622133 echr D July 22, 2018, 2:39 a.m. OK GNU C++ TESTS 52 46 614400 1700
40375634 huyufeifei D July 15, 2018, 10:51 a.m. OK GNU C++ TESTS 52 46 614400 1700
40362660 tanruidd D July 15, 2018, 2:58 a.m. OK GNU C++ TESTS 52 46 716800 1700
50612022 rainboy D Feb. 28, 2019, 5:21 p.m. OK GNU C11 TESTS 52 343 819200 1700
40366019 karam123 D July 15, 2018, 5:50 a.m. OK GNU C11 TESTS 52 467 819200 1700
40615211 WalkerYun D July 21, 2018, 5:40 p.m. OK GNU C11 TESTS 52 468 2560000 1700
43096831 Umi D Sept. 20, 2018, 1:01 a.m. OK GNU C++11 TESTS 52 31 1638400 1700
45918219 2016wudi D Nov. 18, 2018, 3:01 p.m. OK GNU C++11 TESTS 52 46 0 1700
41592109 Hagtaril D Aug. 14, 2018, 2:38 p.m. OK GNU C++11 TESTS 52 46 0 1700
40551699 vjudge5 D July 19, 2018, 2:53 p.m. OK GNU C++11 TESTS 52 46 0 1700
48444730 vjudge5 D Jan. 16, 2019, 6:48 a.m. OK GNU C++11 TESTS 52 46 0 1700
46001282 shubhamchandra D Nov. 20, 2018, 2:37 p.m. OK GNU C++11 TESTS 52 46 0 1700
62251970 iq90 D Oct. 10, 2019, 9:33 a.m. OK GNU C++11 TESTS 52 46 0 1700
57081069 vjudge2 D July 15, 2019, 7:14 a.m. OK GNU C++11 TESTS 52 46 614400 1700
45349285 da32s1da D Nov. 6, 2018, 6:25 a.m. OK GNU C++11 TESTS 52 46 614400 1700
43569464 LittleBeetle D Sept. 29, 2018, 12:22 p.m. OK GNU C++11 TESTS 52 46 614400 1700
42126735 famus2310 D Aug. 26, 2018, 3:44 p.m. OK GNU C++14 TESTS 52 31 819200 1700
41755624 ddolgu14 D Aug. 18, 2018, 11:53 a.m. OK GNU C++14 TESTS 52 31 819200 1700
41395016 hcmus_k14 D Aug. 9, 2018, 10:34 a.m. OK GNU C++14 TESTS 52 31 1126400 1700
40392033 1612190130 D July 16, 2018, 1:45 a.m. OK GNU C++14 TESTS 52 31 1433600 1700
40686224 totito D July 24, 2018, 2:20 a.m. OK GNU C++14 TESTS 52 31 1638400 1700
40595466 drrrzdk D July 21, 2018, 5:09 a.m. OK GNU C++14 TESTS 52 31 1638400 1700
40363224 wleung_bvg D July 15, 2018, 3:23 a.m. OK GNU C++14 TESTS 52 31 1638400 1700
40550973 Retro3014 D July 19, 2018, 2:26 p.m. OK GNU C++14 TESTS 52 31 1638400 1700
40373970 r_0_0_t D July 15, 2018, 9:45 a.m. OK GNU C++14 TESTS 52 31 1638400 1700
40373893 Avny D July 15, 2018, 9:42 a.m. OK GNU C++14 TESTS 52 31 1638400 1700
40563313 vjudge4 D July 20, 2018, 2:52 a.m. OK GNU C++17 TESTS 52 31 819200 1700
40373601 xielinhan D July 15, 2018, 9:30 a.m. OK GNU C++17 TESTS 52 31 819200 1700
40358015 Riz1Ahmed D July 14, 2018, 9:28 p.m. OK GNU C++17 TESTS 52 31 819200 1700
64327459 errorgorn D Nov. 5, 2019, 5:53 p.m. OK GNU C++17 TESTS 52 31 1638400 1700
40648181 Evocation D July 22, 2018, 6:07 p.m. OK GNU C++17 TESTS 52 31 3276800 1700
40495135 160930010 D July 18, 2018, 1:43 a.m. OK GNU C++17 TESTS 52 46 0 1700
40920050 Zihad_Bd D July 29, 2018, 2:06 p.m. OK GNU C++17 TESTS 52 46 0 1700
40862065 NicolasG D July 27, 2018, 10:57 p.m. OK GNU C++17 TESTS 52 46 0 1700
40550125 rabbitcxk D July 19, 2018, 1:53 p.m. OK GNU C++17 TESTS 52 46 0 1700
40386825 Hussien_Ibrahiem D July 15, 2018, 7:12 p.m. OK GNU C++17 TESTS 52 46 0 1700
40541140 Pinkman_ D July 19, 2018, 8:43 a.m. OK GNU C++17 Diagnostics TESTS 52 1325 3686400 1700
41280598 SolitaryWayfarer D Aug. 6, 2018, 4:03 p.m. OK Go TESTS 52 46 3276800 1700
40705824 cojna D July 24, 2018, 1:16 p.m. OK Haskell TESTS 52 93 33792000 1700
66520831 unicorn20141 D Dec. 8, 2019, 10:19 p.m. OK Java 8 TESTS 52 124 0 1700
56553512 mennafadali D July 5, 2019, 11:10 a.m. OK Java 8 TESTS 52 124 0 1700
40350608 Abdullah_Abu_Alrish D July 14, 2018, 5 p.m. OK Java 8 TESTS 52 124 0 1700
50614089 Dukkha D Feb. 28, 2019, 6:28 p.m. OK Java 8 TESTS 52 139 0 1700
40712375 pj21 D July 24, 2018, 4:52 p.m. OK Java 8 TESTS 52 139 0 1700
68033102 CodAR D Jan. 1, 2020, 10:29 a.m. OK Java 8 TESTS 52 140 0 1700
58892490 jenish9599 D Aug. 16, 2019, 6:15 a.m. OK Java 8 TESTS 52 140 0 1700
47385826 llamaoo7 D Dec. 23, 2018, 4:37 a.m. OK Java 8 TESTS 52 140 0 1700
40586929 di_halt D July 20, 2018, 6:21 p.m. OK Java 8 TESTS 52 140 0 1700
40575188 aabdelzaher D July 20, 2018, 10:52 a.m. OK Java 8 TESTS 52 140 0 1700
40389757 gabe D July 15, 2018, 10:39 p.m. OK JavaScript TESTS 52 436 9625600 1700
46306703 Killer45 D Nov. 28, 2018, 10:54 a.m. OK Kotlin TESTS 52 170 0 1700
40775942 user32 D July 26, 2018, 11:20 a.m. OK Kotlin TESTS 52 171 0 1700
57355305 og.kostya D July 20, 2019, 6 a.m. OK Mono C# TESTS 52 78 5324800 1700
40474787 YYOne D July 17, 2018, 11:21 a.m. OK Mono C# TESTS 52 108 8704000 1700
40474700 YYOne D July 17, 2018, 11:18 a.m. OK Mono C# TESTS 52 124 8601600 1700
41960095 chkhetiani D Aug. 22, 2018, 8:56 a.m. OK Mono C# TESTS 52 327 10240000 1700
48446268 vjudge4 D Jan. 16, 2019, 7:39 a.m. OK MS C++ TESTS 52 46 819200 1700
48497305 vjudge1 D Jan. 17, 2019, 1:30 p.m. OK MS C++ TESTS 52 46 819200 1700
48486614 vjudge4 D Jan. 17, 2019, 8:40 a.m. OK MS C++ TESTS 52 46 819200 1700
52305857 vjudge3 D April 4, 2019, 12:03 p.m. OK MS C++ TESTS 52 46 819200 1700
52370438 vjudge3 D April 6, 2019, 5:53 a.m. OK MS C++ TESTS 52 46 819200 1700
41342526 scorpiowf D Aug. 8, 2018, 2:13 p.m. OK MS C++ TESTS 52 46 1024000 1700
57083392 vjudge3 D July 15, 2019, 7:57 a.m. OK MS C++ TESTS 52 46 1433600 1700
40401585 j4357j D July 16, 2018, 7:53 a.m. OK MS C++ TESTS 52 46 1638400 1700
40572555 UminchuR D July 20, 2018, 8:57 a.m. OK MS C++ TESTS 52 46 2355200 1700
49896019 vjudge1 D Feb. 14, 2019, 6:58 a.m. OK MS C++ TESTS 52 46 2355200 1700
64182601 EDawn D Nov. 4, 2019, 2:16 a.m. OK MS C++ 2017 TESTS 52 62 819200 1700
59093383 pmitkov D Aug. 19, 2019, 1:25 p.m. OK MS C++ 2017 TESTS 52 62 2150400 1700
50804667 taolahung01 D March 5, 2019, 4:12 a.m. OK MS C++ 2017 TESTS 52 451 0 1700
50669230 g-m-blake D March 2, 2019, 6:09 a.m. OK MS C++ 2017 TESTS 52 451 2355200 1700
40366348 JhonTorres D July 15, 2018, 6:07 a.m. OK Node.js TESTS 52 1107 28979200 1700
40366427 sk0 D July 15, 2018, 6:09 a.m. OK Ocaml TESTS 52 140 2252800 1700
40354668 Arcadii D July 14, 2018, 7:10 p.m. OK PascalABC.NET TESTS 52 951 12595200 1700
40398208 takepan2 D July 16, 2018, 6:24 a.m. OK PHP TESTS 52 452 12595200 1700
40708391 Onesh0t D July 24, 2018, 2:29 p.m. OK PyPy 2 TESTS 52 1653 9011200 1700
40601790 MaxHo D July 21, 2018, 9 a.m. OK PyPy 3 TESTS 52 248 15564800 1700
59912468 youness.amhaouch D Sept. 2, 2019, 5:46 p.m. OK PyPy 3 TESTS 52 280 13619200 1700
54735967 Aidos D May 28, 2019, 4:57 a.m. OK PyPy 3 TESTS 52 296 12288000 1700
56373631 codershuvo D July 1, 2019, 5:26 a.m. OK PyPy 3 TESTS 52 296 13619200 1700
68414552 smart_hard D Jan. 8, 2020, 6:18 p.m. OK PyPy 3 TESTS 52 311 9216000 1700
42764281 overlordin777 D Sept. 11, 2018, 12:25 p.m. OK PyPy 3 TESTS 52 311 10035200 1700
40885897 gretel D July 28, 2018, 12:53 p.m. OK PyPy 3 TESTS 52 404 12185600 1700
59832744 FlyingBag65 D Sept. 1, 2019, 1:08 a.m. OK PyPy 3 TESTS 52 405 13209600 1700
67179706 deadguy D Dec. 18, 2019, 9:40 p.m. OK PyPy 3 TESTS 52 452 43929600 1700
48504885 noob77777 D Jan. 17, 2019, 5:08 p.m. OK Python 2 TESTS 52 374 8806400 1700
40362371 _____ D July 15, 2018, 2:43 a.m. OK Python 2 TESTS 52 390 5632000 1700
40497629 codercody D July 18, 2018, 3:27 a.m. OK Python 2 TESTS 52 420 15155200 1700
40409143 isgulkov D July 16, 2018, 11:32 a.m. OK Python 2 TESTS 52 436 6656000 1700
40517044 Lasers67 D July 18, 2018, 1:49 p.m. OK Python 2 TESTS 52 436 23654400 1700
40352667 wangkan2001 D July 14, 2018, 5:57 p.m. OK Python 2 TESTS 52 467 12902400 1700
40349883 sallyyao2001 D July 14, 2018, 4:48 p.m. OK Python 2 TESTS 52 467 12902400 1700
40687764 Andromedayu D July 24, 2018, 3:32 a.m. OK Python 2 TESTS 52 483 12800000 1700
40930630 ReaLNero1 D July 30, 2018, 12:04 a.m. OK Python 2 TESTS 52 499 9523200 1700
40367514 Ali_Pi D July 15, 2018, 6:39 a.m. OK Python 2 TESTS 52 499 9625600 1700
40370881 orailly D July 15, 2018, 8:08 a.m. OK Python 3 TESTS 52 202 8192000 1700
40351469 LionKing D July 14, 2018, 5:20 p.m. OK Python 3 TESTS 52 248 4403200 1700
40681152 Maaddy D July 23, 2018, 7:43 p.m. OK Python 3 TESTS 52 280 6963200 1700
48947376 Darkarchon D Jan. 25, 2019, 8:01 p.m. OK Python 3 TESTS 52 280 12083200 1700
40387215 Stephan D July 15, 2018, 7:35 p.m. OK Python 3 TESTS 52 420 3584000 1700
40963010 Rafaaaaaaaaaaaam D July 30, 2018, 10:10 a.m. OK Python 3 TESTS 52 436 2764800 1700
41307278 jojomobobo D Aug. 7, 2018, 1:46 p.m. OK Python 3 TESTS 52 607 6348800 1700
56373516 codershuvo D July 1, 2019, 5:21 a.m. OK Python 3 TESTS 52 608 8294400 1700
57376407 dhruvgolani D July 20, 2019, 12:45 p.m. OK Python 3 TESTS 52 623 6758400 1700
40443508 sonyckson D July 16, 2018, 4:27 p.m. OK Python 3 TESTS 52 670 6758400 1700
41463268 betrue12 D Aug. 11, 2018, 9:35 a.m. OK Ruby TESTS 52 249 21913600 1700
49168603 pschuprikov D Jan. 29, 2019, 5:19 p.m. OK Rust TESTS 52 982 1536000 1700

remove filters

Back to search problems