CROC-MBTU 2012, Elimination Round (ACM-ICPC)

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
245 CROC-MBTU 2012, Elimination Round (ACM-ICPC) FINISHED False 7800 384359397 Nov. 19, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1557 ) C Game with Coins PROGRAMMING greedy 1700

B"Two pirates Polycarpus and Vasily play a very interesting game. They have n chests with coins, the chests are numbered with integers from 1 to n. Chest number i has ai coins. Polycarpus and Vasily move in turns. Polycarpus moves first. During a move a player is allowed to choose a positive integer x (2 xc2 xb7x xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) and take a coin from each chest with numbers x, 2 xc2 xb7x, 2 xc2 xb7x xe2 x80 x89+ xe2 x80 x891. It may turn out that some chest has no coins, in this case the player doesn't take a coin from this chest. The game finishes when all chests get emptied. Polycarpus isn't a greedy scrooge. Polycarpys is a lazy slob. So he wonders in what minimum number of moves the game can finish. Help Polycarpus, determine the minimum number of moves in which the game can finish. Note that Polycarpus counts not only his moves, he also counts Vasily's moves. The first line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of chests with coins. The second line contains a sequence of space-separated integers: a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000), where ai is the number of coins in the chest number i at the beginning of the game. Print a single integer -- the minimum number of moves needed to finish the game. If no sequence of turns leads to finishing the game, print -1. In the first test case there isn't a single move that can be made. That's why the players won't be able to empty the chests. In the second sample there is only one possible move x xe2 x80 x89= xe2 x80 x891. This move should be repeated at least 3 times to empty the third chest."...

Tutorials

КРОК-МВТУ 2012, Отборочный раунд (Разбор)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2591992 amirrr C Nov. 19, 2012, 4:02 p.m. OK Delphi TESTS 40 31 102400 1700
2604429 AleksanderBalobanov C Nov. 20, 2012, 9:45 a.m. OK Delphi TESTS 40 31 102400 1700
2597708 San4eS C Nov. 19, 2012, 5:13 p.m. OK Delphi TESTS 40 31 1945600 1700
2597636 KondorB C Nov. 19, 2012, 5:13 p.m. OK Delphi TESTS 40 31 1945600 1700
2597457 Shkiper C Nov. 19, 2012, 5:10 p.m. OK Delphi TESTS 40 31 1945600 1700
2594388 gohard C Nov. 19, 2012, 4:29 p.m. OK Delphi TESTS 40 31 1945600 1700
2599254 Misha100896 C Nov. 19, 2012, 5:32 p.m. OK Delphi TESTS 40 31 2048000 1700
2597259 pashakovalenko C Nov. 19, 2012, 5:08 p.m. OK Delphi TESTS 40 31 2048000 1700
2596252 maksimkzn C Nov. 19, 2012, 4:54 p.m. OK Delphi TESTS 40 31 2048000 1700
2596195 danpol C Nov. 19, 2012, 4:54 p.m. OK Delphi TESTS 40 31 2048000 1700
2803133 liangxi11 C Dec. 21, 2012, 10:47 a.m. OK FPC TESTS 40 15 0 1700
4142809 Nik_Storm_2010 C July 23, 2013, 7:01 p.m. OK FPC TESTS 40 15 102400 1700
2680323 Saimon_Saret C Nov. 30, 2012, 12:43 p.m. OK FPC TESTS 40 31 0 1700
2628201 DarthRevan C Nov. 22, 2012, 4:25 p.m. OK FPC TESTS 40 31 0 1700
2626800 vjtest C Nov. 22, 2012, 12:27 p.m. OK FPC TESTS 40 31 0 1700
2616838 X-Panda C Nov. 21, 2012, 4:28 p.m. OK FPC TESTS 40 31 0 1700
2610637 aleksandr_severinov C Nov. 21, 2012, 2:07 p.m. OK FPC TESTS 40 31 0 1700
2609874 guguna C Nov. 21, 2012, 11:05 a.m. OK FPC TESTS 40 31 0 1700
2606659 AdilbekZh C Nov. 20, 2012, 4:06 p.m. OK FPC TESTS 40 31 0 1700
2606516 chenyuguan C Nov. 20, 2012, 3:38 p.m. OK FPC TESTS 40 31 0 1700
3015504 vjudge2 C Jan. 27, 2013, 8:59 a.m. OK GNU C TESTS 40 15 0 1700
3016211 gxnncrx1993 C Jan. 27, 2013, 12:30 p.m. OK GNU C TESTS 40 15 4505600 1700
4619487 maverickme C Oct. 1, 2013, 11:27 a.m. OK GNU C TESTS 40 30 0 1700
2636866 vjtest C Nov. 24, 2012, 9:53 a.m. OK GNU C TESTS 40 31 0 1700
2635971 vjtest C Nov. 24, 2012, 6:58 a.m. OK GNU C TESTS 40 31 0 1700
2635881 vjtest C Nov. 24, 2012, 6:35 a.m. OK GNU C TESTS 40 31 0 1700
2635855 vjtest C Nov. 24, 2012, 6:27 a.m. OK GNU C TESTS 40 31 0 1700
2603871 cpy C Nov. 20, 2012, 7:56 a.m. OK GNU C TESTS 40 31 0 1700
2600556 NoSoul C Nov. 19, 2012, 5:55 p.m. OK GNU C TESTS 40 31 1433600 1700
2598967 ZeroPointer C Nov. 19, 2012, 5:29 p.m. OK GNU C TESTS 40 31 1433600 1700
4568561 meodorewan C Sept. 26, 2013, 4:42 p.m. OK GNU C++ TESTS 40 0 409600 1700
4069630 KrK C July 14, 2013, 12:36 p.m. OK GNU C++ TESTS 40 15 0 1700
4060199 vaibhavG55 C July 13, 2013, 3:19 p.m. OK GNU C++ TESTS 40 15 0 1700
4060148 vaibhavG55 C July 13, 2013, 3:04 p.m. OK GNU C++ TESTS 40 15 0 1700
4010288 wyest C July 4, 2013, 8:36 a.m. OK GNU C++ TESTS 40 15 0 1700
3932886 moji C June 21, 2013, 4 p.m. OK GNU C++ TESTS 40 15 0 1700
3911742 ishail C June 17, 2013, 11:18 p.m. OK GNU C++ TESTS 40 15 0 1700
3911164 thatznikhil C June 17, 2013, 6:33 p.m. OK GNU C++ TESTS 40 15 0 1700
3851482 HARSH94 C June 9, 2013, 4:46 p.m. OK GNU C++ TESTS 40 15 0 1700
3702267 vjudge2 C May 11, 2013, 11:40 a.m. OK GNU C++ TESTS 40 15 0 1700
4028963 amb288 C July 6, 2013, 12:18 a.m. OK GNU C++0x TESTS 40 15 0 1700
3769236 A_Le_K C May 25, 2013, 1:49 p.m. OK GNU C++0x TESTS 40 15 0 1700
3733065 teru C May 18, 2013, 10:13 a.m. OK GNU C++0x TESTS 40 15 0 1700
3147614 Doxer C Feb. 19, 2013, 3:52 p.m. OK GNU C++0x TESTS 40 15 0 1700
3137002 ishikado C Feb. 16, 2013, 2:41 p.m. OK GNU C++0x TESTS 40 15 0 1700
2826962 teru C Dec. 25, 2012, 7:49 p.m. OK GNU C++0x TESTS 40 15 0 1700
10240440 I_love_Hoang_Yen C March 11, 2015, 6:26 p.m. OK GNU C++0x TESTS 40 30 0 1700
9978170 NgocHai C Feb. 24, 2015, 7:59 a.m. OK GNU C++0x TESTS 40 30 0 1700
8510046 krismaz C Nov. 1, 2014, 8:45 a.m. OK GNU C++0x TESTS 40 30 0 1700
7367889 Marcil C Aug. 7, 2014, 2:37 p.m. OK GNU C++0x TESTS 40 30 0 1700
27904905 heisenberg13 C June 19, 2017, 12:49 p.m. OK GNU C++11 TESTS 40 30 0 1700
27900290 firehawk C June 19, 2017, 8:56 a.m. OK GNU C++11 TESTS 40 30 0 1700
27342059 Momentaiii C May 25, 2017, 5:32 p.m. OK GNU C++11 TESTS 40 30 0 1700
22080318 cjtoribio C Nov. 6, 2016, 6:05 p.m. OK GNU C++11 TESTS 40 30 0 1700
20915942 bill_kondo C Sept. 25, 2016, 9:40 p.m. OK GNU C++11 TESTS 40 30 0 1700
20765616 _ED C Sept. 19, 2016, 10:35 p.m. OK GNU C++11 TESTS 40 30 0 1700
20302659 .tx C Aug. 31, 2016, 12:12 p.m. OK GNU C++11 TESTS 40 30 0 1700
19158907 infinite6 C July 15, 2016, 5:36 p.m. OK GNU C++11 TESTS 40 30 0 1700
18750415 Hamzqq9 C June 27, 2016, 10:39 a.m. OK GNU C++11 TESTS 40 30 0 1700
16517505 Deathly_Hallows C March 4, 2016, 3:04 p.m. OK GNU C++11 TESTS 40 30 0 1700
55553368 vjudge2 C June 14, 2019, 8:33 a.m. OK GNU C++14 TESTS 40 30 0 1700
31953621 Indriya C Nov. 1, 2017, 2:36 p.m. OK GNU C++14 TESTS 40 30 0 1700
31193832 kapildd C Oct. 10, 2017, 3:29 p.m. OK GNU C++14 TESTS 40 30 0 1700
31139053 ImagineDragons C Oct. 8, 2017, 9:34 a.m. OK GNU C++14 TESTS 40 30 0 1700
30914380 Shellhead96 C Oct. 1, 2017, 4:50 p.m. OK GNU C++14 TESTS 40 30 0 1700
27425723 mjguru C May 29, 2017, 8:27 a.m. OK GNU C++14 TESTS 40 30 0 1700
22080090 Mjgonzales C Nov. 6, 2016, 5:50 p.m. OK GNU C++14 TESTS 40 30 0 1700
22049522 uc-nuts C Nov. 5, 2016, 6:32 a.m. OK GNU C++14 TESTS 40 30 0 1700
20609313 First4196 SaBuZa boatt C Sept. 14, 2016, 8:22 a.m. OK GNU C++14 TESTS 40 30 0 1700
32999148 farukkastamonuda C Dec. 7, 2017, 11:37 a.m. OK GNU C++14 TESTS 40 30 1945600 1700
51934216 cauchyg C March 28, 2019, 11:49 a.m. OK GNU C++17 TESTS 40 30 0 1700
45380271 zx93 C Nov. 6, 2018, 2:22 p.m. OK GNU C++17 TESTS 40 30 614400 1700
68669854 tnakao C Jan. 12, 2020, 4:28 p.m. OK GNU C++17 TESTS 40 60 0 1700
69546531 vjudge2 C Jan. 26, 2020, 3:16 a.m. OK GNU C++17 TESTS 40 60 0 1700
56986570 Dishoom88 C July 13, 2019, 4:04 p.m. OK GNU C++17 TESTS 40 60 0 1700
56986363 Dishoom88 C July 13, 2019, 3:58 p.m. OK GNU C++17 TESTS 40 60 0 1700
55806026 StrAnge.R C June 19, 2019, 10:28 p.m. OK GNU C++17 TESTS 40 60 0 1700
55551062 vjudge2 C June 14, 2019, 7:05 a.m. OK GNU C++17 TESTS 40 60 0 1700
50661186 TarekHelwani C March 1, 2019, 11:22 p.m. OK GNU C++17 TESTS 40 60 0 1700
45376740 vjudge1 C Nov. 6, 2018, 12:43 p.m. OK GNU C++17 TESTS 40 60 307200 1700
2592024 watashi C Nov. 19, 2012, 4:02 p.m. OK Haskell TESTS 40 31 0 1700
4052551 mkirsche C July 11, 2013, 11:17 p.m. OK Java 6 TESTS 40 78 0 1700
2609810 N0D1R C Nov. 21, 2012, 10:45 a.m. OK Java 6 TESTS 40 78 0 1700
2590180 niyaznigmatul C Nov. 19, 2012, 3:44 p.m. OK Java 6 TESTS 40 78 0 1700
2602501 hama-du C Nov. 20, 2012, 12:28 a.m. OK Java 6 TESTS 40 78 0 1700
2606308 AZerone C Nov. 20, 2012, 2:59 p.m. OK Java 6 TESTS 40 78 0 1700
2601117 gh_ost C Nov. 19, 2012, 6:33 p.m. OK Java 6 TESTS 40 78 43110400 1700
2600594 Azat_Yusupov C Nov. 19, 2012, 5:56 p.m. OK Java 6 TESTS 40 78 43110400 1700
2596152 PolarNick C Nov. 19, 2012, 4:53 p.m. OK Java 6 TESTS 40 78 43110400 1700
2600541 jorge C Nov. 19, 2012, 5:54 p.m. OK Java 6 TESTS 40 78 43212800 1700
4138856 DoublePointer C July 23, 2013, 5:29 a.m. OK Java 6 TESTS 40 93 0 1700
2590095 mmaxio C Nov. 19, 2012, 3:44 p.m. OK Java 7 TESTS 40 78 0 1700
2600724 PlayLikeNeverB4 C Nov. 19, 2012, 6:03 p.m. OK Java 7 TESTS 40 78 44851200 1700
2590389 dmitry.uvarov C Nov. 19, 2012, 3:46 p.m. OK Java 7 TESTS 40 93 0 1700
2602161 di_halt C Nov. 19, 2012, 9:49 p.m. OK Java 7 TESTS 40 93 44851200 1700
2600441 phantom11 C Nov. 19, 2012, 5:51 p.m. OK Java 7 TESTS 40 93 44851200 1700
2598789 HAPKOMAH C Nov. 19, 2012, 5:27 p.m. OK Java 7 TESTS 40 93 44851200 1700
2593829 khanhptnk C Nov. 19, 2012, 4:22 p.m. OK Java 7 TESTS 40 93 44851200 1700
2592469 Jovfer C Nov. 19, 2012, 4:07 p.m. OK Java 7 TESTS 40 93 44851200 1700
2601702 Tolik C Nov. 19, 2012, 7:47 p.m. OK Java 7 TESTS 40 93 44953600 1700
2681949 islam-al-aarag C Nov. 30, 2012, 7:07 p.m. OK Java 7 TESTS 40 109 0 1700
26964327 pitfall C May 8, 2017, 9:12 p.m. OK Java 8 TESTS 40 218 0 1700
19505480 poikniok C July 30, 2016, 12:09 a.m. OK Java 8 TESTS 40 218 0 1700
12736782 tqjex C Aug. 28, 2015, 10:27 p.m. OK Java 8 TESTS 40 218 0 1700
50736453 rookie19 C March 3, 2019, 1:08 p.m. OK Java 8 TESTS 40 248 0 1700
44817467 Anonymous C Oct. 24, 2018, 10:28 p.m. OK Java 8 TESTS 40 248 0 1700
12834340 I_Need_Alex_R_Coleman C Sept. 3, 2015, 9:04 p.m. OK Java 8 TESTS 40 248 0 1700
22284716 zz_end C Nov. 17, 2016, 9:56 a.m. OK Java 8 TESTS 40 278 0 1700
68402722 CodAR C Jan. 8, 2020, 1:45 p.m. OK Java 8 TESTS 40 280 0 1700
40853647 SecondThread C July 27, 2018, 4 p.m. OK Java 8 TESTS 40 280 0 1700
12689488 jaconey C Aug. 24, 2015, 9:58 p.m. OK Java 8 TESTS 40 310 0 1700
2681719 Guliash C Nov. 30, 2012, 5:53 p.m. OK Mono C# TESTS 40 93 102400 1700
45331687 bortolozz C Nov. 5, 2018, 3:32 p.m. OK Mono C# TESTS 40 124 3584000 1700
2601132 rosomakho C Nov. 19, 2012, 6:35 p.m. OK Mono C# TESTS 40 687 10035200 1700
2599754 m.zandy C Nov. 19, 2012, 5:37 p.m. OK Mono C# TESTS 40 750 12902400 1700
2592378 fiver C Nov. 19, 2012, 4:06 p.m. OK Mono C# TESTS 40 843 11776000 1700
2595012 it4.kp C Nov. 19, 2012, 4:37 p.m. OK Mono C# TESTS 40 1093 12083200 1700
4028883 Ermiar C July 5, 2013, 11:33 p.m. OK MS C# TESTS 40 62 2252800 1700
23040922 og.kostya C Dec. 17, 2016, 6:51 a.m. OK MS C# TESTS 40 92 102400 1700
2905171 Yevgen C Jan. 11, 2013, 1:58 p.m. OK MS C++ TESTS 40 15 0 1700
3616493 vjudge5 C April 24, 2013, 12:37 p.m. OK MS C++ TESTS 40 15 0 1700
3616492 vjudge4 C April 24, 2013, 12:36 p.m. OK MS C++ TESTS 40 15 0 1700
3616439 vjudge2 C April 24, 2013, 12:27 p.m. OK MS C++ TESTS 40 15 0 1700
3616435 vjudge3 C April 24, 2013, 12:27 p.m. OK MS C++ TESTS 40 15 0 1700
3616305 vjudge2 C April 24, 2013, 12:01 p.m. OK MS C++ TESTS 40 15 0 1700
3615927 vjudge5 C April 24, 2013, 10:33 a.m. OK MS C++ TESTS 40 15 0 1700
3077331 airon C Feb. 6, 2013, 11:39 a.m. OK MS C++ TESTS 40 15 0 1700
3001240 wejex C Jan. 24, 2013, 9:29 a.m. OK MS C++ TESTS 40 15 0 1700
2869965 HIR180 C Jan. 3, 2013, 4:26 p.m. OK MS C++ TESTS 40 15 0 1700
2593233 navi C Nov. 19, 2012, 4:15 p.m. OK Perl TESTS 40 46 921600 1700
4145282 leeaa C July 24, 2013, 7:29 a.m. OK Python 2 TESTS 40 46 0 1700
2876427 fatcamper C Jan. 5, 2013, 11:15 p.m. OK Python 2 TESTS 40 62 0 1700
2697260 konstantanter C Dec. 5, 2012, 1:32 p.m. OK Python 2 TESTS 40 62 0 1700
2633754 miniput C Nov. 23, 2012, 4:50 p.m. OK Python 2 TESTS 40 62 0 1700
2607986 joshuahmaynez C Nov. 21, 2012, 12:43 a.m. OK Python 2 TESTS 40 62 0 1700
2607263 rowdark C Nov. 20, 2012, 6:49 p.m. OK Python 2 TESTS 40 62 0 1700
2605249 TempuX C Nov. 20, 2012, 12:30 p.m. OK Python 2 TESTS 40 62 0 1700
2605247 TempuX C Nov. 20, 2012, 12:29 p.m. OK Python 2 TESTS 40 62 0 1700
2605068 hujiale C Nov. 20, 2012, 11:58 a.m. OK Python 2 TESTS 40 62 0 1700
2603267 nealzane C Nov. 20, 2012, 5:58 a.m. OK Python 2 TESTS 40 62 0 1700
32569373 XiaoDan C Nov. 23, 2017, 8:12 a.m. OK Python 3 TESTS 40 124 0 1700
5340825 yugle7 C Dec. 3, 2013, 7:51 a.m. OK Python 3 TESTS 40 124 0 1700
4434826 __ivan__ C Sept. 9, 2013, 9:27 a.m. OK Python 3 TESTS 40 124 0 1700
37872443 YazanRi C May 3, 2018, 10:57 p.m. OK Python 3 TESTS 40 156 7065600 1700
42134927 Mk_Python_v1 C Aug. 26, 2018, 10:26 p.m. OK Python 3 TESTS 40 248 0 1700
2607426 mishagam C Nov. 20, 2012, 7:35 p.m. OK Scala TESTS 40 296 0 1700
2905030 cgy4ever C Jan. 11, 2013, 1:03 p.m. OK Scala TESTS 40 375 204800 1700

remove filters

Back to search problems