Codeforces Round 674 (Div. 3)

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
1426 Codeforces Round 674 (Div. 3) FINISHED False 7200 136072511 Sept. 28, 2020, 8:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 49400 ) A Floor Number PROGRAMMING implementation math 800

B"Vasya goes to visit his classmate Petya. Vasya knows that Petya's apartment number is n . There is only one entrance in Petya's house and the distribution of apartments is the following: the first floor contains 2 apartments, every other floor contains x apartments each. Apartments are numbered starting from one, from the first floor. I.e. apartments on the first floor have numbers 1 and 2 , apartments on the second floor have numbers from 3 to (x + 2) , apartments on the third floor have numbers from (x + 3) to (2 cdot x + 2) , and so on. Your task is to find the number of floor on which Petya lives. Assume that the house is always high enough to fit at least n apartments. You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. Then t test cases follow. The only line of the test case contains two integers n and x ( 1 <= n, x <= 1000 ) -- the number of Petya's apartment and the number of apartments on each floor of the house except the first one (there are two apartments on the first floor). For each test case, print the answer: the number of floor on which Petya lives. Consider the first test case of the example: the first floor contains apartments with numbers 1 and 2 , the second one contains apartments with numbers 3 , 4 and 5 , the third one contains apartments with numbers 6 , 7 and 8 . Therefore, Petya lives on the third floor. In the second test case of the example, Petya lives in the apartment 1 which is on the first floor. "...

Tutorials

83120

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
94176808 lemonhacker A Sept. 29, 2020, 4:35 a.m. OK Clang++17 Diagnostics TESTS 3 46 0 800
94173045 zmj123456 A Sept. 29, 2020, 3:03 a.m. OK Clang++17 Diagnostics TESTS 3 46 0 800
94129022 Round_Tree A Sept. 28, 2020, 1:04 p.m. OK Clang++17 Diagnostics TESTS 3 62 0 800
94137188 Codehunter666 A Sept. 28, 2020, 2:29 p.m. OK GNU C11 TESTS 3 15 0 800
94132327 namanbhatia11111 A Sept. 28, 2020, 1:39 p.m. OK GNU C11 TESTS 3 15 0 800
94178556 ajtamjid A Sept. 29, 2020, 5:12 a.m. OK GNU C11 TESTS 3 15 0 800
94176572 akash19jain A Sept. 29, 2020, 4:30 a.m. OK GNU C11 TESTS 3 15 0 800
94175029 mayeed A Sept. 29, 2020, 3:52 a.m. OK GNU C11 TESTS 3 15 0 800
94171984 Im34v A Sept. 29, 2020, 2:31 a.m. OK GNU C11 TESTS 3 15 0 800
94145919 aurchey726 A Sept. 28, 2020, 4:01 p.m. OK GNU C11 TESTS 3 15 0 800
94144826 AlpacanChicken A Sept. 28, 2020, 3:49 p.m. OK GNU C11 TESTS 3 15 0 800
94138331 polneni_prashanth A Sept. 28, 2020, 2:41 p.m. OK GNU C11 TESTS 3 15 0 800
94137300 Codehunter666 A Sept. 28, 2020, 2:30 p.m. OK GNU C11 TESTS 3 15 0 800
94138087 carbon2 A Sept. 28, 2020, 2:38 p.m. OK GNU C++11 TESTS 3 0 0 800
94112181 bappykumar A Sept. 28, 2020, 10:11 a.m. OK GNU C++11 TESTS 2 0 0 800
94176867 zhangguangwei A Sept. 29, 2020, 4:36 a.m. OK GNU C++11 TESTS 3 15 0 800
94175945 drophair A Sept. 29, 2020, 4:16 a.m. OK GNU C++11 TESTS 3 15 0 800
94176530 GGMU A Sept. 29, 2020, 4:29 a.m. OK GNU C++11 TESTS 3 15 0 800
94177524 LyIosing A Sept. 29, 2020, 4:50 a.m. OK GNU C++11 TESTS 3 15 0 800
94178049 gauravkamboj56gk A Sept. 29, 2020, 5:01 a.m. OK GNU C++11 TESTS 3 15 0 800
94178093 vishydeepi A Sept. 29, 2020, 5:02 a.m. OK GNU C++11 TESTS 3 15 0 800
94178550 rhelikon01 A Sept. 29, 2020, 5:11 a.m. OK GNU C++11 TESTS 3 15 0 800
94179440 Raizor_ A Sept. 29, 2020, 5:28 a.m. OK GNU C++11 TESTS 3 15 0 800
94118757 tamzid190041229 A Sept. 28, 2020, 11:15 a.m. OK GNU C++14 TESTS 3 0 0 800
94111901 Anish_28 A Sept. 28, 2020, 10:09 a.m. OK GNU C++14 TESTS 2 0 204800 800
94178410 Shinchu_728 A Sept. 29, 2020, 5:08 a.m. OK GNU C++14 TESTS 3 15 0 800
94178287 Sakib_Dew A Sept. 29, 2020, 5:06 a.m. OK GNU C++14 TESTS 3 15 0 800
94178673 vikramadityasinghkadian8 A Sept. 29, 2020, 5:14 a.m. OK GNU C++14 TESTS 3 15 0 800
94179812 janmansh A Sept. 29, 2020, 5:35 a.m. OK GNU C++14 TESTS 3 15 0 800
94180031 A_SR A Sept. 29, 2020, 5:39 a.m. OK GNU C++14 TESTS 3 15 0 800
94180151 To_TheMoon A Sept. 29, 2020, 5:42 a.m. OK GNU C++14 TESTS 3 15 0 800
94180922 amanmaurya_2012 A Sept. 29, 2020, 5:56 a.m. OK GNU C++14 TESTS 3 15 0 800
94181184 Y.N.W.A A Sept. 29, 2020, 6:01 a.m. OK GNU C++14 TESTS 3 15 0 800
94143648 ajaymittur28 A Sept. 28, 2020, 3:36 p.m. OK GNU C++17 TESTS 3 0 0 800
94112364 vamk18 A Sept. 28, 2020, 10:12 a.m. OK GNU C++17 TESTS 2 0 0 800
94115556 BinaryBeast007 A Sept. 28, 2020, 10:39 a.m. OK GNU C++17 TESTS 3 0 0 800
94126455 aknov711 A Sept. 28, 2020, 12:37 p.m. OK GNU C++17 TESTS 3 0 0 800
94131436 Colten A Sept. 28, 2020, 1:30 p.m. OK GNU C++17 TESTS 3 0 0 800
94143370 iamsank A Sept. 28, 2020, 3:33 p.m. OK GNU C++17 TESTS 3 0 0 800
94150753 banarasia A Sept. 28, 2020, 5 p.m. OK GNU C++17 TESTS 3 0 1638400 800
94180783 chenyuxiao A Sept. 29, 2020, 5:54 a.m. OK GNU C++17 TESTS 3 15 0 800
94180580 smilingface A Sept. 29, 2020, 5:50 a.m. OK GNU C++17 TESTS 3 15 0 800
94180466 Kingslayer_15 A Sept. 29, 2020, 5:48 a.m. OK GNU C++17 TESTS 3 15 0 800
94120575 MahmoudAbdul_Ghaffar A Sept. 28, 2020, 11:34 a.m. OK GNU C++17 (64) TESTS 3 0 0 800
94144672 twoslowaf A Sept. 28, 2020, 3:47 p.m. OK GNU C++17 (64) TESTS 3 0 0 800
94153591 momo12 A Sept. 28, 2020, 5:39 p.m. OK GNU C++17 (64) TESTS 3 0 0 800
94174008 tannatsri A Sept. 29, 2020, 3:27 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
94181005 Kawshik_1703016 A Sept. 29, 2020, 5:58 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
94177471 iamRahulGandhi A Sept. 29, 2020, 4:48 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
94176347 anishpathak121 A Sept. 29, 2020, 4:25 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
94175473 naveenk2k A Sept. 29, 2020, 4:03 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
94175147 bhalo_chele A Sept. 29, 2020, 3:55 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
94174298 Prakhar6969 A Sept. 29, 2020, 3:35 a.m. OK GNU C++17 (64) TESTS 3 15 0 800
94170359 synapse A Sept. 29, 2020, 1:36 a.m. OK Go TESTS 3 46 0 800
94134818 codelegend A Sept. 28, 2020, 2:05 p.m. OK Haskell TESTS 3 15 0 800
94156894 RuthlessAggression A Sept. 28, 2020, 6:36 p.m. OK Java 11 TESTS 3 155 0 800
94179106 TienNguyen411 A Sept. 29, 2020, 5:22 a.m. OK Java 11 TESTS 3 155 0 800
94175656 anshum_it_is A Sept. 29, 2020, 4:08 a.m. OK Java 11 TESTS 3 155 0 800
94155193 Agnimandur A Sept. 28, 2020, 6:05 p.m. OK Java 11 TESTS 3 155 0 800
94117166 typewriter999 A Sept. 28, 2020, 10:58 a.m. OK Java 11 TESTS 3 155 0 800
94166129 shiftyblock A Sept. 28, 2020, 10:14 p.m. OK Java 11 TESTS 3 156 0 800
94166067 Apass.Jack A Sept. 28, 2020, 10:12 p.m. OK Java 11 TESTS 3 170 0 800
94114022 sanju2504 A Sept. 28, 2020, 10:24 a.m. OK Java 11 TESTS 3 170 0 800
94170797 Durgeshmaurya07 A Sept. 29, 2020, 1:51 a.m. OK Java 11 TESTS 3 171 0 800
94167355 ingenio A Sept. 28, 2020, 11:17 p.m. OK Java 11 TESTS 3 171 0 800
94135274 kalzor A Sept. 28, 2020, 2:09 p.m. OK Java 8 TESTS 3 92 0 800
94125232 mananparmar7042 A Sept. 28, 2020, 12:24 p.m. OK Java 8 TESTS 3 93 0 800
94136507 ritesharma A Sept. 28, 2020, 2:22 p.m. OK Java 8 TESTS 3 93 0 800
94134133 gvsharma4 A Sept. 28, 2020, 1:58 p.m. OK Java 8 TESTS 3 93 0 800
94127466 Manan8686 A Sept. 28, 2020, 12:48 p.m. OK Java 8 TESTS 3 93 0 800
94126097 compleksizhalfimaginary A Sept. 28, 2020, 12:34 p.m. OK Java 8 TESTS 3 93 0 800
94180649 Vaibhav_patel19 A Sept. 29, 2020, 5:51 a.m. OK Java 8 TESTS 3 93 0 800
94167864 flyman3046 A Sept. 28, 2020, 11:46 p.m. OK Java 8 TESTS 3 93 0 800
94161010 KoustavBeginner A Sept. 28, 2020, 7:52 p.m. OK Java 8 TESTS 3 93 0 800
94139769 shojin_pro A Sept. 28, 2020, 2:55 p.m. OK Java 8 TESTS 3 93 0 800
94179784 Spheniscine A Sept. 29, 2020, 5:34 a.m. OK Kotlin TESTS 3 109 0 800
94149566 zazak A Sept. 28, 2020, 4:45 p.m. OK Mono C# TESTS 3 46 102400 800
94136849 IvanLobachevsky A Sept. 28, 2020, 2:25 p.m. OK Mono C# TESTS 3 61 102400 800
94119251 anish.1922 A Sept. 28, 2020, 11:20 a.m. OK Mono C# TESTS 3 61 11776000 800
94118472 TRR A Sept. 28, 2020, 11:12 a.m. OK Mono C# TESTS 3 62 102400 800
94147745 Xtreemist A Sept. 28, 2020, 4:24 p.m. OK Mono C# TESTS 3 62 102400 800
94115844 IshrakTanzim A Sept. 28, 2020, 10:42 a.m. OK MS C++ TESTS 3 30 0 800
94123219 17658592801 A Sept. 28, 2020, 12:03 p.m. OK MS C++ 2017 TESTS 3 15 0 800
94179361 TianZai A Sept. 29, 2020, 5:26 a.m. OK MS C++ 2017 TESTS 3 15 0 800
94174237 devanshu161 A Sept. 29, 2020, 3:33 a.m. OK MS C++ 2017 TESTS 3 15 0 800
94146773 BrantWang A Sept. 28, 2020, 4:11 p.m. OK MS C++ 2017 TESTS 3 15 0 800
94120622 DiSTRuCtO A Sept. 28, 2020, 11:35 a.m. OK MS C++ 2017 TESTS 3 15 0 800
94115772 Torehalt A Sept. 28, 2020, 10:42 a.m. OK MS C++ 2017 TESTS 3 15 0 800
94112668 fbfbf1 A Sept. 28, 2020, 10:14 a.m. OK MS C++ 2017 TESTS 2 15 0 800
94146933 poulaatef A Sept. 28, 2020, 4:13 p.m. OK MS C++ 2017 TESTS 3 30 0 800
94179728 jingzi523 A Sept. 29, 2020, 5:33 a.m. OK MS C++ 2017 TESTS 3 30 0 800
94156487 vseoshenploxo A Sept. 28, 2020, 6:28 p.m. OK MS C++ 2017 TESTS 3 30 0 800
94159812 SwenWebber A Sept. 28, 2020, 7:27 p.m. OK .NET Core C# TESTS 3 77 102400 800
94133872 Mihidabi_Khan_Jitu A Sept. 28, 2020, 1:55 p.m. OK .NET Core C# TESTS 3 77 102400 800
94160304 SwenWebber A Sept. 28, 2020, 7:37 p.m. OK .NET Core C# TESTS 3 108 204800 800
94163938 andrei_toader A Sept. 28, 2020, 9:03 p.m. OK .NET Core C# TESTS 3 108 307200 800
94149166 mamunhpath A Sept. 28, 2020, 4:41 p.m. OK Node.js TESTS 3 93 2252800 800
94148086 WeirdBugsButOkay A Sept. 28, 2020, 4:28 p.m. OK Ocaml TESTS 3 15 0 800
94119298 mayakin A Sept. 28, 2020, 11:21 a.m. OK PHP TESTS 3 31 0 800
94154777 beethoven97 A Sept. 28, 2020, 5:57 p.m. OK PyPy 2 TESTS 3 108 1331200 800
94176024 YSY2 A Sept. 29, 2020, 4:18 a.m. OK PyPy 3 TESTS 3 139 1433600 800
94179334 guta345 A Sept. 29, 2020, 5:26 a.m. OK PyPy 3 TESTS 3 139 2560000 800
94140612 caow A Sept. 28, 2020, 3:04 p.m. OK PyPy 3 TESTS 3 140 1331200 800
94116853 codecunt7 A Sept. 28, 2020, 10:54 a.m. OK PyPy 3 TESTS 3 140 1843200 800
94165314 asdsasd A Sept. 28, 2020, 9:44 p.m. OK PyPy 3 TESTS 3 140 1945600 800
94135509 Captain_196 A Sept. 28, 2020, 2:12 p.m. OK PyPy 3 TESTS 3 140 2252800 800
94180167 tiwari0000 A Sept. 29, 2020, 5:42 a.m. OK PyPy 3 TESTS 3 140 2355200 800
94152373 albeXL A Sept. 28, 2020, 5:22 p.m. OK PyPy 3 TESTS 3 140 4710400 800
94151871 Akhil_Rautela A Sept. 28, 2020, 5:15 p.m. OK PyPy 3 TESTS 3 155 1331200 800
94136026 codethinker A Sept. 28, 2020, 2:17 p.m. OK PyPy 3 TESTS 3 155 1433600 800
94176615 Nitesh1 A Sept. 29, 2020, 4:31 a.m. OK Python 3 TESTS 3 77 0 800
94159374 rohantrigune15 A Sept. 28, 2020, 7:19 p.m. OK Python 3 TESTS 3 77 0 800
94154289 LintuStorm A Sept. 28, 2020, 5:49 p.m. OK Python 3 TESTS 3 78 0 800
94114610 dinesh_135 A Sept. 28, 2020, 10:30 a.m. OK Python 3 TESTS 3 92 0 800
94116015 Tanisha_06 A Sept. 28, 2020, 10:44 a.m. OK Python 3 TESTS 3 92 0 800
94167854 hcho A Sept. 28, 2020, 11:46 p.m. OK Python 3 TESTS 3 93 0 800
94180270 aditya_shekhar A Sept. 29, 2020, 5:44 a.m. OK Python 3 TESTS 3 93 0 800
94177629 Gauranshu A Sept. 29, 2020, 4:52 a.m. OK Python 3 TESTS 3 93 0 800
94181135 imshahid A Sept. 29, 2020, 6 a.m. OK Python 3 TESTS 3 93 0 800
94176841 subhashreetrip A Sept. 29, 2020, 4:36 a.m. OK Python 3 TESTS 3 93 0 800
94116763 Paranid5 A Sept. 28, 2020, 10:53 a.m. OK Rust TESTS 3 15 0 800
94129347 tuna_salad A Sept. 28, 2020, 1:07 p.m. OK Rust TESTS 3 46 0 800

remove filters

Back to search problems