Codeforces Round 143 (Div. 2)

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
231 Codeforces Round 143 (Div. 2) FINISHED False 7200 426781823 Oct. 7, 2012, 3:30 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 3908 ) B Magic, Wizardry and Wonders PROGRAMMING constructive algorithms greedy 1600

Vasya the Great Magician and Conjurer loves all kinds of miracles and wizardry. In one wave of a magic wand he can turn an object into something else. But, as you all know, there is no better magic in the Universe than the magic of numbers. That's why Vasya adores math and spends a lot of time turning some numbers into some other ones. This morning he has n cards with integers lined up in front of him. Each integer is not less than 1, but not greater than l . When Vasya waves his magic wand, two rightmost cards vanish from the line and a new card magically appears in their place. It contains the difference between the left and the right numbers on the two vanished cards. Vasya was very interested to know what would happen next, and so he waved with his magic wand on and on, until the table had a single card left. Suppose that Vasya originally had the following cards: 4, 1, 1, 3 (listed from left to right). Then after the first wave the line would be: 4, 1, -2, and after the second one: 4, 3, and after the third one the table would have a single card with number 1. Please note that in spite of the fact that initially all the numbers on the cards were not less than 1 and not greater than l , the numbers on the appearing cards can be anything, no restrictions are imposed on them. It is now evening. Vasya is very tired and wants to return everything back, but does not remember which cards he had in the morning. He only remembers that there were n cards, they contained integers from 1 to l , and after all magical actions he was left with a single card containing number d . Help Vasya to recover the initial set of cards with numbers. The single line contains three space-separated integers: n ( 2 ≤ n ≤ 100 ) — the initial number of cards on the table, d ( | d | ≤ 10 4 ) — the number on the card that was left on the table after all the magical actions, and l ( 1 ≤ l ≤ 100 ) — the limits for the initial integers. If Vasya is mistaken, that is, if there doesn't exis

Tutorials

Tutorial Codeforces Round #143

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
39217947 Tapojit047 B June 13, 2018, 1:35 p.m. OK GNU C++ TESTS 44 30 0 1600
40629081 Yasseenkamel B July 22, 2018, 7:55 a.m. OK GNU C++ TESTS 44 60 0 1600
42760304 sigma_g B Sept. 11, 2018, 10:08 a.m. OK GNU C11 TESTS 44 62 307200 1600
65264057 margulkz B Nov. 17, 2019, 4:06 p.m. OK GNU C++11 TESTS 44 62 0 1600
63299685 Mina_Yousry B Oct. 24, 2019, 1:57 p.m. OK GNU C++11 TESTS 44 62 0 1600
62546948 Coder_Zakir B Oct. 14, 2019, 6:51 a.m. OK GNU C++11 TESTS 44 62 0 1600
59655051 Bob2006 B Aug. 29, 2019, 9:58 a.m. OK GNU C++11 TESTS 44 62 0 1600
59422857 omarshagar B Aug. 24, 2019, 10:41 p.m. OK GNU C++11 TESTS 44 62 0 1600
59377685 DetectivePeralta B Aug. 23, 2019, 11:42 p.m. OK GNU C++11 TESTS 44 62 0 1600
59238126 Potassium B Aug. 21, 2019, 6:20 p.m. OK GNU C++11 TESTS 44 62 0 1600
58493554 christo B Aug. 9, 2019, 11:08 a.m. OK GNU C++11 TESTS 44 62 0 1600
57939069 vjudge1 B July 29, 2019, 11:55 a.m. OK GNU C++11 TESTS 44 62 0 1600
67984374 sarthakk_26 B Dec. 30, 2019, 9:15 p.m. OK GNU C++11 TESTS 44 62 0 1600
39683416 imnotreal B June 26, 2018, 6:15 p.m. OK GNU C++14 TESTS 44 30 0 1600
39286358 vj_rahil B June 16, 2018, 11:43 a.m. OK GNU C++14 TESTS 44 30 0 1600
49683547 spark_in B Feb. 10, 2019, 5:17 a.m. OK GNU C++14 TESTS 44 30 0 1600
67561957 CoderAnshu B Dec. 24, 2019, 5:51 p.m. OK GNU C++14 TESTS 44 60 0 1600
61983460 deceptioncf B Oct. 6, 2019, 12:46 p.m. OK GNU C++14 TESTS 44 60 0 1600
59440257 yuvi B Aug. 25, 2019, 10:52 a.m. OK GNU C++14 TESTS 44 60 0 1600
54973362 pseudohandle B June 2, 2019, 9:35 a.m. OK GNU C++14 TESTS 44 60 0 1600
47330877 bpsr B Dec. 21, 2018, 12:52 p.m. OK GNU C++14 TESTS 44 60 0 1600
47276023 aditya_sheth B Dec. 19, 2018, 7:23 p.m. OK GNU C++14 TESTS 44 60 0 1600
68244429 jasoria182507 B Jan. 5, 2020, 2:01 p.m. OK GNU C++14 TESTS 44 60 0 1600
59911313 Obada_sadaqa B Sept. 2, 2019, 5:21 p.m. OK GNU C++17 TESTS 44 30 0 1600
40571013 doppler21 B July 20, 2018, 8:09 a.m. OK GNU C++17 TESTS 44 30 0 1600
55008775 tufty B June 3, 2019, 9:02 a.m. OK GNU C++17 TESTS 44 30 0 1600
63018980 jsparrow858 B Oct. 20, 2019, 1:50 p.m. OK GNU C++17 TESTS 44 30 0 1600
61844112 le_JenD28 B Oct. 4, 2019, 10:45 a.m. OK GNU C++17 TESTS 44 60 0 1600
69290790 TheWitcher B Jan. 22, 2020, 10:09 a.m. OK GNU C++17 TESTS 44 60 0 1600
69281410 legendary_Coder B Jan. 22, 2020, 6:08 a.m. OK GNU C++17 TESTS 44 60 0 1600
67415555 cf238 B Dec. 22, 2019, 9:44 a.m. OK GNU C++17 TESTS 44 60 0 1600
62601486 mshv97 B Oct. 15, 2019, 5:48 a.m. OK GNU C++17 TESTS 44 60 0 1600
62094127 .s. B Oct. 8, 2019, 6:53 a.m. OK GNU C++17 TESTS 44 60 0 1600
47312392 deepak4669 B Dec. 20, 2018, 9:07 p.m. OK Java 8 TESTS 44 218 0 1600
62077808 shankymichi B Oct. 7, 2019, 7:10 p.m. OK Java 8 TESTS 44 218 0 1600
47312422 deepak4669 B Dec. 20, 2018, 9:09 p.m. OK Java 8 TESTS 44 218 0 1600
44407870 Anonymous B Oct. 16, 2018, 3:34 p.m. OK Java 8 TESTS 44 248 0 1600
45129960 BiggestPrime B Oct. 31, 2018, 9:50 a.m. OK Java 8 TESTS 44 248 0 1600
69289322 adarsh000321 B Jan. 22, 2020, 9:33 a.m. OK Java 8 TESTS 44 248 0 1600
52321216 saurabhs1206 B April 4, 2019, 7:54 p.m. OK Java 8 TESTS 44 248 0 1600
45338417 aneesh2312 B Nov. 5, 2018, 7 p.m. OK Java 8 TESTS 44 280 0 1600
56236254 shubhampasari B June 28, 2019, 4:22 p.m. OK Java 8 TESTS 44 280 0 1600
56238396 shubhampasari B June 28, 2019, 5:16 p.m. OK Java 8 TESTS 44 310 0 1600
64860161 Tampere B Nov. 14, 2019, 2:36 a.m. OK MS C++ TESTS 44 62 0 1600
58164799 vjudge2 B Aug. 2, 2019, 8:40 a.m. OK MS C++ TESTS 44 62 0 1600
40990663 ReaLNero1 B July 31, 2018, 12:06 a.m. OK MS C++ TESTS 44 62 0 1600
60034082 rajat_2548 B Sept. 4, 2019, 4:14 p.m. OK PyPy 2 TESTS 44 248 0 1600
51282544 prakhar_lohumi B March 14, 2019, 5:13 a.m. OK PyPy 3 TESTS 44 280 0 1600
62780310 ashok123 B Oct. 17, 2019, 12:44 p.m. OK PyPy 3 TESTS 44 280 0 1600
49603151 deadguy B Feb. 7, 2019, 6:07 p.m. OK PyPy 3 TESTS 44 280 614400 1600
68864239 Dram1 B Jan. 15, 2020, 1:04 p.m. OK PyPy 3 TESTS 44 310 0 1600
67442024 mota_haathi B Dec. 22, 2019, 7:47 p.m. OK Python 2 TESTS 44 342 0 1600
41389531 Grigor01 B Aug. 9, 2018, 7:44 a.m. OK Python 2 TESTS 44 342 0 1600
69292318 tushartyagi8750 B Jan. 22, 2020, 10:47 a.m. OK Python 3 TESTS 44 218 0 1600
54088968 Mohamed_Ayman B May 14, 2019, 9:21 a.m. OK Python 3 TESTS 44 218 0 1600
55688622 MajAK B June 17, 2019, 4:50 p.m. OK Python 3 TESTS 44 218 0 1600
42124056 Mk_Python_v1 B Aug. 26, 2018, 2:03 p.m. OK Python 3 TESTS 44 248 0 1600
53793487 pohzipohzi B May 5, 2019, 2:11 p.m. OK Python 3 TESTS 44 248 307200 1600
59667389 ashwin2000 B Aug. 29, 2019, 2:40 p.m. OK Python 3 TESTS 44 248 307200 1600
67415587 zapdospops B Dec. 22, 2019, 9:45 a.m. OK Python 3 TESTS 44 248 307200 1600
67153253 ZerooCool B Dec. 18, 2019, 11:36 a.m. OK Python 3 TESTS 44 280 0 1600
45089235 findingo B Oct. 30, 2018, 8:51 a.m. OK Rust TESTS 44 62 0 1600

remove filters

Back to search problems