2021-2022 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred)

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
1666 2021-2022 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) FINISHED False 18000 81986099 April 13, 2022, 8:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 737 ) E Even Split PROGRAMMING binary search constructive algorithms greedy

B'A revolution has recently happened in Segmentland. The new government is committed to equality, and they hired you to help with land redistribution in the country. Segmentland is a segment of length l kilometers, with the capital in one of its ends. There are n citizens in Segmentland, the home of i -th citizen is located at the point a_i kilometers from the capital. No two homes are located at the same point. Each citizen should receive a segment of positive length with ends at integer distances from the capital that contains her home. The union of these segments should be the whole of Segmentland, and they should not have common points besides their ends. To ensure equality, the difference between the lengths of the longest and the shortest segments should be as small as possible. The first line of the input contains two integers l and n ( 2 <= q l <= q 10^9; 1 <= q n <= q 10^5 ). The second line contains n integers a_1, a_2, ... , a_n ( 0 < a_1 < a_2 < ... < a_n < l ). Output n pairs of numbers s_i, f_i ( 0 <= q s_i < f_i <= q l ), one pair per line. The pair on i -th line denotes the ends of the [s_i, f_i] segment that i -th citizen receives. If there are many possible arrangements with the same difference between the lengths of the longest and the shortest segments, you can output any of them. In the first example, it is possible to make all segments equal. Viva la revolucion! In the second example, citizens live close to the capital, so the length of the shortest segment is 2 and the length of the longest segment is 8. '...

Tutorials

Tutorial (PDF)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
153539257 djq_cpp jiangly MiracleFaFa E April 13, 2022, 9:08 a.m. OK GNU C++14 TESTS 23 78 1228800
153560253 meyi zmwang Forza_Ferrari E April 13, 2022, 12:44 p.m. OK GNU C++14 TESTS 23 78 1638400
153570905 Milesian E April 13, 2022, 2:38 p.m. OK GNU C++14 TESTS 23 78 2048000
153560855 sd_ltt PolarAid PurpleWonder E April 13, 2022, 12:51 p.m. OK GNU C++14 TESTS 23 78 2867200
153553101 Gom gs18115 Retro3014 E April 13, 2022, 11:29 a.m. OK GNU C++14 TESTS 23 78 4403200
153548065 lucaperju AlexLuchianov Prosto E April 13, 2022, 10:36 a.m. OK GNU C++14 TESTS 23 92 12288000
153571991 ttklwxx E April 13, 2022, 2:56 p.m. OK GNU C++14 TESTS 23 93 1638400
153560913 baodaqing Komeiji_Green 1136899240 E April 13, 2022, 12:51 p.m. OK GNU C++14 TESTS 23 93 2764800
153555579 hualian moyujiang E April 13, 2022, 11:56 a.m. OK GNU C++14 TESTS 23 93 3481600
153560714 WH6BNNS sszcdjr huagaohan E April 13, 2022, 12:49 p.m. OK GNU C++14 TESTS 23 93 3993600
153549472 Macesuted-Moe vccaiji Alfnov E April 13, 2022, 10:51 a.m. OK GNU C++17 TESTS 23 61 3686400
153608190 psz_orz E April 14, 2022, 5:15 a.m. OK GNU C++17 TESTS 23 62 6656000
153572630 NULL0x7f E April 13, 2022, 3:06 p.m. OK GNU C++17 TESTS 23 77 819200
153608352 tarjen E April 14, 2022, 5:18 a.m. OK GNU C++17 TESTS 23 77 1228800
153571334 xpov1LL E April 13, 2022, 2:45 p.m. OK GNU C++17 TESTS 23 77 2048000
153551368 neko_nyaaaaaaaaaaaaaaaaa ngfam chemthan E April 13, 2022, 11:11 a.m. OK GNU C++17 TESTS 23 93 1945600
153605467 miagkov TheOneYouWant lucasxia01 E April 14, 2022, 4:20 a.m. OK GNU C++17 TESTS 23 93 2662400
153552370 Ekler vepifanov E April 13, 2022, 11:21 a.m. OK GNU C++17 TESTS 23 93 2764800
153547270 Karry5307_AK_NOI2022 E April 13, 2022, 10:27 a.m. OK GNU C++17 TESTS 23 93 2764800
153558224 moqizhu2005 NanamiChaiki qkm66666 E April 13, 2022, 12:23 p.m. OK GNU C++17 TESTS 23 93 3072000
153608133 Freedom__King E April 14, 2022, 5:14 a.m. OK GNU C++17 (64) TESTS 23 15 6656000
153563073 user202729_ E April 13, 2022, 1:14 p.m. OK GNU C++17 (64) TESTS 23 61 819200
153541178 basic_string Acc_Robin E April 13, 2022, 9:25 a.m. OK GNU C++17 (64) TESTS 23 62 1945600
153546527 kotatsugame E April 13, 2022, 10:19 a.m. OK GNU C++17 (64) TESTS 23 62 2662400
153540415 fanache99 lumibons E April 13, 2022, 9:18 a.m. OK GNU C++17 (64) TESTS 23 62 2969600
153559460 Emaneru bernardo_amorim brunomont E April 13, 2022, 12:36 p.m. OK GNU C++17 (64) TESTS 23 62 3379200
153549366 SSRS_ nuip noimi E April 13, 2022, 10:50 a.m. OK GNU C++17 (64) TESTS 23 62 4505600
153546284 icypiggy rama_pang errorgorn E April 13, 2022, 10:16 a.m. OK GNU C++17 (64) TESTS 23 62 4608000
153560633 est_stella E April 13, 2022, 12:48 p.m. OK GNU C++17 (64) TESTS 23 62 5836800
153597233 basic_string E April 13, 2022, 11:59 p.m. OK GNU C++17 (64) TESTS 23 77 1945600
153560489 nickcotforce Normie28 generic_placeholder_name E April 13, 2022, 12:47 p.m. OK GNU C++20 (64) TESTS 23 46 1228800
153559859 I_am_Lazy RyoPham quocnguyen E April 13, 2022, 12:40 p.m. OK GNU C++20 (64) TESTS 23 46 1228800
153579173 A_G E April 13, 2022, 4:50 p.m. OK GNU C++20 (64) TESTS 23 46 1638400
153556121 IgorI E April 13, 2022, 12:02 p.m. OK GNU C++20 (64) TESTS 23 46 2048000
153548699 timreizin oleh1421 I_LOVE_DASHA_KARPENKO E April 13, 2022, 10:42 a.m. OK GNU C++20 (64) TESTS 23 46 3379200
153545880 dario2994 Batrr mhq E April 13, 2022, 10:12 a.m. OK GNU C++20 (64) TESTS 23 46 5017600
153545300 tute7627 tatyam riantkb E April 13, 2022, 10:05 a.m. OK GNU C++20 (64) TESTS 23 46 5324800
153558815 Soumya1 Jarif_Rahman Farhan132 E April 13, 2022, 12:29 p.m. OK GNU C++20 (64) TESTS 23 46 6656000
153561410 retcarizy chaihf Little_Jian E April 13, 2022, 12:57 p.m. OK GNU C++20 (64) TESTS 23 46 8806400
153541852 heno239 E April 13, 2022, 9:31 a.m. OK GNU C++20 (64) TESTS 23 46 10444800
153555074 arvindf232 kevinxiehk nicholask E April 13, 2022, 11:51 a.m. OK Kotlin 1.5 TESTS 23 280 1331200
153568343 NecroSean38 E April 13, 2022, 2:02 p.m. OK PyPy 3 TESTS 23 483 40038400
153559067 RUSH_D_CAT limbo.null NecroSean38 E April 13, 2022, 12:32 p.m. OK PyPy 3 TESTS 23 577 39321600
153570785 NecroSean38 E April 13, 2022, 2:37 p.m. OK PyPy 3 TESTS 23 608 40140800

remove filters

Back to search problems