Codeforces Round 335 (Div. 1)

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
605 Codeforces Round 335 (Div. 1) FINISHED False 7200 287848523 Dec. 9, 2015, 4:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 812 ) D Board Game PROGRAMMING data structures dfs and similar 2400

B"You are playing a board card game. In this game the player has two characteristics, x and y -- the white magic skill and the black magic skill, respectively. There are n spell cards lying on the table, each of them has four characteristics, ai, bi, ci and di. In one move a player can pick one of the cards and cast the spell written on it, but only if first two of it's characteristics meet the requirement ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x and bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89y, i.e. if the player has enough magic skill to cast this spell. However, after casting the spell the characteristics of a player change and become equal to x xe2 x80 x89= xe2 x80 x89ci and y xe2 x80 x89= xe2 x80 x89di. At the beginning of the game both characteristics of a player are equal to zero. The goal of the game is to cast the n-th spell. Your task is to make it in as few moves as possible. You are allowed to use spell in any order and any number of times (for example, you may not use some spells at all). The first line of the input contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the number of cards on the table. Each of the next n lines contains four integers ai, bi, ci, di (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi, xe2 x80 x89ci, xe2 x80 x89di xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the characteristics of the corresponding card. In the first line print a single integer k -- the minimum number of moves needed to cast the n-th spell and in the second line print k numbers -- the indices of the cards in the order in which you should cast them. In case there are multiple possible solutions, print any of them. If it is impossible to cast the n-th spell, print xe2 x80 x89- xe2 x80 x891."...

Tutorials

Codeforces Round #335 Problem Analysis

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
15074976 Owaski D Dec. 28, 2015, 5:18 p.m. OK GNU C++ TESTS 96 109 10854400 2400
24083417 laofudasuan D Jan. 24, 2017, 3:09 a.m. OK GNU C++ TESTS 96 109 14950400 2400
14732854 gs12117 D Dec. 9, 2015, 6:28 p.m. OK GNU C++ TESTS 96 124 5324800 2400
14735801 natsugiri D Dec. 9, 2015, 8:49 p.m. OK GNU C++ TESTS 96 124 8192000 2400
15150336 vjudge3 D Jan. 1, 2016, 4:39 p.m. OK GNU C++ TESTS 96 124 10854400 2400
16756372 chaiyt_is_pig D March 17, 2016, 1:23 a.m. OK GNU C++ TESTS 96 140 5222400 2400
14906358 Zearot D Dec. 21, 2015, 2:09 a.m. OK GNU C++ TESTS 96 140 10035200 2400
14906278 Zearot D Dec. 21, 2015, 1:49 a.m. OK GNU C++ TESTS 96 140 10035200 2400
32367615 yylidiw D Nov. 17, 2017, 1:16 a.m. OK GNU C++ TESTS 96 140 13619200 2400
15270116 vjudge5 D Jan. 9, 2016, 1:29 p.m. OK GNU C++ TESTS 96 140 18944000 2400
61079327 rainboy D Sept. 22, 2019, 3:43 p.m. OK GNU C11 TESTS 96 483 5632000 2400
14747567 kefaa D Dec. 10, 2015, 4:55 p.m. OK GNU C++11 TESTS 96 93 9932800 2400
14939681 SanSiroWaltz D Dec. 23, 2015, 2:11 p.m. OK GNU C++11 TESTS 96 109 15564800 2400
40985572 ReaLNero1 D July 30, 2018, 8:01 p.m. OK GNU C++11 TESTS 96 109 15564800 2400
15154071 Al.Cash D Jan. 2, 2016, 12:15 a.m. OK GNU C++11 TESTS 96 124 7065600 2400
14748368 totsamyzed D Dec. 10, 2015, 5:51 p.m. OK GNU C++11 TESTS 96 124 7475200 2400
14748305 totsamyzed D Dec. 10, 2015, 5:48 p.m. OK GNU C++11 TESTS 96 124 7475200 2400
14748396 totsamyzed D Dec. 10, 2015, 5:53 p.m. OK GNU C++11 TESTS 96 124 7475200 2400
14729228 Yousef_Salama D Dec. 9, 2015, 5:39 p.m. OK GNU C++11 TESTS 96 124 8601600 2400
14748219 QuestToGM D Dec. 10, 2015, 5:43 p.m. OK GNU C++11 TESTS 96 124 10342400 2400
30602748 ditoly D Sept. 21, 2017, 11:39 p.m. OK GNU C++11 TESTS 96 124 15155200 2400
60331459 nabid_anzum D Sept. 10, 2019, 6:16 a.m. OK GNU C++14 TESTS 96 171 8499200 2400
54444795 ae04071 D May 21, 2019, 10:43 a.m. OK GNU C++14 TESTS 96 171 25190400 2400
33995885 Marckess D Jan. 8, 2018, 2:19 a.m. OK GNU C++14 TESTS 96 187 8908800 2400
28114892 2360 D June 28, 2017, 11:51 a.m. OK GNU C++14 TESTS 96 187 9318400 2400
23385953 Ali.Pi D Dec. 28, 2016, 7:53 p.m. OK GNU C++14 TESTS 96 202 12800000 2400
39188828 Toxel D June 12, 2018, 10:51 a.m. OK GNU C++14 TESTS 96 202 16384000 2400
35336501 Mahdi_Jfri D Feb. 16, 2018, 12:17 p.m. OK GNU C++14 TESTS 96 233 9523200 2400
29350214 shadowatyy D Aug. 11, 2017, 10:12 a.m. OK GNU C++14 TESTS 96 233 15667200 2400
64611206 fstqaq D Nov. 10, 2019, 1:41 a.m. OK GNU C++14 TESTS 96 233 19660800 2400
44019249 Barbosa1998 D Oct. 9, 2018, 2:01 a.m. OK GNU C++14 TESTS 96 248 14848000 2400
53767664 luogu_bot1 D May 5, 2019, 2:03 a.m. OK GNU C++17 TESTS 96 155 10035200 2400
38519250 majk D May 21, 2018, 10:14 p.m. OK GNU C++17 TESTS 96 156 5017600 2400
55856308 clatterrrcl D June 21, 2019, 7:10 a.m. OK GNU C++17 TESTS 96 156 10035200 2400
50684985 Piurko D March 2, 2019, 1:15 p.m. OK GNU C++17 TESTS 96 171 7168000 2400
50684912 Piurko D March 2, 2019, 1:13 p.m. OK GNU C++17 TESTS 96 186 7168000 2400
53968381 vjudge3 D May 10, 2019, 6:58 p.m. OK GNU C++17 TESTS 96 186 7168000 2400
50763022 vjudge5 D March 3, 2019, 8:49 p.m. OK GNU C++17 TESTS 96 187 7168000 2400
51888800 ArshiaDadras D March 27, 2019, 8:01 a.m. OK GNU C++17 TESTS 96 187 70041600 2400
42280172 crathva D Aug. 30, 2018, 1:48 p.m. OK GNU C++17 TESTS 96 202 5734400 2400
43492575 fblogy D Sept. 27, 2018, 1:16 p.m. OK GNU C++17 TESTS 96 202 7680000 2400
14726453 pashka D Dec. 9, 2015, 5:15 p.m. OK Java 7 TESTS 96 467 0 2400
14734406 edorundo D Dec. 9, 2015, 7:23 p.m. OK Java 7 TESTS 96 1326 92672000 2400
15079913 hunglv.k52tncntt D Dec. 29, 2015, 5:26 a.m. OK Java 8 TESTS 96 312 6246400 2400
14734235 uwi D Dec. 9, 2015, 7:15 p.m. OK Java 8 TESTS 96 327 10547200 2400
15079864 hunglv.k52tncntt D Dec. 29, 2015, 5:17 a.m. OK Java 8 TESTS 96 468 6246400 2400
22213764 I_Need_Alex_R_Coleman D Nov. 14, 2016, 8:47 p.m. OK Java 8 TESTS 96 592 18022400 2400
14733300 AlexFetisov D Dec. 9, 2015, 6:42 p.m. OK Java 8 TESTS 96 686 43520000 2400
61079326 Dukkha D Sept. 22, 2019, 3:43 p.m. OK Java 8 TESTS 96 763 6451200 2400
14745968 kingofnumbers D Dec. 10, 2015, 3:09 p.m. OK Java 8 TESTS 96 1465 57344000 2400
14726532 Egor D Dec. 9, 2015, 5:15 p.m. OK Java 8 TESTS 96 1512 57344000 2400
14727290 mmaxio D Dec. 9, 2015, 5:22 p.m. OK Java 8 TESTS 96 1668 67993600 2400
17139729 raggzy D April 3, 2016, 4:48 a.m. OK Java 8 TESTS 96 2276 155443200 2400
14759493 AnatolyTolstobrov D Dec. 11, 2015, 2:40 p.m. OK MS C# TESTS 96 202 15872000 2400
14846381 Xhark D Dec. 17, 2015, 1:27 p.m. OK MS C++ TESTS 96 124 7475200 2400
14741328 AleksanderBalobanov D Dec. 10, 2015, 9:53 a.m. OK MS C++ TESTS 96 217 84172800 2400
14732867 Taube D Dec. 9, 2015, 6:29 p.m. OK MS C++ TESTS 96 280 9011200 2400
14730031 ballon D Dec. 9, 2015, 5:46 p.m. OK MS C++ TESTS 96 312 37888000 2400
14725606 vml D Dec. 9, 2015, 5:07 p.m. OK MS C++ TESTS 96 327 52428800 2400
14898218 OnionPringles D Dec. 20, 2015, 11:44 a.m. OK MS C++ TESTS 96 421 38297600 2400
14764806 Ancient_mage D Dec. 11, 2015, 7:21 p.m. OK MS C++ TESTS 96 468 29593600 2400
14738323 LLI_E_P_JI_O_K D Dec. 10, 2015, 2:28 a.m. OK MS C++ TESTS 96 498 76800000 2400
14930954 glebushka98 D Dec. 22, 2015, 9:30 p.m. OK MS C++ TESTS 96 577 28569600 2400
14835422 Carups D Dec. 16, 2015, 2:22 p.m. OK MS C++ TESTS 96 748 24064000 2400

remove filters

Back to search problems