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.
Problems
B'Not so long ago, Vlad came up with an interesting function: For example, with a=3 and x=11 , the value f_3(11) = <= ft lfloor frac{11}{3} right rfloor + 11 bmod 3 = 3 + 2 = 5 . The number a is fixed and known to Vlad. Help Vlad find the maximum value of f_a(x) if x can take any integer value from l to r inclusive ( l <= x <= r ). The first line of input data contains an integer t ( 1 <= t <= 10^4 ) -- the number of input test cases. This is followed by t lines, each of which contains three integers l_i , r_i and a_i ( 1 <= l_i <= r_i <= 10^9, 1 <= a_i <= 10^9 ) -- the left and right boundaries of the segment and the fixed value of a . For each test case, output one number on a separate line -- the maximum value of the function on a given segment for a given a . In the first sample: As an answer, obviously, f_3(2) and f_3(4) are suitable. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
148917149 |
kumanyanya |
B |
March 8, 2022, 6:04 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
3 |
93 |
0 |
|
|
148936376 |
xhh_666 |
B |
March 9, 2022, 1:21 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
6 |
233 |
0 |
|
|
148917517 |
fctee |
B |
March 8, 2022, 6:08 p.m. |
OK |
GNU C11 |
TESTS |
3 |
46 |
0 |
|
|
148941454 |
ZENGRUI |
B |
March 9, 2022, 3:27 a.m. |
OK |
GNU C11 |
TESTS |
6 |
46 |
0 |
|
|
148941477 |
NMCxx |
B |
March 9, 2022, 3:27 a.m. |
OK |
GNU C11 |
TESTS |
6 |
46 |
0 |
|
|
148941777 |
NagashSRB |
B |
March 9, 2022, 3:34 a.m. |
OK |
GNU C11 |
TESTS |
6 |
46 |
0 |
|
|
148944269 |
Changersh |
B |
March 9, 2022, 4:22 a.m. |
OK |
GNU C11 |
TESTS |
6 |
46 |
0 |
|
|
148906871 |
A._.A |
B |
March 8, 2022, 4:48 p.m. |
OK |
GNU C11 |
TESTS |
3 |
46 |
0 |
|
|
148911981 |
sayemsub15 |
B |
March 8, 2022, 5:16 p.m. |
OK |
GNU C11 |
TESTS |
3 |
46 |
0 |
|
|
148917987 |
isnjb27 |
B |
March 8, 2022, 6:13 p.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
148916211 |
vjudge1 |
B |
March 8, 2022, 5:54 p.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
148915694 |
MonarchOfDead |
B |
March 8, 2022, 5:49 p.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
148915163 |
ssc2001 |
B |
March 8, 2022, 5:44 p.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
148909036 |
TheRealZalata |
B |
March 8, 2022, 4:56 p.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
148929700 |
adid_r10 |
B |
March 8, 2022, 9:23 p.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
148919673 |
The_Black_Devil |
B |
March 8, 2022, 6:34 p.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
148935419 |
yybs |
B |
March 9, 2022, 12:53 a.m. |
OK |
GNU C++14 |
TESTS |
6 |
0 |
0 |
|
|
148949951 |
litachloveyou |
B |
March 9, 2022, 5:50 a.m. |
OK |
GNU C++14 |
TESTS |
6 |
15 |
0 |
|
|
148950016 |
Pan_c |
B |
March 9, 2022, 5:51 a.m. |
OK |
GNU C++14 |
TESTS |
6 |
15 |
0 |
|
|
148923023 |
anandsaurabh46 |
B |
March 8, 2022, 7:22 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
148922705 |
ankitasingh18 |
B |
March 8, 2022, 7:17 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
148922690 |
UnXena |
B |
March 8, 2022, 7:16 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
148921774 |
Hem12 |
B |
March 8, 2022, 7:03 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
148920951 |
Code__slayer |
B |
March 8, 2022, 6:51 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
148921310 |
Zeaflex |
B |
March 8, 2022, 6:57 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
148920931 |
arya911 |
B |
March 8, 2022, 6:51 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
148933337 |
HSLComeon |
B |
March 8, 2022, 11:39 p.m. |
OK |
GNU C++17 |
TESTS |
6 |
0 |
0 |
|
|
148938088 |
murat.cepeda.. |
B |
March 9, 2022, 2:11 a.m. |
OK |
GNU C++17 |
TESTS |
6 |
0 |
0 |
|
|
148926933 |
Cflifu |
B |
March 8, 2022, 8:28 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
148908540 |
shubhamgupta.62000 |
B |
March 8, 2022, 4:54 p.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
148930728 |
DisCon |
B |
March 8, 2022, 9:47 p.m. |
OK |
GNU C++17 (64) |
TESTS |
6 |
0 |
0 |
|
|
148925524 |
gardster |
B |
March 8, 2022, 8:01 p.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
148918638 |
paul_t |
B |
March 8, 2022, 6:21 p.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
148918000 |
spartanes |
B |
March 8, 2022, 6:13 p.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
148916011 |
Mac.Rose |
B |
March 8, 2022, 5:52 p.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
148915237 |
p4lacios |
B |
March 8, 2022, 5:44 p.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
148913158 |
jose_0222 |
B |
March 8, 2022, 5:25 p.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
148903418 |
singhkunal01 |
B |
March 8, 2022, 4:40 p.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
148912515 |
Mr-Robot_545 |
B |
March 8, 2022, 5:20 p.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
7987200 |
|
|
148928886 |
Shorokatwa14 |
B |
March 8, 2022, 9:05 p.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
148927037 |
marvenlee |
B |
March 8, 2022, 8:30 p.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
148924013 |
Saytara |
B |
March 8, 2022, 7:38 p.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
148920971 |
AnantLunia |
B |
March 8, 2022, 6:51 p.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
148920597 |
welleyth |
B |
March 8, 2022, 6:47 p.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
148920081 |
neUwUbie_for_ever |
B |
March 8, 2022, 6:40 p.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
148918176 |
ak149159 |
B |
March 8, 2022, 6:16 p.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
148934793 |
Xilsu |
B |
March 9, 2022, 12:33 a.m. |
OK |
GNU C++20 (64) |
TESTS |
6 |
0 |
0 |
|
|
148949275 |
mhmd_bz |
B |
March 9, 2022, 5:41 a.m. |
OK |
GNU C++20 (64) |
TESTS |
6 |
0 |
0 |
|
|
148934398 |
DARK-N |
B |
March 9, 2022, 12:20 a.m. |
OK |
GNU C++20 (64) |
TESTS |
6 |
0 |
0 |
|
|
148906506 |
zuckonit |
B |
March 8, 2022, 4:47 p.m. |
OK |
Go |
TESTS |
3 |
31 |
512000 |
|
|
148910683 |
TomazGomes |
B |
March 8, 2022, 5:07 p.m. |
OK |
Haskell |
TESTS |
3 |
93 |
0 |
|
|
148940346 |
shizuka12 |
B |
March 9, 2022, 3:04 a.m. |
OK |
Java 11 |
TESTS |
6 |
155 |
0 |
|
|
148912872 |
SaberXpro |
B |
March 8, 2022, 5:23 p.m. |
OK |
Java 11 |
TESTS |
3 |
155 |
0 |
|
|
148918822 |
Andwerp |
B |
March 8, 2022, 6:23 p.m. |
OK |
Java 11 |
TESTS |
3 |
156 |
0 |
|
|
148911389 |
singhshivsm20001 |
B |
March 8, 2022, 5:12 p.m. |
OK |
Java 11 |
TESTS |
3 |
156 |
0 |
|
|
148910145 |
BhargavModha |
B |
March 8, 2022, 5:03 p.m. |
OK |
Java 11 |
TESTS |
3 |
170 |
0 |
|
|
148939876 |
ytripathi891 |
B |
March 9, 2022, 2:55 a.m. |
OK |
Java 11 |
TESTS |
6 |
170 |
0 |
|
|
148931324 |
Satyaa |
B |
March 8, 2022, 10:03 p.m. |
OK |
Java 11 |
TESTS |
6 |
170 |
0 |
|
|
148945340 |
vijender_8601 |
B |
March 9, 2022, 4:42 a.m. |
OK |
Java 11 |
TESTS |
6 |
171 |
0 |
|
|
148920474 |
TheRunner |
B |
March 8, 2022, 6:45 p.m. |
OK |
Java 11 |
TESTS |
3 |
171 |
0 |
|
|
148913857 |
mohit038 |
B |
March 8, 2022, 5:31 p.m. |
OK |
Java 11 |
TESTS |
3 |
171 |
0 |
|
|
148916775 |
gssakash |
B |
March 8, 2022, 6 p.m. |
OK |
Java 8 |
TESTS |
3 |
77 |
0 |
|
|
148927450 |
DEMO23 |
B |
March 8, 2022, 8:37 p.m. |
OK |
Java 8 |
TESTS |
3 |
92 |
0 |
|
|
148903000 |
Mohamed_A7med |
B |
March 8, 2022, 4:39 p.m. |
OK |
Java 8 |
TESTS |
3 |
92 |
0 |
|
|
148914334 |
honeysingh18 |
B |
March 8, 2022, 5:36 p.m. |
OK |
Java 8 |
TESTS |
3 |
92 |
0 |
|
|
148910307 |
kocko |
B |
March 8, 2022, 5:04 p.m. |
OK |
Java 8 |
TESTS |
3 |
93 |
0 |
|
|
148946336 |
govindrajput |
B |
March 9, 2022, 4:58 a.m. |
OK |
Java 8 |
TESTS |
6 |
93 |
0 |
|
|
148934174 |
kzhang2012 |
B |
March 9, 2022, 12:12 a.m. |
OK |
Java 8 |
TESTS |
6 |
93 |
0 |
|
|
148929659 |
sky9313 |
B |
March 8, 2022, 9:22 p.m. |
OK |
Java 8 |
TESTS |
3 |
93 |
0 |
|
|
148911929 |
SubhaniSk7 |
B |
March 8, 2022, 5:16 p.m. |
OK |
Java 8 |
TESTS |
3 |
93 |
0 |
|
|
148940889 |
ak_ankit |
B |
March 9, 2022, 3:16 a.m. |
OK |
Java 8 |
TESTS |
6 |
108 |
0 |
|
|
148914864 |
Golovanov399 |
B |
March 8, 2022, 5:41 p.m. |
OK |
Kotlin 1.5 |
TESTS |
3 |
280 |
0 |
|
|
148927090 |
AhmadShahal |
B |
March 8, 2022, 8:31 p.m. |
OK |
Kotlin 1.5 |
TESTS |
3 |
280 |
0 |
|
|
148923638 |
zuev93 |
B |
March 8, 2022, 7:32 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
15 |
0 |
|
|
148916493 |
kumanyanya |
B |
March 8, 2022, 5:57 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
31 |
0 |
|
|
148903610 |
SWFan |
B |
March 8, 2022, 4:41 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
31 |
0 |
|
|
148911554 |
emailam |
B |
March 8, 2022, 5:13 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
31 |
0 |
|
|
148946108 |
bai1013 |
B |
March 9, 2022, 4:55 a.m. |
OK |
MS C++ 2017 |
TESTS |
6 |
46 |
0 |
|
|
148939331 |
RealStarlight |
B |
March 9, 2022, 2:43 a.m. |
OK |
MS C++ 2017 |
TESTS |
6 |
46 |
0 |
|
|
148941708 |
shuitishashou |
B |
March 9, 2022, 3:32 a.m. |
OK |
MS C++ 2017 |
TESTS |
6 |
61 |
0 |
|
|
148917407 |
Viktor36 |
B |
March 8, 2022, 6:07 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
61 |
0 |
|
|
148929546 |
gabalawy |
B |
March 8, 2022, 9:19 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
61 |
0 |
|
|
148933915 |
_Rimjhim_36 |
B |
March 9, 2022, 12:02 a.m. |
OK |
MS C++ 2017 |
TESTS |
6 |
61 |
0 |
|
|
148920093 |
orloffm |
B |
March 8, 2022, 6:40 p.m. |
OK |
.NET Core C# |
TESTS |
3 |
77 |
1331200 |
|
|
148929417 |
qihto |
B |
March 8, 2022, 9:17 p.m. |
OK |
.NET Core C# |
TESTS |
3 |
108 |
3072000 |
|
|
148946303 |
bluemegane |
B |
March 9, 2022, 4:58 a.m. |
OK |
.NET Core C# |
TESTS |
6 |
124 |
2662400 |
|
|
148944743 |
Olasiliksizci |
B |
March 9, 2022, 4:30 a.m. |
OK |
.NET Core C# |
TESTS |
6 |
124 |
2867200 |
|
|
148938686 |
krish_me |
B |
March 9, 2022, 2:27 a.m. |
OK |
Node.js |
TESTS |
6 |
217 |
6041600 |
|
|
148918145 |
mishagam |
B |
March 8, 2022, 6:15 p.m. |
OK |
Ocaml |
TESTS |
3 |
0 |
204800 |
|
|
148945554 |
MistaAsh |
B |
March 9, 2022, 4:46 a.m. |
OK |
PyPy 3 |
TESTS |
6 |
140 |
4710400 |
|
|
148919551 |
michael.g.pan |
B |
March 8, 2022, 6:33 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
140 |
5222400 |
|
|
148948221 |
kuanc |
B |
March 9, 2022, 5:27 a.m. |
OK |
PyPy 3 |
TESTS |
6 |
140 |
5734400 |
|
|
148924059 |
grawlixes |
B |
March 8, 2022, 7:38 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
140 |
6348800 |
|
|
148948906 |
YashNandwana |
B |
March 9, 2022, 5:36 a.m. |
OK |
PyPy 3 |
TESTS |
6 |
155 |
5734400 |
|
|
148941293 |
conqueror_of_titia |
B |
March 9, 2022, 3:23 a.m. |
OK |
PyPy 3 |
TESTS |
6 |
155 |
5734400 |
|
|
148905933 |
mahbubnotes |
B |
March 8, 2022, 4:46 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
155 |
6860800 |
|
|
148914532 |
mahitanaidu249 |
B |
March 8, 2022, 5:38 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
265 |
6041600 |
|
|
148913847 |
chemistry_guy |
B |
March 8, 2022, 5:31 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
265 |
6041600 |
|
|
148930168 |
noobsatish |
B |
March 8, 2022, 9:34 p.m. |
OK |
PyPy 3 |
TESTS |
6 |
265 |
6553600 |
|
|
148917124 |
mirceamironenco |
B |
March 8, 2022, 6:04 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
93 |
30924800 |
|
|
148936034 |
Liberator187 |
B |
March 9, 2022, 1:11 a.m. |
OK |
PyPy 3-64 |
TESTS |
6 |
108 |
8294400 |
|
|
148910946 |
Code_Breaker101 |
B |
March 8, 2022, 5:09 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
108 |
9830400 |
|
|
148909494 |
DarkSparkle |
B |
March 8, 2022, 4:59 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
108 |
9830400 |
|
|
148919675 |
messiarun15042002 |
B |
March 8, 2022, 6:34 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
124 |
8396800 |
|
|
148946342 |
_N_0_0_B_ |
B |
March 9, 2022, 4:58 a.m. |
OK |
PyPy 3-64 |
TESTS |
6 |
124 |
9420800 |
|
|
148928791 |
wolfram_ |
B |
March 8, 2022, 9:03 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
124 |
9625600 |
|
|
148912555 |
Harshwardhan_Yadav |
B |
March 8, 2022, 5:21 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
139 |
9523200 |
|
|
148947317 |
hardik2001 |
B |
March 9, 2022, 5:13 a.m. |
OK |
PyPy 3-64 |
TESTS |
6 |
140 |
10752000 |
|
|
148906157 |
_sicmundus_ |
B |
March 8, 2022, 4:47 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
155 |
9625600 |
|
|
148912113 |
elistark |
B |
March 8, 2022, 5:17 p.m. |
OK |
Python 2 |
TESTS |
3 |
61 |
204800 |
|
|
148903971 |
belsedor |
B |
March 8, 2022, 4:42 p.m. |
OK |
Python 3 |
TESTS |
3 |
61 |
204800 |
|
|
148922837 |
binbean |
B |
March 8, 2022, 7:19 p.m. |
OK |
Python 3 |
TESTS |
3 |
62 |
0 |
|
|
148910109 |
StipeB |
B |
March 8, 2022, 5:03 p.m. |
OK |
Python 3 |
TESTS |
3 |
62 |
0 |
|
|
148939004 |
abhijeet.panihar.cse20 |
B |
March 9, 2022, 2:35 a.m. |
OK |
Python 3 |
TESTS |
6 |
77 |
307200 |
|
|
148921968 |
sPARTY |
B |
March 8, 2022, 7:06 p.m. |
OK |
Python 3 |
TESTS |
3 |
77 |
409600 |
|
|
148904380 |
haneef |
B |
March 8, 2022, 4:43 p.m. |
OK |
Python 3 |
TESTS |
3 |
108 |
0 |
|
|
148921163 |
haileesteinfeldconan |
B |
March 8, 2022, 6:54 p.m. |
OK |
Python 3 |
TESTS |
3 |
108 |
0 |
|
|
148904783 |
shakeer_04 |
B |
March 8, 2022, 4:44 p.m. |
OK |
Python 3 |
TESTS |
3 |
108 |
0 |
|
|
148928062 |
ransonrobbie3 |
B |
March 8, 2022, 8:49 p.m. |
OK |
Python 3 |
TESTS |
3 |
108 |
0 |
|
|
148906531 |
190330053 |
B |
March 8, 2022, 4:47 p.m. |
OK |
Python 3 |
TESTS |
3 |
109 |
0 |
|
|
148910852 |
rootkill |
B |
March 8, 2022, 5:08 p.m. |
OK |
Rust 2021 |
TESTS |
3 |
0 |
0 |
|
|
148917433 |
Hyrulia |
B |
March 8, 2022, 6:07 p.m. |
OK |
Rust 2021 |
TESTS |
3 |
108 |
0 |
|
|
remove filters
Back to search problems