Codeforces Round 283 (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
496 Codeforces Round 283 (Div. 2) FINISHED False 7200 318778204 Dec. 17, 2014, 4:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3048 ) D Tennis Game PROGRAMMING binary search 2100

B"Petya and Gena love playing table tennis. A single match is played according to the following rules: a match consists of multiple sets, each set consists of multiple serves. Each serve is won by one of the players, this player scores one point. As soon as one of the players scores t points, he wins the set; then the next set starts and scores of both players are being set to 0. As soon as one of the players wins the total of s sets, he wins the match and the match is over. Here s and t are some positive integer numbers. To spice it up, Petya and Gena choose new numbers s and t before every match. Besides, for the sake of history they keep a record of each match: that is, for each serve they write down the winner. Serve winners are recorded in the chronological order. In a record the set is over as soon as one of the players scores t points and the match is over as soon as one of the players wins s sets. Petya and Gena have found a record of an old match. Unfortunately, the sequence of serves in the record isn't divided into sets and numbers s and t for the given match are also lost. The players now wonder what values of s and t might be. Can you determine all the possible options? The first line contains a single integer n -- the length of the sequence of games (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). The second line contains n space-separated integers ai. If ai xe2 x80 x89= xe2 x80 x891, then the i-th serve was won by Petya, if ai xe2 x80 x89= xe2 x80 x892, then the i-th serve was won by Gena. It is not guaranteed that at least one option for numbers s and t corresponds to the given record. In the first line print a single number k -- the number of options for numbers s and t. In each of the following k lines print two integers si and ti -- the option for numbers s and t. Print the options in the order of increasing si, and for equal si -- in the order of increasing ti."...

Tutorials

15208

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58242910 hatsuyuki15 D Aug. 4, 2019, 2:57 a.m. OK D TESTS 53 62 4505600 2100
9179371 igor.glushkov D Dec. 17, 2014, 8:33 p.m. OK Delphi TESTS 53 46 5632000 2100
9202957 ruban D Dec. 20, 2014, 3:08 a.m. OK Delphi TESTS 53 46 17203200 2100
9496832 AHTuTTuTyX D Jan. 21, 2015, 10:09 p.m. OK Delphi TESTS 53 171 40140800 2100
9358448 xuanquang1999 D Jan. 4, 2015, 8:36 a.m. OK FPC TESTS 53 31 5734400 2100
9179192 Freedom D Dec. 17, 2014, 8:19 p.m. OK FPC TESTS 53 46 2560000 2100
31076936 vjudge1 D Oct. 6, 2017, 2:12 p.m. OK FPC TESTS 53 46 32153600 2100
13340279 ligerre D Oct. 2, 2015, 7:54 a.m. OK FPC TESTS 53 62 3788800 2100
9304228 Irkutsk_ISRU D Dec. 30, 2014, 9:47 a.m. OK FPC TESTS 53 78 1740800 2100
9179119 BenderRodriguez D Dec. 17, 2014, 8:15 p.m. OK FPC TESTS 53 124 3379200 2100
29720299 vjudge2 D Aug. 24, 2017, 1:57 a.m. OK FPC TESTS 53 140 3993600 2100
23551775 Gray_58 D Jan. 5, 2017, 9:36 a.m. OK FPC TESTS 53 155 5632000 2100
13342136 OriginalM D Oct. 2, 2015, 10:57 a.m. OK FPC TESTS 53 156 2969600 2100
30610746 darkkcyan D Sept. 22, 2017, 9:48 a.m. OK FPC TESTS 53 171 2048000 2100
12724220 felipeblassioli D Aug. 27, 2015, 7:51 p.m. OK GNU C TESTS 53 46 2457600 2100
12430527 felipeblassioli D Aug. 9, 2015, 11:25 p.m. OK GNU C TESTS 53 46 2457600 2100
13243197 vprime5 D Sept. 26, 2015, 11:31 p.m. OK GNU C TESTS 53 62 1638400 2100
12581801 vprime5 D Aug. 17, 2015, 11:04 p.m. OK GNU C TESTS 53 62 1638400 2100
12420884 vprime5 D Aug. 9, 2015, 4:14 a.m. OK GNU C TESTS 53 62 1638400 2100
12904144 leeohaddad D Sept. 8, 2015, 11:58 p.m. OK GNU C TESTS 53 62 2764800 2100
12683125 evnsanches D Aug. 24, 2015, 11:02 a.m. OK GNU C TESTS 53 156 2048000 2100
9229909 iagoneves D Dec. 23, 2014, 4:32 a.m. OK GNU C++ TESTS 53 30 1638400 2100
9190629 shantanushanto D Dec. 18, 2014, 6:33 p.m. OK GNU C++ TESTS 53 30 3174400 2100
12088212 Manoel D July 16, 2015, 8:06 p.m. OK GNU C++ TESTS 53 31 1024000 2100
12088209 turtlee D July 16, 2015, 8:05 p.m. OK GNU C++ TESTS 53 31 1024000 2100
9210657 rishabhiitr D Dec. 20, 2014, 8:47 p.m. OK GNU C++ TESTS 53 31 1228800 2100
9193071 slowlight D Dec. 19, 2014, 3:14 a.m. OK GNU C++ TESTS 53 31 1228800 2100
14117478 artistlukas D Nov. 7, 2015, 6:16 a.m. OK GNU C++ TESTS 53 31 1638400 2100
9243857 corn D Dec. 24, 2014, 1:09 p.m. OK GNU C++ TESTS 53 31 1638400 2100
9238098 whn6325689 D Dec. 24, 2014, 5:47 a.m. OK GNU C++ TESTS 53 31 1638400 2100
9200693 Pacific D Dec. 19, 2014, 7:07 p.m. OK GNU C++ TESTS 53 31 1638400 2100
9181993 Recos D Dec. 18, 2014, 3:34 a.m. OK GNU C++0x TESTS 53 31 2048000 2100
9237850 tuna_salad D Dec. 24, 2014, 4:52 a.m. OK GNU C++0x TESTS 53 31 2150400 2100
9191364 AJIBUH D Dec. 18, 2014, 8:01 p.m. OK GNU C++0x TESTS 53 31 3174400 2100
9222909 mc_mosa D Dec. 22, 2014, 11:31 a.m. OK GNU C++0x TESTS 53 31 3584000 2100
9182283 chinesejiang D Dec. 18, 2014, 4:29 a.m. OK GNU C++0x TESTS 53 31 4198400 2100
9181312 saketh D Dec. 18, 2014, 1:08 a.m. OK GNU C++0x TESTS 53 46 2048000 2100
9199453 merolish D Dec. 19, 2014, 5:04 p.m. OK GNU C++0x TESTS 53 46 3072000 2100
9182982 IcyGirl D Dec. 18, 2014, 6:03 a.m. OK GNU C++0x TESTS 53 46 3174400 2100
9185242 Koblyk D Dec. 18, 2014, 10:17 a.m. OK GNU C++0x TESTS 53 46 3481600 2100
9302147 moh.amr D Dec. 30, 2014, 2:07 a.m. OK GNU C++0x TESTS 53 46 3584000 2100
53301651 about D April 25, 2019, 9:19 p.m. OK GNU C11 TESTS 53 78 1638400 2100
16796561 saatwik27 D March 18, 2016, 8:18 p.m. OK GNU C++11 TESTS 53 31 1638400 2100
61268255 strawberrry D Sept. 25, 2019, 1:20 p.m. OK GNU C++11 TESTS 53 31 1638400 2100
19021353 141310111 D July 11, 2016, 5:42 a.m. OK GNU C++11 TESTS 53 31 2048000 2100
19021314 141310111 D July 11, 2016, 5:40 a.m. OK GNU C++11 TESTS 53 31 2048000 2100
19021440 dhuacm10 D July 11, 2016, 5:46 a.m. OK GNU C++11 TESTS 53 31 2048000 2100
19072471 Megrez D July 13, 2016, 12:16 p.m. OK GNU C++11 TESTS 53 31 2252800 2100
27767952 Aikurce D June 14, 2017, 5:36 a.m. OK GNU C++11 TESTS 53 31 2252800 2100
15233159 glasirius D Jan. 8, 2016, 6:43 a.m. OK GNU C++11 TESTS 53 31 2764800 2100
25826643 RonChen D March 26, 2017, 7:34 p.m. OK GNU C++11 TESTS 53 31 3686400 2100
25826655 toster1287 D March 26, 2017, 7:34 p.m. OK GNU C++11 TESTS 53 31 3686400 2100
25318243 vjudge2 D March 7, 2017, 10:23 a.m. OK GNU C++14 TESTS 53 31 3584000 2100
25146745 luosuocumt_16 D March 2, 2017, 11:52 a.m. OK GNU C++14 TESTS 53 31 3686400 2100
25967939 Masquerade- D March 31, 2017, 4:44 a.m. OK GNU C++14 TESTS 53 31 4300800 2100
28688380 comfi D July 19, 2017, 7:32 a.m. OK GNU C++14 TESTS 53 31 4710400 2100
29546095 vjudge4 D Aug. 18, 2017, 8:01 a.m. OK GNU C++14 TESTS 53 46 1638400 2100
29516565 vjudge5 D Aug. 17, 2017, 2:37 a.m. OK GNU C++14 TESTS 53 46 1740800 2100
40019608 Zxyelf D July 6, 2018, 5:49 a.m. OK GNU C++14 TESTS 53 46 2048000 2100
26979769 Bassel D May 9, 2017, 5:05 p.m. OK GNU C++14 TESTS 53 46 2048000 2100
31721395 gtpan77 D Oct. 25, 2017, 7:04 p.m. OK GNU C++14 TESTS 53 46 2048000 2100
68393578 AlexArdelean D Jan. 8, 2020, 9:51 a.m. OK GNU C++14 TESTS 53 46 2252800 2100
60337023 SnowLove D Sept. 10, 2019, 9:03 a.m. OK GNU C++17 TESTS 53 46 1638400 2100
61854032 ruo D Oct. 4, 2019, 1:34 p.m. OK GNU C++17 TESTS 53 46 2048000 2100
45246192 roll_no_1 D Nov. 3, 2018, 2:04 p.m. OK GNU C++17 TESTS 53 46 2150400 2100
58367553 kwebi D Aug. 6, 2019, 5:02 a.m. OK GNU C++17 TESTS 53 46 2457600 2100
61858537 TomazGomes D Oct. 4, 2019, 2:41 p.m. OK GNU C++17 TESTS 53 46 2867200 2100
41599599 terminator D Aug. 14, 2018, 6:58 p.m. OK GNU C++17 TESTS 53 46 3276800 2100
44418978 CPSucks D Oct. 16, 2018, 8:46 p.m. OK GNU C++17 TESTS 53 46 3481600 2100
39257374 nikolayterek D June 15, 2018, 4:50 a.m. OK GNU C++17 TESTS 53 46 3993600 2100
54569835 kostia244 D May 24, 2019, 6:37 p.m. OK GNU C++17 TESTS 53 46 9625600 2100
59642048 LeoRiether D Aug. 29, 2019, 2:39 a.m. OK GNU C++17 TESTS 53 61 1638400 2100
9345187 cookieme D Jan. 2, 2015, 10:23 a.m. OK Go TESTS 53 561 5939200 2100
9189770 cojna D Dec. 18, 2014, 4:58 p.m. OK Haskell TESTS 53 327 1126400 2100
9235646 abababab D Dec. 23, 2014, 7:21 p.m. OK Java 6 TESTS 53 124 512000 2100
9242897 pallavi D Dec. 24, 2014, 11:05 a.m. OK Java 6 TESTS 53 265 0 2100
9180197 tasyrkin D Dec. 17, 2014, 9:50 p.m. OK Java 6 TESTS 53 265 0 2100
9181467 liymsheep D Dec. 18, 2014, 1:40 a.m. OK Java 6 TESTS 53 296 0 2100
9237938 tyuan73 D Dec. 24, 2014, 5:12 a.m. OK Java 7 TESTS 53 109 0 2100
9209017 Betlista D Dec. 20, 2014, 5:33 p.m. OK Java 7 TESTS 53 109 0 2100
9238033 tyuan73 D Dec. 24, 2014, 5:32 a.m. OK Java 7 TESTS 53 124 0 2100
9238121 tyuan73 D Dec. 24, 2014, 5:52 a.m. OK Java 7 TESTS 53 124 0 2100
9237987 tyuan73 D Dec. 24, 2014, 5:21 a.m. OK Java 7 TESTS 53 124 0 2100
9187021 sweiss D Dec. 18, 2014, 12:54 p.m. OK Java 7 TESTS 53 124 0 2100
9238115 tyuan73 D Dec. 24, 2014, 5:51 a.m. OK Java 7 TESTS 53 139 0 2100
15277655 DukeOfYork D Jan. 10, 2016, 8:23 a.m. OK Java 7 TESTS 53 140 0 2100
9236295 tyuan73 D Dec. 23, 2014, 9:03 p.m. OK Java 7 TESTS 53 155 0 2100
11103625 alibaba D May 15, 2015, 3:58 a.m. OK Java 7 TESTS 53 217 0 2100
26906315 Kammola D May 6, 2017, 4:49 p.m. OK Java 8 TESTS 53 124 0 2100
44366991 AJ47 D Oct. 15, 2018, 5:08 p.m. OK Java 8 TESTS 53 140 0 2100
29805380 Ahmed.Shawky D Aug. 26, 2017, 11:41 a.m. OK Java 8 TESTS 53 140 0 2100
19433101 JoM D July 27, 2016, 3:58 a.m. OK Java 8 TESTS 53 140 0 2100
9174321 sievmi D Dec. 17, 2014, 6:03 p.m. OK Java 8 TESTS 53 140 0 2100
43234344 jwozniak D Sept. 22, 2018, 7:29 a.m. OK Java 8 TESTS 53 155 0 2100
38400312 Kharouba D May 18, 2018, 11:58 a.m. OK Java 8 TESTS 53 155 0 2100
27360797 AhmedSoliman D May 26, 2017, 5:17 p.m. OK Java 8 TESTS 53 155 0 2100
9197647 mohamednabil00000 D Dec. 19, 2014, 2:17 p.m. OK Java 8 TESTS 53 155 0 2100
68865795 Oom D Jan. 15, 2020, 1:33 p.m. OK Java 8 TESTS 53 156 0 2100
45144509 nordiccat D Oct. 31, 2018, 4:09 p.m. OK Kotlin TESTS 53 296 0 2100
11672244 Hepic_Antony_Skarlatos D June 19, 2015, 5:16 p.m. OK Mono C# TESTS 53 62 5427200 2100
16230545 og.kostya D Feb. 20, 2016, 2:21 p.m. OK MS C# TESTS 53 77 4096000 2100
9244666 AnatolyTolstobrov D Dec. 24, 2014, 3:05 p.m. OK MS C# TESTS 53 93 5734400 2100
9183617 azukun D Dec. 18, 2014, 7:27 a.m. OK MS C# TESTS 53 108 7680000 2100
9183670 azukun D Dec. 18, 2014, 7:33 a.m. OK MS C# TESTS 53 155 7680000 2100
10307268 Silithus D March 17, 2015, 6:11 a.m. OK MS C# TESTS 53 233 6041600 2100
9172486 camypaper D Dec. 17, 2014, 5:44 p.m. OK MS C# TESTS 53 234 1228800 2100
16230154 og.kostya D Feb. 20, 2016, 1:58 p.m. OK MS C# TESTS 53 405 3686400 2100
19072322 Megrez D July 13, 2016, 12:10 p.m. OK MS C++ TESTS 53 31 2252800 2100
9781317 xiaoyu20123 D Feb. 9, 2015, 3:23 p.m. OK MS C++ TESTS 53 31 2764800 2100
16931013 vjudge4 D March 25, 2016, 2:56 p.m. OK MS C++ TESTS 53 31 7680000 2100
9195549 MrKaStep D Dec. 19, 2014, 10:38 a.m. OK MS C++ TESTS 53 46 2252800 2100
19072330 Megrez D July 13, 2016, 12:11 p.m. OK MS C++ TESTS 53 46 2252800 2100
9174502 Shaveds D Dec. 17, 2014, 6:05 p.m. OK MS C++ TESTS 53 46 2252800 2100
10402793 besher D March 22, 2015, 4:25 p.m. OK MS C++ TESTS 53 46 2457600 2100
19099464 vjudge2 D July 14, 2016, 2:30 a.m. OK MS C++ TESTS 53 46 2662400 2100
19076380 vjudge1 D July 13, 2016, 3:27 p.m. OK MS C++ TESTS 53 46 2662400 2100
20739256 rkm0959 D Sept. 18, 2016, 4:07 p.m. OK MS C++ TESTS 53 46 3072000 2100
10999963 K_D_M D May 4, 2015, 6:10 p.m. OK PyPy 2 TESTS 53 202 8396800 2100
9280951 leeaa D Dec. 27, 2014, 5:56 a.m. OK Python 2 TESTS 53 1045 5222400 2100
27474602 2390_ D May 31, 2017, 9:40 p.m. OK Python 2 TESTS 53 1092 6860800 2100
9190416 bochet D Dec. 18, 2014, 6:09 p.m. OK Python 2 TESTS 53 1450 5734400 2100
9796790 lionwing D Feb. 11, 2015, 9:15 a.m. OK Python 2 TESTS 53 1528 5324800 2100
9372386 HsnuRilak D Jan. 6, 2015, 12:12 p.m. OK Python 2 TESTS 53 1653 6963200 2100
9276971 SerAlex D Dec. 26, 2014, 3:14 p.m. OK Python 2 TESTS 53 1918 5939200 2100
9723718 gnldkm D Feb. 5, 2015, 5:58 a.m. OK Python 2 TESTS 53 1933 6348800 2100
9220173 maxn D Dec. 22, 2014, 2:01 a.m. OK Python 3 TESTS 53 1044 10956800 2100
9199542 shreeshaprabhu D Dec. 19, 2014, 5:11 p.m. OK Python 3 TESTS 53 1325 3584000 2100
9303276 manhhomienbienthuy D Dec. 30, 2014, 7:08 a.m. OK Python 3 TESTS 53 1372 10649600 2100
29857042 lawrence.long D Aug. 29, 2017, 2:45 a.m. OK Python 3 TESTS 53 1497 10854400 2100

remove filters

Back to search problems