ICM Technex 2017 and Codeforces Round 400 (Div. 1 + Div. 2, combined)

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
776 ICM Technex 2017 and Codeforces Round 400 (Div. 1 + Div. 2, combined) FINISHED False 7800 288544523 Feb. 23, 2017, 2:45 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 511 ) F Sherlock's bet to Moriarty PROGRAMMING constructive algorithms data structures divide and conquer geometry graphs implementation trees 2700

Sherlock met Moriarty for a final battle of wits. He gave him a regular n sided convex polygon. In addition to it, he gave him certain diagonals to form regions on the polygon. It was guaranteed that the diagonals did not intersect in interior points. He took each of the region and calculated its importance value. Importance value for a region formed by vertices a 1 , a 2 , ... , a x of the polygon will be given by 2 a 1 + 2 a 2 + ... + 2 a x . Then, he sorted these regions on the basis of their importance value in ascending order. After that he assigned each region an index from 1 to k , where k is the number of regions, and index of region is its position in the sorted array calculated above. He wants Moriarty to color the regions using not more than 20 colors, such that two regions have same color only if all the simple paths between these two regions have at least one region with color value less than the color value assigned to these regions. Simple path between two regions f and h is a sequence of regions r 1 , r 2 , ... r t such that r 1 = f , r t = h , for each 1 ≤ i < t regions r i and r i + 1 share an edge, and r i = r j if and only if i = j . Moriarty couldn't answer and asks Sherlock to solve it himself. Help Sherlock in doing so. First line contains two integers n and m ( 3 ≤ n ≤ 100000 , 0 ≤ m ≤ n - 3 ), the number of vertices in the polygon and the number of diagonals added. Each of the next m lines contains two integers a and b ( 1 ≤ a , b ≤ n ), describing a diagonal between vertices a and b . It is guaranteed that the diagonals are correct, i. e. a and b don't coincide and are not neighboring. It is guaranteed that the diagonals do not intersect. Let the number of regions be k . Output k space-separated integers, each between 1 and 20 , representing the colors of the regions in the order of increasing importance. If there are multiple answers, print any of them. It can be shown that at least one answer exists. In 2nd input, regions formed

Tutorials

ICM Technex 2017 and Codeforces Round #400 (Div. 1 + Div. 2, combined) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
25390758 liuyiluxun F March 11, 2017, midnight OK GNU C++ TESTS 66 78 11776000 2700
40982197 ReaLNero1 F July 30, 2018, 6:19 p.m. OK GNU C++ TESTS 66 93 9728000 2700
31593125 vjudge4 F Oct. 22, 2017, 6:04 a.m. OK GNU C++ TESTS 66 93 17920000 2700
24951992 SanSiroWaltz F Feb. 24, 2017, 1:50 a.m. OK GNU C++ TESTS 66 109 16486400 2700
27330631 jiyutian F May 25, 2017, 6:41 a.m. OK GNU C++ TESTS 66 155 15257600 2700
24960121 xzyxzy F Feb. 24, 2017, 9:30 a.m. OK GNU C++ TESTS 66 156 32768000 2700
40489565 vjudge4 F July 17, 2018, 7:16 p.m. OK GNU C++ TESTS 66 186 19660800 2700
24950938 MemS F Feb. 24, 2017, 12:24 a.m. OK GNU C++ TESTS 66 202 45568000 2700
27188789 zhan8855 F May 18, 2017, 1:48 a.m. OK GNU C++ TESTS 66 218 11673600 2700
25006704 apiadu F Feb. 25, 2017, 8:20 a.m. OK GNU C++ TESTS 66 218 12697600 2700
25025271 krijgertje F Feb. 25, 2017, 11:04 p.m. OK GNU C++11 TESTS 66 78 15360000 2700
45266912 frodakcin F Nov. 4, 2018, 6:25 a.m. OK GNU C++11 TESTS 66 93 11161600 2700
31593001 nn020701 F Oct. 22, 2017, 6 a.m. OK GNU C++11 TESTS 66 93 17817600 2700
31593088 nn020701 F Oct. 22, 2017, 6:03 a.m. OK GNU C++11 TESTS 66 93 17920000 2700
31530695 vjudge2 F Oct. 20, 2017, 11:16 a.m. OK GNU C++11 TESTS 66 93 17920000 2700
25101444 wtw F Feb. 28, 2017, 1:15 p.m. OK GNU C++11 TESTS 66 108 14028800 2700
25067343 Neumann F Feb. 27, 2017, 1:40 a.m. OK GNU C++11 TESTS 66 109 13107200 2700
24957510 davidlee1999WTK F Feb. 24, 2017, 7:31 a.m. OK GNU C++11 TESTS 66 109 16076800 2700
57770162 py_ultron F July 25, 2019, 11:50 p.m. OK GNU C++11 TESTS 66 109 16793600 2700
25965875 Dirak F March 31, 2017, 12:52 a.m. OK GNU C++11 TESTS 66 139 18534400 2700
65465069 nabid_anzum F Nov. 21, 2019, 5:24 a.m. OK GNU C++14 TESTS 66 108 8908800 2700
25112338 JoelSotoMamani F Feb. 28, 2017, 11:32 p.m. OK GNU C++14 TESTS 66 108 17408000 2700
24973163 akaring F Feb. 24, 2017, 11:23 a.m. OK GNU C++14 TESTS 66 124 17408000 2700
25078021 TianyiChen F Feb. 27, 2017, 1:10 p.m. OK GNU C++14 TESTS 66 124 18841600 2700
24937275 marX F Feb. 23, 2017, 4:28 p.m. OK GNU C++14 TESTS 66 139 20275200 2700
67443548 BamiTorabi F Dec. 22, 2019, 8:36 p.m. OK GNU C++14 TESTS 66 155 15564800 2700
57281236 VLADO F July 18, 2019, 12:50 p.m. OK GNU C++14 TESTS 66 171 13312000 2700
25142523 hogloid F March 2, 2017, 8:24 a.m. OK GNU C++14 TESTS 66 171 15872000 2700
40489561 _no0B F July 17, 2018, 7:15 p.m. OK GNU C++14 TESTS 66 171 19763200 2700
24953559 AmberFrame F Feb. 24, 2017, 3:31 a.m. OK GNU C++14 TESTS 66 171 48844800 2700
49952605 thisis F Feb. 15, 2019, 2:38 p.m. OK GNU C++17 TESTS 66 140 16998400 2700
40458849 Doriath F July 17, 2018, 2:33 a.m. OK GNU C++17 TESTS 66 155 20582400 2700
61434126 aki167yuuki F Sept. 28, 2019, 3:53 p.m. OK GNU C++17 TESTS 66 171 19968000 2700
66592271 Shayan.P F Dec. 10, 2019, 1:23 p.m. OK GNU C++17 TESTS 66 187 16281600 2700
49906746 rishabh7699 F Feb. 14, 2019, 12:21 p.m. OK GNU C++17 TESTS 66 187 27545600 2700
67402641 bvd F Dec. 22, 2019, 4:49 a.m. OK GNU C++17 TESTS 66 202 12492800 2700
59965010 saketh F Sept. 3, 2019, 7:57 p.m. OK GNU C++17 TESTS 66 202 19763200 2700
57080564 hjk1030 F July 15, 2019, 7:05 a.m. OK GNU C++17 TESTS 66 202 25190400 2700
59970294 saketh F Sept. 4, 2019, 12:22 a.m. OK GNU C++17 TESTS 66 218 25907200 2700
61672748 Anachor F Oct. 1, 2019, 7:17 p.m. OK GNU C++17 TESTS 66 326 29593600 2700
24936379 uwi F Feb. 23, 2017, 4:17 p.m. OK Java 8 TESTS 66 280 35020800 2700
24943434 pashka F Feb. 23, 2017, 5:56 p.m. OK Java 8 TESTS 66 296 43520000 2700
35974610 tri F March 5, 2018, 6:37 p.m. OK Java 8 TESTS 66 405 47513600 2700
24935913 eatmore F Feb. 23, 2017, 4:11 p.m. OK Java 8 TESTS 66 452 37273600 2700
63069007 Nutella3000 F Oct. 21, 2019, 11:48 a.m. OK Java 8 TESTS 66 639 56320000 2700
25149891 IgorKoval F March 2, 2017, 1:59 p.m. OK Java 8 TESTS 66 763 66355200 2700
25150004 IgorKoval F March 2, 2017, 2:04 p.m. OK Java 8 TESTS 66 763 67072000 2700
25881951 apbondarev F March 28, 2017, 7:05 p.m. OK Java 8 TESTS 66 873 84377600 2700
25008827 pitfall F Feb. 25, 2017, 9:54 a.m. OK Java 8 TESTS 66 873 136396800 2700
29518878 happybelly F Aug. 17, 2017, 5:59 a.m. OK Java 8 TESTS 66 951 27955200 2700
24936077 DEGwer F Feb. 23, 2017, 4:14 p.m. OK MS C++ TESTS 66 187 25088000 2700

remove filters

Back to search problems