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 |
---|---|---|---|---|---|---|
1455 | Educational Codeforces Round 99 (Rated for Div. 2) | FINISHED | False | 7200 | 130519463 | Nov. 30, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 19754 ) | C | Ping-pong | PROGRAMMING | constructive algorithms games math | #repeating cipher |
B"Alice and Bob play ping-pong with simplified rules. During the game, the player serving the ball commences a play. The server strikes the ball then the receiver makes a return by hitting the ball back. Thereafter, the server and receiver must alternately make a return until one of them doesn't make a return. The one who doesn't make a return loses this play. The winner of the play commences the next play. Alice starts the first play. Alice has x stamina and Bob has y . To hit the ball (while serving or returning) each player spends 1 stamina, so if they don't have any stamina, they can't return the ball (and lose the play) or can't serve the ball (in this case, the other player serves the ball instead). If both players run out of stamina, the game is over. Sometimes, it's strategically optimal not to return the ball, lose the current play, but save the stamina. On the contrary, when the server commences a play, they have to hit the ball, if they have some stamina left. Both Alice and Bob play optimally and want to, firstly, maximize their number of wins and, secondly, minimize the number of wins of their opponent. Calculate the resulting number of Alice's and Bob's wins. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first and only line of each test case contains two integers x and y ( 1 <= x, y <= 10^6 ) -- Alice's and Bob's initial stamina. For each test case, print two integers -- the resulting number of Alice's and Bob's wins, if both of them play optimally. In the first test case, Alice serves the ball and spends 1 stamina. Then Bob returns the ball and also spends 1 stamina. Alice can't return the ball since she has no stamina left and loses the play. Both of them ran out of stamina, so the game is over with 0 Alice's wins and 1 Bob's wins. In the second test case, Alice serves the ball and spends 1 stamina. Bob decides n"... |
85186 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
100045090 | Gassa | C | Nov. 30, 2020, 4:18 p.m. | OK | D | TESTS | 5 | 31 | 0 | ||
100082268 | Oxtin | C | Dec. 1, 2020, 5:23 a.m. | OK | GNU C11 | TESTS | 9 | 46 | 0 | ||
100044327 | freak_er | C | Nov. 30, 2020, 4:16 p.m. | OK | GNU C11 | TESTS | 5 | 46 | 0 | ||
100044805 | kaedii | C | Nov. 30, 2020, 4:18 p.m. | OK | GNU C11 | TESTS | 5 | 46 | 0 | ||
100045567 | prakharmuley888 | C | Nov. 30, 2020, 4:20 p.m. | OK | GNU C11 | TESTS | 5 | 46 | 0 | ||
100075419 | scrat_min | C | Dec. 1, 2020, 2:42 a.m. | OK | GNU C11 | TESTS | 9 | 46 | 102400 | ||
100051332 | Masum_Billa | C | Nov. 30, 2020, 4:33 p.m. | OK | GNU C11 | TESTS | 5 | 61 | 0 | ||
100063094 | JAHID_KARIM | C | Nov. 30, 2020, 6:52 p.m. | OK | GNU C11 | TESTS | 8 | 61 | 0 | ||
100043572 | UnicoCN | C | Nov. 30, 2020, 4:15 p.m. | OK | GNU C11 | TESTS | 5 | 61 | 0 | ||
100047725 | ke_123 | C | Nov. 30, 2020, 4:25 p.m. | OK | GNU C11 | TESTS | 5 | 61 | 0 | ||
100083544 | vyshnavi_10 | C | Dec. 1, 2020, 5:47 a.m. | OK | GNU C11 | TESTS | 9 | 62 | 0 | ||
100050465 | GrayFluex | C | Nov. 30, 2020, 4:31 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | ||
100071930 | hsfzLZH1 | C | Nov. 30, 2020, 11:55 p.m. | OK | GNU C++11 | TESTS | 9 | 15 | 0 | ||
100080214 | FreeSin2000 | C | Dec. 1, 2020, 4:41 a.m. | OK | GNU C++11 | TESTS | 9 | 15 | 0 | ||
100076184 | Elbow | C | Dec. 1, 2020, 3:05 a.m. | OK | GNU C++11 | TESTS | 9 | 15 | 0 | ||
100076543 | xwn | C | Dec. 1, 2020, 3:15 a.m. | OK | GNU C++11 | TESTS | 9 | 15 | 0 | ||
100076172 | FuWeak | C | Dec. 1, 2020, 3:04 a.m. | OK | GNU C++11 | TESTS | 9 | 15 | 0 | ||
100047565 | 11224 | C | Nov. 30, 2020, 4:25 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 3788800 | ||
100076362 | loenvom | C | Dec. 1, 2020, 3:10 a.m. | OK | GNU C++11 | TESTS | 9 | 30 | 0 | ||
100075347 | panhuachao | C | Dec. 1, 2020, 2:40 a.m. | OK | GNU C++11 | TESTS | 9 | 30 | 0 | ||
100078867 | LegendNI | C | Dec. 1, 2020, 4:09 a.m. | OK | GNU C++11 | TESTS | 9 | 30 | 0 | ||
100046221 | Himadri-nath | C | Nov. 30, 2020, 4:21 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
100075488 | Asurudo | C | Dec. 1, 2020, 2:44 a.m. | OK | GNU C++14 | TESTS | 9 | 15 | 0 | ||
100067233 | ashissingh640 | C | Nov. 30, 2020, 8:21 p.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
100075886 | Cwolf9.0 | C | Dec. 1, 2020, 2:56 a.m. | OK | GNU C++14 | TESTS | 9 | 30 | 0 | ||
100080269 | abahad7921 | C | Dec. 1, 2020, 4:42 a.m. | OK | GNU C++14 | TESTS | 9 | 30 | 0 | ||
100081326 | saurav1717 | C | Dec. 1, 2020, 5:04 a.m. | OK | GNU C++14 | TESTS | 9 | 30 | 0 | ||
100069295 | aymanmohamedecg | C | Nov. 30, 2020, 9:28 p.m. | OK | GNU C++14 | TESTS | 8 | 30 | 0 | ||
100075390 | no_rules | C | Dec. 1, 2020, 2:41 a.m. | OK | GNU C++14 | TESTS | 9 | 30 | 0 | ||
100075786 | apoorv1999 | C | Dec. 1, 2020, 2:53 a.m. | OK | GNU C++14 | TESTS | 9 | 30 | 0 | ||
100060313 | jersyguy | C | Nov. 30, 2020, 6:02 p.m. | OK | GNU C++14 | TESTS | 8 | 30 | 0 | ||
100053572 | ANishuu | C | Nov. 30, 2020, 4:42 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
100064364 | chy_yasir | C | Nov. 30, 2020, 7:17 p.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
100047300 | uver29 | C | Nov. 30, 2020, 4:24 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
100075109 | Temmie | C | Dec. 1, 2020, 2:33 a.m. | OK | GNU C++17 | TESTS | 9 | 30 | 0 | ||
100083696 | dnux30 | C | Dec. 1, 2020, 5:50 a.m. | OK | GNU C++17 | TESTS | 9 | 30 | 0 | ||
100075571 | just_me_007 | C | Dec. 1, 2020, 2:47 a.m. | OK | GNU C++17 | TESTS | 9 | 30 | 0 | ||
100074821 | satyam_k04. | C | Dec. 1, 2020, 2:18 a.m. | OK | GNU C++17 | TESTS | 9 | 30 | 0 | ||
100069033 | LM10_Piyush | C | Nov. 30, 2020, 9:18 p.m. | OK | GNU C++17 | TESTS | 8 | 30 | 0 | ||
100068246 | Noob1507 | C | Nov. 30, 2020, 8:50 p.m. | OK | GNU C++17 | TESTS | 8 | 30 | 0 | ||
100067416 | Noob1507 | C | Nov. 30, 2020, 8:26 p.m. | OK | GNU C++17 | TESTS | 8 | 30 | 0 | ||
100081784 | mekch | C | Dec. 1, 2020, 5:13 a.m. | OK | GNU C++17 (64) | TESTS | 9 | 15 | 0 | ||
100083879 | Gashintare | C | Dec. 1, 2020, 5:53 a.m. | OK | GNU C++17 (64) | TESTS | 9 | 15 | 0 | ||
100044239 | morato | C | Nov. 30, 2020, 4:16 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
100049926 | manupathria | C | Nov. 30, 2020, 4:30 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
100054307 | jdvoid_44 | C | Nov. 30, 2020, 4:48 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
100054374 | dpw4112001 | C | Nov. 30, 2020, 4:48 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
100073520 | kevinyang | C | Dec. 1, 2020, 1:18 a.m. | OK | GNU C++17 (64) | TESTS | 9 | 15 | 0 | ||
100077103 | M0riarty | C | Dec. 1, 2020, 3:29 a.m. | OK | GNU C++17 (64) | TESTS | 9 | 15 | 0 | ||
100081523 | anishpathak121 | C | Dec. 1, 2020, 5:08 a.m. | OK | GNU C++17 (64) | TESTS | 9 | 30 | 0 | ||
100083375 | Anisur_rahaman | C | Dec. 1, 2020, 5:44 a.m. | OK | GNU C++17 (64) | TESTS | 9 | 30 | 0 | ||
100043605 | remain_calm | C | Nov. 30, 2020, 4:15 p.m. | OK | Java 11 | TESTS | 5 | 187 | 0 | ||
100061284 | mphillotry | C | Nov. 30, 2020, 6:18 p.m. | OK | Java 11 | TESTS | 8 | 187 | 0 | ||
100053786 | kunalkatiyar9 | C | Nov. 30, 2020, 4:44 p.m. | OK | Java 11 | TESTS | 5 | 187 | 0 | ||
100067207 | codebook_2000 | C | Nov. 30, 2020, 8:20 p.m. | OK | Java 11 | TESTS | 8 | 202 | 0 | ||
100080692 | Codeispower | C | Dec. 1, 2020, 4:52 a.m. | OK | Java 11 | TESTS | 9 | 202 | 0 | ||
100057828 | coderrohan14 | C | Nov. 30, 2020, 5:26 p.m. | OK | Java 11 | TESTS | 8 | 202 | 0 | ||
100054992 | vipin__sharma | C | Nov. 30, 2020, 4:53 p.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
100049694 | brijeshujcbm | C | Nov. 30, 2020, 4:30 p.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
100067525 | abdelrahman-yousf | C | Nov. 30, 2020, 8:29 p.m. | OK | Java 11 | TESTS | 8 | 233 | 0 | ||
100049030 | Fahimmanowar | C | Nov. 30, 2020, 4:28 p.m. | OK | Java 11 | TESTS | 5 | 233 | 0 | ||
100058297 | saurabhs9913 | C | Nov. 30, 2020, 5:32 p.m. | OK | Java 8 | TESTS | 8 | 93 | 0 | ||
100044256 | tarun_sm | C | Nov. 30, 2020, 4:16 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | ||
100067839 | RichardBot7000 | C | Nov. 30, 2020, 8:37 p.m. | OK | Java 8 | TESTS | 8 | 108 | 0 | ||
100063283 | lzhang | C | Nov. 30, 2020, 6:56 p.m. | OK | Java 8 | TESTS | 8 | 109 | 0 | ||
100080221 | rachitpts.2454 | C | Dec. 1, 2020, 4:41 a.m. | OK | Java 8 | TESTS | 9 | 109 | 0 | ||
100067882 | kocko | C | Nov. 30, 2020, 8:39 p.m. | OK | Java 8 | TESTS | 8 | 109 | 0 | ||
100062077 | less_ordinary | C | Nov. 30, 2020, 6:32 p.m. | OK | Java 8 | TESTS | 8 | 109 | 0 | ||
100047235 | Ashar2301 | C | Nov. 30, 2020, 4:24 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
100060617 | Uttam007 | C | Nov. 30, 2020, 6:06 p.m. | OK | Java 8 | TESTS | 8 | 124 | 0 | ||
100044109 | rdsaurabh97 | C | Nov. 30, 2020, 4:16 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
100057700 | AryssonFigueiredo | C | Nov. 30, 2020, 5:24 p.m. | OK | Kotlin | TESTS | 8 | 124 | 0 | ||
100076688 | wuchaojie925 | C | Dec. 1, 2020, 3:19 a.m. | OK | Kotlin | TESTS | 9 | 140 | 0 | ||
100074037 | air_2 | C | Dec. 1, 2020, 1:41 a.m. | OK | MS C++ | TESTS | 9 | 46 | 0 | ||
100080687 | gaemi | C | Dec. 1, 2020, 4:51 a.m. | OK | MS C++ 2017 | TESTS | 9 | 31 | 0 | ||
100054351 | gaserashraf | C | Nov. 30, 2020, 4:48 p.m. | OK | MS C++ 2017 | TESTS | 5 | 46 | 0 | ||
100079555 | Torehalt | C | Dec. 1, 2020, 4:26 a.m. | OK | MS C++ 2017 | TESTS | 9 | 61 | 0 | ||
100069056 | oneskovic | C | Nov. 30, 2020, 9:19 p.m. | OK | MS C++ 2017 | TESTS | 8 | 62 | 0 | ||
100046771 | Thebestofthebest | C | Nov. 30, 2020, 4:23 p.m. | OK | MS C++ 2017 | TESTS | 5 | 62 | 0 | ||
100054233 | Chuck1911 | C | Nov. 30, 2020, 4:47 p.m. | OK | MS C++ 2017 | TESTS | 5 | 77 | 0 | ||
100083525 | TianZai | C | Dec. 1, 2020, 5:47 a.m. | OK | MS C++ 2017 | TESTS | 9 | 77 | 0 | ||
100072637 | EvgeniusASPX | C | Dec. 1, 2020, 12:37 a.m. | OK | MS C++ 2017 | TESTS | 9 | 77 | 0 | ||
100072484 | SnowChildren | C | Dec. 1, 2020, 12:29 a.m. | OK | MS C++ 2017 | TESTS | 9 | 77 | 0 | ||
100056023 | htija | C | Nov. 30, 2020, 5:03 p.m. | OK | MS C++ 2017 | TESTS | 5 | 77 | 0 | ||
100065973 | tomvai15 | C | Nov. 30, 2020, 7:52 p.m. | OK | .NET Core C# | TESTS | 8 | 124 | 3072000 | ||
100049834 | watarimaycry2 | C | Nov. 30, 2020, 4:30 p.m. | OK | Node.js | TESTS | 5 | 109 | 6144000 | ||
100053433 | henrychenOutlook | C | Nov. 30, 2020, 4:42 p.m. | OK | Node.js | TESTS | 5 | 202 | 5939200 | ||
100044163 | Gaurav1 | C | Nov. 30, 2020, 4:16 p.m. | OK | PyPy 2 | TESTS | 5 | 171 | 4915200 | ||
100082867 | DebRC | C | Dec. 1, 2020, 5:34 a.m. | OK | PyPy 3 | TESTS | 9 | 186 | 3584000 | ||
100064133 | apurva3455 | C | Nov. 30, 2020, 7:13 p.m. | OK | PyPy 3 | TESTS | 8 | 186 | 3584000 | ||
100055090 | fazle_rabbi_ferdaus | C | Nov. 30, 2020, 4:54 p.m. | OK | PyPy 3 | TESTS | 5 | 187 | 5120000 | ||
100053401 | MFahim12 | C | Nov. 30, 2020, 4:41 p.m. | OK | PyPy 3 | TESTS | 5 | 187 | 5120000 | ||
100048574 | knight2995 | C | Nov. 30, 2020, 4:27 p.m. | OK | PyPy 3 | TESTS | 5 | 187 | 5120000 | ||
100060469 | reddevil100 | C | Nov. 30, 2020, 6:04 p.m. | OK | PyPy 3 | TESTS | 8 | 202 | 3686400 | ||
100062263 | bpavan122 | C | Nov. 30, 2020, 6:35 p.m. | OK | PyPy 3 | TESTS | 8 | 202 | 5120000 | ||
100053362 | shiv_99 | C | Nov. 30, 2020, 4:41 p.m. | OK | PyPy 3 | TESTS | 5 | 202 | 5222400 | ||
100053137 | rubber_duckieOwOwO | C | Nov. 30, 2020, 4:40 p.m. | OK | PyPy 3 | TESTS | 5 | 202 | 5222400 | ||
100060678 | pavanchikkanna | C | Nov. 30, 2020, 6:07 p.m. | OK | PyPy 3 | TESTS | 8 | 202 | 5529600 | ||
100052934 | aniket11 | C | Nov. 30, 2020, 4:38 p.m. | OK | Python 2 | TESTS | 5 | 186 | 102400 | ||
100074798 | biltharesatyendra | C | Dec. 1, 2020, 2:17 a.m. | OK | Python 2 | TESTS | 9 | 202 | 0 | ||
100045188 | YvesYoshio | C | Nov. 30, 2020, 4:19 p.m. | OK | Python 3 | TESTS | 5 | 124 | 819200 | ||
100047504 | vanerk | C | Nov. 30, 2020, 4:25 p.m. | OK | Python 3 | TESTS | 5 | 124 | 819200 | ||
100058678 | subhajitdas | C | Nov. 30, 2020, 5:37 p.m. | OK | Python 3 | TESTS | 8 | 139 | 1024000 | ||
100081192 | SMG2807 | C | Dec. 1, 2020, 5:01 a.m. | OK | Python 3 | TESTS | 9 | 155 | 1331200 | ||
100052209 | RicardoAM | C | Nov. 30, 2020, 4:34 p.m. | OK | Python 3 | TESTS | 5 | 171 | 0 | ||
100077727 | pedrosa | C | Dec. 1, 2020, 3:46 a.m. | OK | Python 3 | TESTS | 9 | 171 | 0 | ||
100073593 | PKU_LOLI | C | Dec. 1, 2020, 1:21 a.m. | OK | Python 3 | TESTS | 9 | 171 | 0 | ||
100059736 | shahriartasnim12357 | C | Nov. 30, 2020, 5:52 p.m. | OK | Python 3 | TESTS | 8 | 171 | 307200 | ||
100081361 | Alequisk | C | Dec. 1, 2020, 5:05 a.m. | OK | Python 3 | TESTS | 9 | 186 | 0 | ||
100079526 | rbamhore20 | C | Dec. 1, 2020, 4:25 a.m. | OK | Python 3 | TESTS | 9 | 186 | 0 | ||
100054438 | coindarw | C | Nov. 30, 2020, 4:48 p.m. | OK | Ruby | TESTS | 5 | 514 | 307200 | ||
100054972 | masa0216masa0216masa0216 | C | Nov. 30, 2020, 4:53 p.m. | OK | Ruby | TESTS | 5 | 545 | 204800 |
Back to search problems