Educational Codeforces Round 29

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
863 Educational Codeforces Round 29 FINISHED False 7200 270399323 Sept. 21, 2017, 3:05 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 64 ) G Graphic Settings PROGRAMMING 3100

Recently Ivan bought a new computer. Excited, he unpacked it and installed his favourite game. With his old computer Ivan had to choose the worst possible graphic settings (because otherwise the framerate would be really low), but now he wants to check, maybe his new computer can perform well even with the best possible graphics? There are m graphics parameters in the game. i -th parameter can be set to any positive integer from 1 to a i , and initially is set to b i ( b i ≤ a i ). So there are different combinations of parameters. Ivan can increase or decrease any of these parameters by 1 ; after that the game will be restarted with new parameters (and Ivan will have the opportunity to check chosen combination of parameters). Ivan wants to try all p possible combinations. Also he wants to return to the initial settings after trying all combinations, because he thinks that initial settings can be somehow best suited for his hardware. But Ivan doesn't really want to make a lot of restarts. So he wants you to tell the following: If there exists a way to make exactly p changes (each change either decreases or increases some parameter by 1 ) to try all possible combinations and return to initial combination, then Ivan wants to know this way. Otherwise, if there exists a way to make exactly p - 1 changes to try all possible combinations (including the initial one), then Ivan wants to know this way. Help Ivan by showing him the way to change parameters! The first line of input contains one integer number m ( 1 ≤ m ≤ 6 ). The second line contains m integer numbers a 1 , a 2 , ..., a m ( 2 ≤ a i ≤ 1000 ). It is guaranteed that . The third line contains m integer numbers b 1 , b 2 , ..., b m ( 1 ≤ b i ≤ a i ). If there is a way to make exactly p changes (each change either decreases or increases some parameter by 1 ) to try all possible combinations and return to initial combination, then output Cycle in the first line. Then p lines must follow, each desribing a ch

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
30657247 1919810 G Sept. 24, 2017, 5:33 a.m. OK GNU C++ TESTS 80 15 2252800 3100
40979668 ReaLNero1 G July 30, 2018, 5:11 p.m. OK GNU C++ TESTS 80 31 2252800 3100
32092624 Georgia_001 G Nov. 6, 2017, 11:34 a.m. OK GNU C++ TESTS 80 31 2252800 3100
32632327 Voja03 G Nov. 24, 2017, 8:54 p.m. OK GNU C++ TESTS 80 31 4300800 3100
30657239 1919810 G Sept. 24, 2017, 5:32 a.m. OK GNU C++ TESTS 80 31 4915200 3100
30596090 HellKitsune G Sept. 21, 2017, 6 p.m. OK GNU C++11 TESTS 80 30 1843200 3100
30641491 Obada_sadaqa G Sept. 23, 2017, 12:36 p.m. OK GNU C++11 TESTS 80 31 1843200 3100
30770615 chitanda G Sept. 27, 2017, 7:47 a.m. OK GNU C++11 TESTS 80 31 2764800 3100
50589778 0202 G Feb. 28, 2019, 6:42 a.m. OK GNU C++11 TESTS 80 31 2867200 3100
65735274 JCC_ G Nov. 26, 2019, 7:27 a.m. OK GNU C++11 TESTS 80 46 2764800 3100
47839813 bashetti G Jan. 2, 2019, 11:08 a.m. OK GNU C++11 TESTS 80 46 2867200 3100
57873081 lopare G July 28, 2019, 3:19 a.m. OK GNU C++11 TESTS 80 61 2764800 3100
30999480 krijgertje G Oct. 4, 2017, 5:35 p.m. OK GNU C++11 TESTS 80 124 8908800 3100
30659308 stczhc G Sept. 24, 2017, 7:41 a.m. OK GNU C++14 TESTS 80 15 1638400 3100
33524096 001-23771-AZAMAT-8 G Dec. 23, 2017, 3:54 a.m. OK GNU C++14 TESTS 80 15 4710400 3100
31238390 Aldzey G Oct. 12, 2017, 10:50 a.m. OK GNU C++14 TESTS 80 30 1945600 3100
32364150 Nichi_Rivero G Nov. 16, 2017, 7:40 p.m. OK GNU C++14 TESTS 80 30 2867200 3100
36307517 Eagle-EYe G March 15, 2018, 4:35 p.m. OK GNU C++14 TESTS 80 30 4710400 3100
52601507 _Mr.Pro_ G April 11, 2019, 12:06 p.m. OK GNU C++14 TESTS 80 31 1945600 3100
30854264 nursultan2002 G Sept. 30, 2017, 4:03 a.m. OK GNU C++14 TESTS 80 31 1945600 3100
30610447 ecjtu-nzf G Sept. 22, 2017, 9:30 a.m. OK GNU C++14 TESTS 80 31 1945600 3100
51814624 _Dino_ G March 25, 2019, 8:20 a.m. OK GNU C++14 TESTS 80 31 2764800 3100
31624993 025-26644-Arman-7 G Oct. 23, 2017, 10:17 a.m. OK GNU C++14 TESTS 80 31 3788800 3100
57430904 Benq G July 21, 2019, 1:16 a.m. OK GNU C++17 TESTS 80 77 7577600 3100

remove filters

Back to search problems