Codeforces Round 481 (Div. 3)

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
978 Codeforces Round 481 (Div. 3) FINISHED False 9000 211323323 May 13, 2018, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4443 ) G Petya's Exams PROGRAMMING greedy implementation sortings 1800

B"Petya studies at university. The current academic year finishes with n special days. Petya needs to pass m exams in those special days. The special days in this problem are numbered from 1 to n . There are three values about each exam: There are three types of activities for Petya in each day: to spend a day doing nothing (taking a rest), to spend a day passing exactly one exam or to spend a day preparing for exactly one exam. So he can't pass/prepare for multiple exams in a day. He can't mix his activities in a day. If he is preparing for the i -th exam in day j , then s_i <= j < d_i . It is allowed to have breaks in a preparation to an exam and to alternate preparations for different exams in consecutive days. So preparation for an exam is not required to be done in consecutive days. Find the schedule for Petya to prepare for all exams and pass them, or report that it is impossible. The first line contains two integers n and m (2 <= n <= 100, 1 <= m <= n) -- the number of days and the number of exams. Each of the following m lines contains three integers s_i , d_i , c_i (1 <= s_i < d_i <= n, 1 <= c_i <= n) -- the day, when questions for the i -th exam will be given, the day of the i -th exam, number of days Petya needs to prepare for the i -th exam. Guaranteed, that all the exams will be in different days. Questions for different exams can be given in the same day. It is possible that, in the day of some exam, the questions for other exams are given. If Petya can not prepare and pass all the exams, print -1. In case of positive answer, print n integers, where the j -th number is: Assume that the exams are numbered in order of appearing in the input, starting from 1 . If there are multiple schedules, print any of them. In the first example Petya can, for example, prepare for exam 1 in the first day, prepare for exam 2 "...

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
39009700 pilium2 G June 7, 2018, 5:43 a.m. OK GNU C TESTS 77 30 0 1800
39067325 error0308 G June 9, 2018, 11:06 a.m. OK GNU C TESTS 77 31 0 1800
38894213 C1ariS G June 2, 2018, 2:38 p.m. OK GNU C TESTS 77 31 3379200 1800
39414681 jerrywcy G June 19, 2018, 3 p.m. OK GNU C++ TESTS 77 30 0 1800
39277594 sunny070309 G June 16, 2018, 2:34 a.m. OK GNU C++ TESTS 77 30 0 1800
38991271 vjudge1 G June 6, 2018, 10:22 a.m. OK GNU C++ TESTS 77 30 0 1800
38984361 vjudge4 G June 6, 2018, 5:40 a.m. OK GNU C++ TESTS 77 30 0 1800
38717624 vjudge2 G May 29, 2018, 11:57 a.m. OK GNU C++ TESTS 77 30 0 1800
38651863 vjudge3 G May 27, 2018, 9:09 a.m. OK GNU C++ TESTS 77 30 0 1800
38587349 vjudge2 G May 24, 2018, 1:05 p.m. OK GNU C++ TESTS 77 30 0 1800
38586836 vjudge2 G May 24, 2018, 12:47 p.m. OK GNU C++ TESTS 77 30 0 1800
38717436 vjudge1 G May 29, 2018, 11:48 a.m. OK GNU C++ TESTS 77 30 1843200 1800
38829367 vjudge2 G June 1, 2018, 1:28 p.m. OK GNU C++ TESTS 77 30 3379200 1800
39026278 vjudge5 G June 7, 2018, 4 p.m. OK GNU C11 TESTS 77 31 0 1800
39009688 vjudge5 G June 7, 2018, 5:43 a.m. OK GNU C11 TESTS 77 31 0 1800
41260399 AC__hunter G Aug. 6, 2018, 2:14 a.m. OK GNU C++11 TESTS 77 30 0 1800
39118792 _jiraiya G June 10, 2018, 12:12 p.m. OK GNU C++11 TESTS 77 30 0 1800
39076280 RAMZYY G June 9, 2018, 6:32 p.m. OK GNU C++11 TESTS 77 30 0 1800
39017139 A.Freeman G June 7, 2018, 11:10 a.m. OK GNU C++11 TESTS 77 30 0 1800
38721936 Andrew.Ts G May 29, 2018, 2:55 p.m. OK GNU C++11 TESTS 77 30 0 1800
38698470 rcrs4 G May 28, 2018, 3:37 p.m. OK GNU C++11 TESTS 77 30 0 1800
38592618 Sun_tester G May 24, 2018, 4:54 p.m. OK GNU C++11 TESTS 77 30 0 1800
39274825 ArnoldBoczek G June 15, 2018, 8:40 p.m. OK GNU C++11 TESTS 77 30 0 1800
41644460 ChiHong G Aug. 16, 2018, 7:45 a.m. OK GNU C++11 TESTS 77 30 0 1800
39225377 EsmaelSY G June 13, 2018, 7:36 p.m. OK GNU C++11 TESTS 77 30 204800 1800
38703284 rishabh7699 G May 28, 2018, 7:38 p.m. OK GNU C++14 TESTS 77 15 0 1800
39662363 i_am_loser G June 26, 2018, 1:07 a.m. OK GNU C++14 TESTS 77 15 0 1800
38987363 Mirbek_aka G June 6, 2018, 7:47 a.m. OK GNU C++14 TESTS 77 15 0 1800
38596477 monastic G May 24, 2018, 8:45 p.m. OK GNU C++14 TESTS 77 15 0 1800
39088678 IIeJlMeHb G June 10, 2018, 9:55 a.m. OK GNU C++14 TESTS 77 15 204800 1800
38640408 coderick14 G May 26, 2018, 5:12 p.m. OK GNU C++14 TESTS 77 15 307200 1800
38921871 rosklin G June 3, 2018, 1:22 p.m. OK GNU C++14 TESTS 77 15 3379200 1800
38912594 Mr.ugly G June 3, 2018, 7:09 a.m. OK GNU C++14 TESTS 77 15 3379200 1800
46960079 Cqt_Iostream G Dec. 13, 2018, 7:32 a.m. OK GNU C++14 TESTS 77 15 4198400 1800
54584109 vjudge4 G May 25, 2019, 6:09 a.m. OK GNU C++14 TESTS 77 30 0 1800
39696147 PraneyR G June 27, 2018, 8:49 a.m. OK GNU C++17 TESTS 77 15 0 1800
39454158 shiyanrui G June 21, 2018, 7:26 a.m. OK GNU C++17 TESTS 77 15 0 1800
38937392 meantiger G June 4, 2018, 7:33 a.m. OK GNU C++17 TESTS 77 15 3379200 1800
38790235 311709000529 G May 31, 2018, 4:55 a.m. OK GNU C++17 TESTS 77 15 3379200 1800
56870103 66990208 G July 12, 2019, 5:58 a.m. OK GNU C++17 TESTS 77 30 0 1800
68155190 clu-hash-de G Jan. 4, 2020, 8:41 a.m. OK GNU C++17 TESTS 77 30 0 1800
64556129 eggag32 G Nov. 9, 2019, 3:50 a.m. OK GNU C++17 TESTS 77 30 0 1800
54514695 thantrongtri3 G May 23, 2019, 9:09 a.m. OK GNU C++17 TESTS 77 30 0 1800
52604206 qyx G April 11, 2019, 1:14 p.m. OK GNU C++17 TESTS 77 30 0 1800
52235453 vjudge5 G April 2, 2019, 1:35 p.m. OK GNU C++17 TESTS 77 30 0 1800
42946130 Marii G Sept. 16, 2018, 12:31 p.m. OK Go TESTS 77 31 0 1800
38554490 only_methol G May 23, 2018, 7:37 a.m. OK Go TESTS 77 31 5529600 1800
69594523 luchy0120 G Jan. 27, 2020, 3:34 a.m. OK Java 8 TESTS 77 109 0 1800
59686609 Agnimandur G Aug. 30, 2019, 2:13 a.m. OK Java 8 TESTS 77 109 0 1800
48372883 rogernadal G Jan. 14, 2019, 5:48 a.m. OK Java 8 TESTS 77 109 0 1800
53048509 continued258 G April 20, 2019, 1:25 p.m. OK Java 8 TESTS 77 124 0 1800
51546873 mikkk G March 19, 2019, 8:42 p.m. OK Java 8 TESTS 77 124 0 1800
46996209 wadissimo G Dec. 14, 2018, 8:39 a.m. OK Java 8 TESTS 77 124 0 1800
41951534 xiaowuc1 G Aug. 22, 2018, 1:56 a.m. OK Java 8 TESTS 77 124 0 1800
39321011 AQT G June 16, 2018, 11:33 p.m. OK Java 8 TESTS 77 124 0 1800
38609328 ayushchaurasia2879 G May 25, 2018, 12:49 p.m. OK Java 8 TESTS 77 124 0 1800
38631225 dipankar12 G May 26, 2018, 10:41 a.m. OK Java 8 TESTS 77 139 0 1800
38624707 0442A403 G May 26, 2018, 6:09 a.m. OK Kotlin TESTS 77 140 0 1800
38703168 Anastasiya_Andreevna G May 28, 2018, 7:29 p.m. OK Mono C# TESTS 77 46 0 1800
68645998 hibatibati G Jan. 12, 2020, 9:05 a.m. OK Mono C# TESTS 77 62 1740800 1800
39423126 sarim G June 19, 2018, 10:54 p.m. OK Mono C# TESTS 77 62 3584000 1800
38718227 vjudge5 G May 29, 2018, 12:22 p.m. OK MS C++ TESTS 77 30 0 1800
39039128 vjudge2 G June 8, 2018, 7:49 a.m. OK MS C++ TESTS 77 30 0 1800
38648763 vjudge5 G May 27, 2018, 6:29 a.m. OK MS C++ TESTS 77 30 0 1800
49939273 XRDS-BJFU101 G Feb. 15, 2019, 8:49 a.m. OK MS C++ TESTS 77 31 0 1800
68300212 vjudge2 G Jan. 6, 2020, 6:06 a.m. OK MS C++ TESTS 77 31 0 1800
58197971 vjudge4 G Aug. 3, 2019, 2:10 a.m. OK MS C++ TESTS 77 31 0 1800
58181158 vjudge1 G Aug. 2, 2019, 3:14 p.m. OK MS C++ TESTS 77 31 0 1800
58177071 vjudge4 G Aug. 2, 2019, 1:29 p.m. OK MS C++ TESTS 77 31 0 1800
54752553 vjudge3 G May 28, 2019, 1:32 p.m. OK MS C++ TESTS 77 31 0 1800
49939297 vjudge4 G Feb. 15, 2019, 8:49 a.m. OK MS C++ TESTS 77 31 0 1800
57509631 Still_Theory G July 22, 2019, 1:17 p.m. OK MS C++ 2017 TESTS 77 31 0 1800
50593842 work_hard. G Feb. 28, 2019, 9:03 a.m. OK MS C++ 2017 TESTS 77 31 0 1800
54838719 0-jij-0 G May 30, 2019, 11:55 a.m. OK MS C++ 2017 TESTS 77 31 0 1800
63225538 AleksanderBalobanov G Oct. 23, 2019, 9:11 a.m. OK MS C++ 2017 TESTS 77 61 44134400 1800
39822073 mayakin G July 1, 2018, 1:11 p.m. OK PHP TESTS 77 46 409600 1800
67671955 AnandOza G Dec. 26, 2019, 9:06 p.m. OK PyPy 2 TESTS 77 124 102400 1800
42311643 akshay125 G Aug. 31, 2018, 2:40 p.m. OK PyPy 2 TESTS 77 140 102400 1800
52276117 aleonov G April 3, 2019, 2:51 p.m. OK PyPy 3 TESTS 77 124 0 1800
39445982 kevinsogo G June 20, 2018, 8:47 p.m. OK PyPy 3 TESTS 77 124 0 1800
38783907 pavlekn G May 30, 2018, 7:34 p.m. OK PyPy 3 TESTS 77 124 21401600 1800
69187369 mythos G Jan. 20, 2020, 12:24 p.m. OK PyPy 3 TESTS 77 155 0 1800
59272444 unknown030405 G Aug. 22, 2019, 1:15 p.m. OK PyPy 3 TESTS 77 155 0 1800
58571650 brosucks G Aug. 11, 2019, 10:29 a.m. OK PyPy 3 TESTS 77 155 0 1800
60368751 Black_Fregat G Sept. 10, 2019, 11:21 p.m. OK PyPy 3 TESTS 77 156 0 1800
39896325 yugle7 G July 3, 2018, 2:17 p.m. OK PyPy 3 TESTS 77 171 0 1800
53826457 yfo G May 6, 2019, 4:27 p.m. OK PyPy 3 TESTS 77 171 512000 1800
51658119 knight-erraunt G March 21, 2019, 11:41 p.m. OK PyPy 3 TESTS 77 249 1536000 1800
39277281 aeternalis1 G June 16, 2018, 1:56 a.m. OK Python 2 TESTS 77 109 0 1800
38679580 cristi.dana3 G May 27, 2018, 8:32 p.m. OK Python 3 TESTS 77 93 0 1800
38678633 cristi.dana3 G May 27, 2018, 7:43 p.m. OK Python 3 TESTS 77 93 0 1800
38678105 cristi.dana2 G May 27, 2018, 7:27 p.m. OK Python 3 TESTS 77 93 0 1800
48049360 Skybytskyi.Nikita G Jan. 7, 2019, 7:35 a.m. OK Python 3 TESTS 77 108 0 1800
38584920 JokerNN G May 24, 2018, 11:41 a.m. OK Python 3 TESTS 77 109 204800 1800
38971942 libra8z G June 5, 2018, 2:53 p.m. OK Python 3 TESTS 77 109 7065600 1800
45457896 lagger G Nov. 8, 2018, 8:48 p.m. OK Python 3 TESTS 77 124 0 1800
40658373 tebba G July 23, 2018, 5:43 a.m. OK Python 3 TESTS 77 124 0 1800
39896279 yugle7 G July 3, 2018, 2:14 p.m. OK Python 3 TESTS 77 124 0 1800
39786857 YellowforEro G June 30, 2018, 3:26 a.m. OK Python 3 TESTS 77 124 0 1800
41548130 kobae964 G Aug. 13, 2018, 6:40 a.m. OK Rust TESTS 77 31 105164800 1800
46717356 yakamoto G Dec. 7, 2018, 11:56 a.m. OK Scala TESTS 77 483 0 1800

remove filters

Back to search problems