2018-2019 Russia Open High School Programming Contest (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
1090 2018-2019 Russia Open High School Programming Contest (Unrated, Online Mirror, ICPC Rules, Teams Preferred) FINISHED False 18000 232062923 Dec. 9, 2018, 8:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 568 ) C New Year Presents PROGRAMMING 2500

Santa has prepared boxes with presents for (n) kids, one box for each kid. There are (m) kinds of presents: balloons, sweets, chocolate bars, toy cars... A child would be disappointed to receive two presents of the same kind, so all kinds of presents in one box are distinct. Having packed all the presents, Santa realized that different boxes can contain different number of presents. It would be unfair to the children, so he decided to move some presents between boxes, and make their sizes similar. After all movements, the difference between the maximal and the minimal number of presents in a box must be as small as possible. All presents in each box should still be distinct. Santa wants to finish the job as fast as possible, so he wants to minimize the number of movements required to complete the task. Given the sets of presents in each box, find the shortest sequence of movements of presents between boxes that minimizes the difference of sizes of the smallest and the largest box, and keeps all presents in each box distinct. The first line of input contains two integers (n), (m) ((1 \leq n, m \leq 100\ 000)), the number of boxes and the number of kinds of the presents. Denote presents with integers from (1) to (m). Each of the following (n) lines contains the description of one box. It begins with an integer (s_i) ((s_i \geq 0)), the number of presents in the box, (s_i) distinct integers between (1) and (m) follow, denoting the kinds of presents in that box. The total number of presents in all boxes does not exceed (500\,000). Print one integer (k) at the first line of output, the number of movements in the shortest sequence that makes the sizes of the boxes differ by at most one. Then print (k) lines that describe movements in the same order in which they should be performed. Each movement is described by three integers (from_i), (to_i), (kind_i). It means that the present of kind

Tutorials

ru-olymp-team-russia-2018-presentation.pdf

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
48505440 memopaper C Jan. 17, 2019, 5:23 p.m. OK GNU C++11 TESTS 39 171 8601600 2500
46816749 131131yhx C Dec. 9, 2018, 12:47 p.m. OK GNU C++11 TESTS 39 171 14950400 2500
46817527 nianheng shanxizeng C Dec. 9, 2018, 1:01 p.m. OK GNU C++11 TESTS 39 171 154521600 2500
48026754 mmmod_lqs C Jan. 6, 2019, 9:34 a.m. OK GNU C++11 TESTS 39 187 16998400 2500
46897752 ytc020306 C Dec. 11, 2018, 10:17 a.m. OK GNU C++11 TESTS 39 187 23859200 2500
46838244 HW_TXL C Dec. 10, 2018, 5:15 a.m. OK GNU C++11 TESTS 39 187 154521600 2500
48654576 ReaLNero1 C Jan. 21, 2019, 1:39 a.m. OK GNU C++11 TESTS 39 187 154521600 2500
46797201 Panole233 zx2003 _Happy_New_Year_ C Dec. 9, 2018, 9:29 a.m. OK GNU C++11 TESTS 39 202 41574400 2500
47334188 Nson C Dec. 21, 2018, 2:21 p.m. OK GNU C++11 TESTS 39 233 20992000 2500
46806921 zhangzy langsike orbitingflea C Dec. 9, 2018, 10:45 a.m. OK GNU C++11 TESTS 39 280 40857600 2500
50226398 Godrock_04 C Feb. 20, 2019, 7:31 a.m. OK GNU C++14 TESTS 39 202 9318400 2500
46926445 apiadu C Dec. 12, 2018, 8:59 a.m. OK GNU C++14 TESTS 39 217 7782400 2500
46813498 ugly2333 C Dec. 9, 2018, 11:41 a.m. OK GNU C++14 TESTS 39 217 9216000 2500
46852854 inaFSTream C Dec. 10, 2018, 1:11 p.m. OK GNU C++14 TESTS 39 218 9011200 2500
47795236 krijgertje C Dec. 31, 2018, 4:23 p.m. OK GNU C++14 TESTS 39 218 11673600 2500
46802534 yashChandnani gravito12345 Beast_Within C Dec. 9, 2018, 10:22 a.m. OK GNU C++14 TESTS 39 218 16998400 2500
61604868 NotNight C Oct. 1, 2019, 12:21 p.m. OK GNU C++14 TESTS 39 233 18944000 2500
46958243 jslijin C Dec. 13, 2018, 6:11 a.m. OK GNU C++14 TESTS 39 234 8294400 2500
46807103 qiqi20021026 lych_cys _ChenKerui C Dec. 9, 2018, 10:48 a.m. OK GNU C++14 TESTS 39 248 35942400 2500
48479290 zzb111 C Jan. 17, 2019, 5:11 a.m. OK GNU C++14 TESTS 39 249 14336000 2500
47189139 Ilya-bar C Dec. 18, 2018, 11:16 a.m. OK GNU C++17 TESTS 39 202 12390400 2500
46887566 apink C Dec. 11, 2018, 2:41 a.m. OK GNU C++17 TESTS 39 202 13004800 2500
50622848 Dup4 C March 1, 2019, 3:27 a.m. OK GNU C++17 TESTS 39 217 92672000 2500
47318418 saketh C Dec. 21, 2018, 6:03 a.m. OK GNU C++17 TESTS 39 218 12083200 2500
46836909 Benq C Dec. 10, 2018, 3:43 a.m. OK GNU C++17 TESTS 39 218 13824000 2500
50225138 Godrock_04 C Feb. 20, 2019, 7:01 a.m. OK GNU C++17 TESTS 39 233 9216000 2500
47012963 Nakagawa.Kanon C Dec. 14, 2018, 5:28 p.m. OK GNU C++17 TESTS 39 234 8294400 2500
47265027 MaxZubec C Dec. 19, 2018, 1:57 p.m. OK GNU C++17 TESTS 39 280 22937600 2500
65298989 Pankin C Nov. 18, 2019, 12:33 p.m. OK GNU C++17 TESTS 39 280 25292800 2500
50689258 Trote_w C March 2, 2019, 2:55 p.m. OK GNU C++17 TESTS 39 295 24780800 2500
46996566 Jeel_Vaishnav C Dec. 14, 2018, 8:52 a.m. OK Java 8 TESTS 39 607 39526400 2500
46816572 uwi C Dec. 9, 2018, 12:43 p.m. OK Java 8 TESTS 39 670 54886400 2500
46933541 polyakoff C Dec. 12, 2018, 12:46 p.m. OK Java 8 TESTS 39 701 54784000 2500
46812303 golikovnik iakovlev.zakhar C Dec. 9, 2018, 11:16 a.m. OK Java 8 TESTS 39 842 15052800 2500
46816039 Aleksandr_Stark ATSTNG Musin C Dec. 9, 2018, 12:33 p.m. OK Java 8 TESTS 39 842 40140800 2500
47477358 peregrinus C Dec. 24, 2018, 10:36 p.m. OK Mono C# TESTS 39 1076 118886400 2500
46854120 supachai_pay C Dec. 10, 2018, 1:48 p.m. OK PyPy 2 TESTS 39 1138 59187200 2500
46812028 C Dec. 9, 2018, 11:13 a.m. OK Unknown TESTS 0 0 0 2500
46811825 C Dec. 9, 2018, 11:13 a.m. OK Unknown TESTS 0 0 0 2500
46811649 C Dec. 9, 2018, 11:13 a.m. OK Unknown TESTS 0 0 0 2500
46811587 C Dec. 9, 2018, 11:13 a.m. OK Unknown TESTS 0 0 0 2500
46811453 C Dec. 9, 2018, 11:12 a.m. OK Unknown TESTS 0 0 0 2500
46811401 C Dec. 9, 2018, 11:12 a.m. OK Unknown TESTS 0 0 0 2500
46810766 C Dec. 9, 2018, 11:12 a.m. OK Unknown TESTS 0 0 0 2500
46810675 C Dec. 9, 2018, 11:12 a.m. OK Unknown TESTS 0 0 0 2500
46810420 C Dec. 9, 2018, 11:12 a.m. OK Unknown TESTS 0 0 0 2500
46809767 C Dec. 9, 2018, 11:12 a.m. OK Unknown TESTS 0 0 0 2500

remove filters

Back to search problems