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 |
---|---|---|---|---|---|---|
1872 | Codeforces Round 895 (Div. 3) | FINISHED | False | 8100 | 37725899 | Sept. 7, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 39441 ) | A | Two Vessels | PROGRAMMING | greedy math |
B'You have two vessels with water. The first vessel contains a grams of water, and the second vessel contains b grams of water. Both vessels are very large and can hold any amount of water. You also have an empty cup that can hold up to c grams of water. In one move, you can scoop up to c grams of water from any vessel and pour it into the other vessel. Note that the mass of water poured in one move does not have to be an integer. What is the minimum number of moves required to make the masses of water in the vessels equal? Note that you cannot perform any actions other than the described moves. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 1000 ). The description of the test cases follows. Each test case consists of a single line containing three integers a , b , and c ( 1 <= a, b, c <= 100 ) -- the mass of water in the vessels and the capacity of the cup, respectively. For each test case, output a single number -- the minimum number of moves required to make the masses of water in the vessels equal. It can be shown, that it is always possible. In the first test case, only one move is enough: if we pour 2 grams of water from the second vessel into the first one, both vessels will contain 5 grams of water. In the second example test case, three moves are enough: Note that this is not the only way to equalize the vessels in 3 moves, but there is no way to do it in 2 moves. In the third example test case, the vessels initially contain the same amount of water, so no moves are needed. The answer is 0 . '... |
Codeforces Round 895 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
222361122 | Sharpyn_Elmor | A | Sept. 7, 2023, 6:52 p.m. | OK | C# 10 | TESTS | 2 | 31 | 102400 | ||
222375471 | bluemegane | A | Sept. 7, 2023, 10:26 p.m. | OK | C# 8 | TESTS | 2 | 77 | 204800 | ||
222349689 | zxyz | A | Sept. 7, 2023, 5:18 p.m. | OK | Clang++17 Diagnostics | TESTS | 2 | 30 | 2048000 | ||
222349890 | sreejanarsingoju | A | Sept. 7, 2023, 5:19 p.m. | OK | Clang++17 Diagnostics | TESTS | 2 | 46 | 0 | ||
222349804 | azim_khan | A | Sept. 7, 2023, 5:19 p.m. | OK | Clang++17 Diagnostics | TESTS | 2 | 46 | 0 | ||
222393159 | mdssix | A | Sept. 8, 2023, 4:27 a.m. | OK | Clang++20 Diagnostics | TESTS | 2 | 30 | 0 | ||
222352831 | tillrd | A | Sept. 7, 2023, 5:39 p.m. | OK | Clang++20 Diagnostics | TESTS | 2 | 31 | 0 | ||
222384310 | Redpo | A | Sept. 8, 2023, 2:03 a.m. | OK | Clang++20 Diagnostics | TESTS | 2 | 46 | 0 | ||
222361619 | jhonny_mera_naam | A | Sept. 7, 2023, 6:58 p.m. | OK | Clang++20 Diagnostics | TESTS | 2 | 46 | 0 | ||
222348144 | HackNotToHack | A | Sept. 7, 2023, 5:10 p.m. | OK | GNU C11 | TESTS | 2 | 0 | 0 | ||
222366160 | SaumyaBalina | A | Sept. 7, 2023, 7:53 p.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
222391274 | devil119 | A | Sept. 8, 2023, 4:02 a.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
222385223 | Hozayfa | A | Sept. 8, 2023, 2:19 a.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
222383836 | sa_Shayeed | A | Sept. 8, 2023, 1:53 a.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
222381101 | khansa_adilla_ | A | Sept. 8, 2023, 12:53 a.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
222367874 | its_cosmos | A | Sept. 7, 2023, 8:15 p.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
222367347 | Usama_Abdullah | A | Sept. 7, 2023, 8:08 p.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
222367338 | yaChaleko | A | Sept. 7, 2023, 8:08 p.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
222361040 | DarkWillow | A | Sept. 7, 2023, 6:52 p.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
222393709 | haizzzzz | A | Sept. 8, 2023, 4:33 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222394062 | r2203liujie | A | Sept. 8, 2023, 4:36 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222394569 | tushar-25 | A | Sept. 8, 2023, 4:41 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222395183 | zilvxiaozi | A | Sept. 8, 2023, 4:47 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222396937 | kedar_19 | A | Sept. 8, 2023, 5:08 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222397044 | prabhat012 | A | Sept. 8, 2023, 5:09 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222397808 | cmdevanand8696 | A | Sept. 8, 2023, 5:20 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222398172 | hzy99999 | A | Sept. 8, 2023, 5:25 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222399504 | HM220809 | A | Sept. 8, 2023, 5:42 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222399361 | baka77 | A | Sept. 8, 2023, 5:41 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
222401292 | JURUO.NOVA.ZHOU2 | A | Sept. 8, 2023, 6 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222400643 | jazzsterq | A | Sept. 8, 2023, 5:53 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222400590 | AyushSama | A | Sept. 8, 2023, 5:53 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222400439 | shock_wav3 | A | Sept. 8, 2023, 5:52 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222400377 | Grind_Is_real | A | Sept. 8, 2023, 5:51 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222400259 | rejbe32 | A | Sept. 8, 2023, 5:49 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222400187 | rahulpant2002 | A | Sept. 8, 2023, 5:48 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222399825 | shivamgupta021 | A | Sept. 8, 2023, 5:46 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222399772 | WorstCase63 | A | Sept. 8, 2023, 5:45 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222399428 | bradhawk718 | A | Sept. 8, 2023, 5:42 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
222384594 | jlxy | A | Sept. 8, 2023, 2:09 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222397538 | arBurhan | A | Sept. 8, 2023, 5:16 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222397118 | ThreeOfHeart | A | Sept. 8, 2023, 5:10 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222396718 | nerrdd_nahh | A | Sept. 8, 2023, 5:05 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222396148 | Higuchi | A | Sept. 8, 2023, 4:57 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222391931 | kk28xd | A | Sept. 8, 2023, 4:12 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222391291 | Orthofox | A | Sept. 8, 2023, 4:02 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222389232 | pks18 | A | Sept. 8, 2023, 3:29 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222384755 | tazul110111 | A | Sept. 8, 2023, 2:11 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222388543 | Nghiaaa | A | Sept. 8, 2023, 3:17 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
222401386 | jellybean259 | A | Sept. 8, 2023, 6:01 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222401364 | Zinc-acetate | A | Sept. 8, 2023, 6 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222401348 | rixiguafucunji | A | Sept. 8, 2023, 6 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222400950 | Kareem_007 | A | Sept. 8, 2023, 5:56 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222400404 | solene | A | Sept. 8, 2023, 5:51 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222400343 | ifthekhar2023 | A | Sept. 8, 2023, 5:50 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222400286 | PrajnanamBrahma | A | Sept. 8, 2023, 5:49 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222400215 | J-a-r-i-n-T-a-s-n-i-m | A | Sept. 8, 2023, 5:49 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222400175 | xincheng111 | A | Sept. 8, 2023, 5:48 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222400045 | akarsh_77 | A | Sept. 8, 2023, 5:47 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
222356766 | jojen | A | Sept. 7, 2023, 6:11 p.m. | OK | Go | TESTS | 2 | 31 | 102400 | ||
222368757 | theSSS | A | Sept. 7, 2023, 8:26 p.m. | OK | Java 11 | TESTS | 2 | 140 | 0 | ||
222350572 | Harwinvanak | A | Sept. 7, 2023, 5:23 p.m. | OK | Java 11 | TESTS | 2 | 155 | 0 | ||
222346439 | dpyrkin2007 | A | Sept. 7, 2023, 5:02 p.m. | OK | Java 11 | TESTS | 2 | 155 | 0 | ||
222349111 | vijender_8601 | A | Sept. 7, 2023, 5:15 p.m. | OK | Java 11 | TESTS | 2 | 170 | 0 | ||
222385414 | biu_biu_biu | A | Sept. 8, 2023, 2:23 a.m. | OK | Java 11 | TESTS | 2 | 202 | 0 | ||
222376223 | KickButtowski008 | A | Sept. 7, 2023, 10:44 p.m. | OK | Java 11 | TESTS | 2 | 202 | 0 | ||
222354843 | SangramH123 | A | Sept. 7, 2023, 5:54 p.m. | OK | Java 11 | TESTS | 2 | 217 | 0 | ||
222359139 | Awes19 | A | Sept. 7, 2023, 6:32 p.m. | OK | Java 11 | TESTS | 2 | 217 | 0 | ||
222346895 | soumya_04 | A | Sept. 7, 2023, 5:04 p.m. | OK | Java 11 | TESTS | 2 | 233 | 0 | ||
222395460 | 22wh5a0217 | A | Sept. 8, 2023, 4:50 a.m. | OK | Java 11 | TESTS | 2 | 264 | 512000 | ||
222393199 | jkslyk | A | Sept. 8, 2023, 4:27 a.m. | OK | Java 17 | TESTS | 2 | 109 | 409600 | ||
222384159 | mena-rizkalla | A | Sept. 8, 2023, 2 a.m. | OK | Java 17 | TESTS | 2 | 124 | 0 | ||
222391068 | sid234890 | A | Sept. 8, 2023, 3:59 a.m. | OK | Java 17 | TESTS | 2 | 124 | 819200 | ||
222363206 | rated21 | A | Sept. 7, 2023, 7:17 p.m. | OK | Java 17 | TESTS | 2 | 139 | 716800 | ||
222353029 | iamdimonis | A | Sept. 7, 2023, 5:40 p.m. | OK | Java 17 | TESTS | 2 | 155 | 0 | ||
222357774 | Pradeep880 | A | Sept. 7, 2023, 6:19 p.m. | OK | Java 17 | TESTS | 2 | 156 | 409600 | ||
222353986 | varrick | A | Sept. 7, 2023, 5:48 p.m. | OK | Java 17 | TESTS | 2 | 170 | 409600 | ||
222355421 | Eshan_Karia | A | Sept. 7, 2023, 5:59 p.m. | OK | Java 17 | TESTS | 2 | 171 | 204800 | ||
222384958 | tuin1803 | A | Sept. 8, 2023, 2:15 a.m. | OK | Java 17 | TESTS | 2 | 171 | 307200 | ||
222354859 | smitbhatt | A | Sept. 7, 2023, 5:54 p.m. | OK | Java 17 | TESTS | 2 | 171 | 512000 | ||
222365976 | gagan_6730 | A | Sept. 7, 2023, 7:51 p.m. | OK | Java 8 | TESTS | 2 | 62 | 0 | ||
222379848 | cwjjbbs | A | Sept. 8, 2023, 12:20 a.m. | OK | Java 8 | TESTS | 2 | 77 | 0 | ||
222357278 | leonlian | A | Sept. 7, 2023, 6:15 p.m. | OK | Java 8 | TESTS | 2 | 92 | 0 | ||
222363189 | sourav2999 | A | Sept. 7, 2023, 7:16 p.m. | OK | Java 8 | TESTS | 2 | 93 | 0 | ||
222371088 | ZakiKurdya | A | Sept. 7, 2023, 9:03 p.m. | OK | Java 8 | TESTS | 2 | 108 | 0 | ||
222359519 | Sumitsingh7 | A | Sept. 7, 2023, 6:35 p.m. | OK | Java 8 | TESTS | 2 | 108 | 5734400 | ||
222386388 | Autunomy | A | Sept. 8, 2023, 2:40 a.m. | OK | Java 8 | TESTS | 2 | 109 | 0 | ||
222371272 | Mo.mansour | A | Sept. 7, 2023, 9:07 p.m. | OK | Java 8 | TESTS | 2 | 109 | 0 | ||
222350309 | mohamed4k | A | Sept. 7, 2023, 5:22 p.m. | OK | Java 8 | TESTS | 2 | 109 | 0 | ||
222367303 | sdthakor.9465 | A | Sept. 7, 2023, 8:07 p.m. | OK | Java 8 | TESTS | 2 | 124 | 0 | ||
222390043 | 1buffetts | A | Sept. 8, 2023, 3:42 a.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
222376269 | rahat171 | A | Sept. 7, 2023, 10:45 p.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
222367549 | buh_h | A | Sept. 7, 2023, 8:10 p.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
222365025 | BragaCristian06 | A | Sept. 7, 2023, 7:39 p.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
222363570 | Roma_the_king | A | Sept. 7, 2023, 7:21 p.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
222363488 | myloyo | A | Sept. 7, 2023, 7:20 p.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
222353368 | kiNkraD | A | Sept. 7, 2023, 5:43 p.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
222348407 | FakeDuck | A | Sept. 7, 2023, 5:12 p.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
222400440 | Iseeuinmyd | A | Sept. 8, 2023, 5:52 a.m. | OK | MS C++ 2017 | TESTS | 2 | 15 | 0 | ||
222391398 | Hephaestion | A | Sept. 8, 2023, 4:04 a.m. | OK | MS C++ 2017 | TESTS | 2 | 15 | 0 | ||
222356990 | victorrschmidt | A | Sept. 7, 2023, 6:13 p.m. | OK | Node.js | TESTS | 2 | 62 | 1126400 | ||
222360410 | sanjayrathva091 | A | Sept. 7, 2023, 6:45 p.m. | OK | Node.js | TESTS | 2 | 77 | 1126400 | ||
222377357 | grente | A | Sept. 7, 2023, 11:13 p.m. | OK | PyPy 3 | TESTS | 2 | 92 | 1331200 | ||
222394362 | Ganeev18 | A | Sept. 8, 2023, 4:39 a.m. | OK | PyPy 3 | TESTS | 2 | 93 | 2252800 | ||
222354150 | 80r0_V41 | A | Sept. 7, 2023, 5:49 p.m. | OK | PyPy 3 | TESTS | 2 | 108 | 1843200 | ||
222390395 | ezahid1662 | A | Sept. 8, 2023, 3:48 a.m. | OK | PyPy 3 | TESTS | 2 | 108 | 1945600 | ||
222391470 | satanclaws | A | Sept. 8, 2023, 4:05 a.m. | OK | PyPy 3 | TESTS | 2 | 108 | 2764800 | ||
222383557 | 3062_8 | A | Sept. 8, 2023, 1:48 a.m. | OK | PyPy 3 | TESTS | 2 | 109 | 2764800 | ||
222348586 | jvatsal0709 | A | Sept. 7, 2023, 5:12 p.m. | OK | PyPy 3 | TESTS | 2 | 109 | 2867200 | ||
222356698 | nandana_ca | A | Sept. 7, 2023, 6:10 p.m. | OK | PyPy 3 | TESTS | 2 | 124 | 2457600 | ||
222359240 | Anupam_1925 | A | Sept. 7, 2023, 6:33 p.m. | OK | PyPy 3 | TESTS | 2 | 124 | 2764800 | ||
222349232 | sa3id.merad firaskiram | A | Sept. 7, 2023, 5:16 p.m. | OK | PyPy 3 | TESTS | 2 | 124 | 2764800 | ||
222389667 | bluecloud | A | Sept. 8, 2023, 3:37 a.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 1638400 | ||
222376908 | riroan | A | Sept. 7, 2023, 11:02 p.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 1740800 | ||
222384265 | harshk_52 | A | Sept. 8, 2023, 2:02 a.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 1945600 | ||
222368429 | gardengnome | A | Sept. 7, 2023, 8:22 p.m. | OK | PyPy 3-64 | TESTS | 2 | 61 | 1740800 | ||
222353839 | Quick-One | A | Sept. 7, 2023, 5:46 p.m. | OK | PyPy 3-64 | TESTS | 2 | 61 | 1740800 | ||
222353778 | Ana_naS | A | Sept. 7, 2023, 5:46 p.m. | OK | PyPy 3-64 | TESTS | 2 | 61 | 2252800 | ||
222357885 | I_Am_That | A | Sept. 7, 2023, 6:20 p.m. | OK | PyPy 3-64 | TESTS | 2 | 62 | 1638400 | ||
222346958 | sbdkdlalit0112 | A | Sept. 7, 2023, 5:05 p.m. | OK | PyPy 3-64 | TESTS | 2 | 62 | 1740800 | ||
222350139 | ProCoder12 | A | Sept. 7, 2023, 5:21 p.m. | OK | PyPy 3-64 | TESTS | 2 | 77 | 1945600 | ||
222352309 | alexwice | A | Sept. 7, 2023, 5:35 p.m. | OK | PyPy 3-64 | TESTS | 2 | 77 | 2252800 | ||
222360075 | chaithu_3007 | A | Sept. 7, 2023, 6:41 p.m. | OK | Python 3 | TESTS | 2 | 15 | 0 | ||
222352671 | Neet0110 | A | Sept. 7, 2023, 5:38 p.m. | OK | Python 3 | TESTS | 2 | 15 | 0 | ||
222349547 | Fouzan_45 | A | Sept. 7, 2023, 5:17 p.m. | OK | Python 3 | TESTS | 2 | 15 | 0 | ||
222395708 | Draq.eth | A | Sept. 8, 2023, 4:53 a.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
222383887 | ND0322 | A | Sept. 8, 2023, 1:54 a.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
222356241 | jackyhung93919a | A | Sept. 7, 2023, 6:06 p.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
222347403 | Nive2103 | A | Sept. 7, 2023, 5:07 p.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
222367259 | rajanlawar_24 | A | Sept. 7, 2023, 8:07 p.m. | OK | Python 3 | TESTS | 2 | 30 | 102400 | ||
222353773 | madhurisri2002 | A | Sept. 7, 2023, 5:46 p.m. | OK | Python 3 | TESTS | 2 | 30 | 102400 | ||
222355350 | SohumS | A | Sept. 7, 2023, 5:58 p.m. | OK | Python 3 | TESTS | 2 | 30 | 819200 | ||
222371288 | TecTrixer | A | Sept. 7, 2023, 9:07 p.m. | OK | Rust 2021 | TESTS | 2 | 0 | 0 | ||
222355998 | matheusdacach | A | Sept. 7, 2023, 6:04 p.m. | OK | Rust 2021 | TESTS | 2 | 0 | 0 |
Back to search problems