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"The time on the planet Lapituletti goes the same way it goes on Earth but a day lasts h hours and each hour lasts m minutes. The inhabitants of that planet use digital clocks similar to earth ones. Clocks display time in a format HH:MM (the number of hours in decimal is displayed first, then (after the colon) follows the number of minutes in decimal; the number of minutes and hours is written with leading zeros if needed to form a two-digit number). Hours are numbered from 0 to h-1 and minutes are numbered from 0 to m-1 . That's how the digits are displayed on the clock. Please note that digit 1 is placed in the middle of its position. A standard mirror is in use on the planet Lapituletti. Inhabitants often look at the reflection of the digital clocks in the mirror and feel happy when what you see on the reflected clocks is a valid time (that means that you see valid digits in the reflection and this time can be seen on the normal clocks at some moment of a day). The image of the clocks in the mirror is reflected against a vertical axis. The reflection is not a valid time. The reflection is a valid time with h=24 , m = 60 . However, for example, if h=10 , m=60 , then the reflection is not a valid time. An inhabitant of the planet Lapituletti begins to look at a mirrored image of the clocks at some time moment s and wants to know the nearest future time moment (which can possibly happen on the next day), when the reflected clock time is valid. It can be shown that with any h , m , s such a moment exists. If the reflected time is correct at the moment the inhabitant began to look at the clock, that moment is considered the nearest. You are asked to solve the problem for several test cases. The first line contains a single integer T ( 1 <= T <= 100 ) -- the number of test cases. The next 2 cdot T lines contain the description of test cases. The descript"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
109279878 |
yym123456 |
B |
March 6, 2021, 4:57 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
12 |
46 |
0 |
|
|
109270962 |
hunst_kangjiahao |
B |
March 6, 2021, 4:02 p.m. |
OK |
GNU C11 |
TESTS |
12 |
15 |
0 |
|
|
109272281 |
hnust_hesiyi |
B |
March 6, 2021, 4:07 p.m. |
OK |
GNU C11 |
TESTS |
12 |
15 |
0 |
|
|
109279645 |
mohan7575 |
B |
March 6, 2021, 4:55 p.m. |
OK |
GNU C11 |
TESTS |
12 |
15 |
0 |
|
|
109301727 |
sr_ram |
B |
March 7, 2021, 3:07 a.m. |
OK |
GNU C11 |
TESTS |
12 |
15 |
0 |
|
|
109305254 |
hardik_gupta |
B |
March 7, 2021, 4:42 a.m. |
OK |
GNU C11 |
TESTS |
12 |
15 |
0 |
|
|
109269934 |
anubhavsaboth |
B |
March 6, 2021, 3:59 p.m. |
OK |
GNU C11 |
TESTS |
12 |
15 |
0 |
|
|
109267605 |
al_02 |
B |
March 6, 2021, 3:51 p.m. |
OK |
GNU C11 |
TESTS |
12 |
30 |
0 |
|
|
109275557 |
_Akhil_3366 |
B |
March 6, 2021, 4:16 p.m. |
OK |
GNU C11 |
TESTS |
12 |
30 |
0 |
|
|
109273740 |
Arpitkr |
B |
March 6, 2021, 4:11 p.m. |
OK |
GNU C11 |
TESTS |
12 |
31 |
0 |
|
|
109272825 |
Fenrir_EX |
B |
March 6, 2021, 4:09 p.m. |
OK |
GNU C11 |
TESTS |
12 |
46 |
0 |
|
|
109306675 |
ze9 |
B |
March 7, 2021, 5:13 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109311144 |
vishalanilmishra26 |
B |
March 7, 2021, 6:27 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109310914 |
kkkingking |
B |
March 7, 2021, 6:23 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109310695 |
badwomanpa |
B |
March 7, 2021, 6:20 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109309749 |
hnust_xiaoshun |
B |
March 7, 2021, 6:05 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109309514 |
vandoor |
B |
March 7, 2021, 6:01 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109309381 |
HHLOVELYS |
B |
March 7, 2021, 5:59 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109307680 |
YangTY |
B |
March 7, 2021, 5:31 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109306899 |
OmkarC |
B |
March 7, 2021, 5:17 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109306738 |
lhrrhl |
B |
March 7, 2021, 5:14 a.m. |
OK |
GNU C++11 |
TESTS |
12 |
15 |
0 |
|
|
109304505 |
uchiha104040 |
B |
March 7, 2021, 4:23 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109305054 |
Saurabh2-7 |
B |
March 7, 2021, 4:37 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109302927 |
vrundan28 |
B |
March 7, 2021, 3:38 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109306455 |
liuvv1 |
B |
March 7, 2021, 5:09 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109306583 |
JPS1028 |
B |
March 7, 2021, 5:11 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109304430 |
ganpati_bappa |
B |
March 7, 2021, 4:21 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109306957 |
capricious_ |
B |
March 7, 2021, 5:18 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109310186 |
_Isheeka_ |
B |
March 7, 2021, 6:12 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109310382 |
yellow_falsh |
B |
March 7, 2021, 6:15 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109310495 |
_387_ |
B |
March 7, 2021, 6:16 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
15 |
0 |
|
|
109310380 |
cppascalinux |
B |
March 7, 2021, 6:15 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109308727 |
mukim |
B |
March 7, 2021, 5:49 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109307611 |
324165877 |
B |
March 7, 2021, 5:30 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109307495 |
MayankGusain |
B |
March 7, 2021, 5:28 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109311031 |
gauravkumarjha442 |
B |
March 7, 2021, 6:25 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109311007 |
lazy_and_slow |
B |
March 7, 2021, 6:25 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109310963 |
wzyeustia |
B |
March 7, 2021, 6:24 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109310895 |
aatrey |
B |
March 7, 2021, 6:23 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109310743 |
tyagsa |
B |
March 7, 2021, 6:20 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109309362 |
linxiaoxiao |
B |
March 7, 2021, 5:59 a.m. |
OK |
GNU C++17 |
TESTS |
12 |
15 |
0 |
|
|
109306761 |
hesiwei |
B |
March 7, 2021, 5:14 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109311232 |
Baylor_ |
B |
March 7, 2021, 6:29 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109309887 |
Bhumika_2001 |
B |
March 7, 2021, 6:07 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109307663 |
shjohw12 |
B |
March 7, 2021, 5:30 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109306475 |
adityateltia22 |
B |
March 7, 2021, 5:09 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109305131 |
ginwAa |
B |
March 7, 2021, 4:39 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109304801 |
INSIDE17 |
B |
March 7, 2021, 4:30 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109301046 |
mofianger |
B |
March 7, 2021, 2:47 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109300970 |
froggyzhang |
B |
March 7, 2021, 2:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109300738 |
Chet8n |
B |
March 7, 2021, 2:37 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
15 |
0 |
|
|
109305411 |
Vatsal53 |
B |
March 7, 2021, 4:46 a.m. |
OK |
Java 11 |
TESTS |
12 |
186 |
0 |
|
|
109282612 |
tankman890 |
B |
March 6, 2021, 5:26 p.m. |
OK |
Java 11 |
TESTS |
12 |
187 |
0 |
|
|
109298098 |
blackBird |
B |
March 7, 2021, 12:52 a.m. |
OK |
Java 11 |
TESTS |
12 |
187 |
0 |
|
|
109304898 |
pathakbaba |
B |
March 7, 2021, 4:33 a.m. |
OK |
Java 11 |
TESTS |
12 |
202 |
0 |
|
|
109280320 |
npwolverine |
B |
March 6, 2021, 5 p.m. |
OK |
Java 11 |
TESTS |
12 |
202 |
0 |
|
|
109268016 |
MagnuS_2001 |
B |
March 6, 2021, 3:53 p.m. |
OK |
Java 11 |
TESTS |
12 |
202 |
0 |
|
|
109306826 |
ryanranaut |
B |
March 7, 2021, 5:15 a.m. |
OK |
Java 11 |
TESTS |
12 |
202 |
0 |
|
|
109286773 |
BlueBirdie |
B |
March 6, 2021, 6:25 p.m. |
OK |
Java 11 |
TESTS |
12 |
202 |
0 |
|
|
109293623 |
adarsh_goku |
B |
March 6, 2021, 8:58 p.m. |
OK |
Java 11 |
TESTS |
12 |
217 |
0 |
|
|
109306048 |
dhruvil_8803 |
B |
March 7, 2021, 4:59 a.m. |
OK |
Java 11 |
TESTS |
12 |
217 |
0 |
|
|
109306222 |
7dan |
B |
March 7, 2021, 5:04 a.m. |
OK |
Java 8 |
TESTS |
12 |
108 |
0 |
|
|
109285673 |
goyalumang |
B |
March 6, 2021, 6:08 p.m. |
OK |
Java 8 |
TESTS |
12 |
108 |
0 |
|
|
109292793 |
GVR |
B |
March 6, 2021, 8:33 p.m. |
OK |
Java 8 |
TESTS |
12 |
108 |
0 |
|
|
109285004 |
RonWonWon |
B |
March 6, 2021, 5:58 p.m. |
OK |
Java 8 |
TESTS |
12 |
109 |
0 |
|
|
109269678 |
cppmaster228 |
B |
March 6, 2021, 3:58 p.m. |
OK |
Java 8 |
TESTS |
12 |
109 |
0 |
|
|
109305328 |
Parimal |
B |
March 7, 2021, 4:44 a.m. |
OK |
Java 8 |
TESTS |
12 |
109 |
0 |
|
|
109297241 |
BogoSortIsBest |
B |
March 6, 2021, 11:54 p.m. |
OK |
Java 8 |
TESTS |
12 |
109 |
0 |
|
|
109279639 |
pramit1998 |
B |
March 6, 2021, 4:55 p.m. |
OK |
Java 8 |
TESTS |
12 |
109 |
0 |
|
|
109309689 |
n20gupta |
B |
March 7, 2021, 6:04 a.m. |
OK |
Java 8 |
TESTS |
12 |
124 |
0 |
|
|
109285403 |
ag157 |
B |
March 6, 2021, 6:04 p.m. |
OK |
Java 8 |
TESTS |
12 |
124 |
0 |
|
|
109278796 |
Tlatoani |
B |
March 6, 2021, 4:49 p.m. |
OK |
Kotlin |
TESTS |
12 |
140 |
102400 |
|
|
109297915 |
SGHD |
B |
March 7, 2021, 12:42 a.m. |
OK |
Kotlin |
TESTS |
12 |
156 |
1740800 |
|
|
109269322 |
v4_adi |
B |
March 6, 2021, 3:57 p.m. |
OK |
Kotlin |
TESTS |
12 |
217 |
204800 |
|
|
109279970 |
nik2005 |
B |
March 6, 2021, 4:57 p.m. |
OK |
MS C++ |
TESTS |
12 |
31 |
0 |
|
|
109301293 |
njtech1921004054 |
B |
March 7, 2021, 2:55 a.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
15 |
0 |
|
|
109268219 |
PanZverski |
B |
March 6, 2021, 3:53 p.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
15 |
0 |
|
|
109303945 |
lasd |
B |
March 7, 2021, 4:08 a.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
15 |
0 |
|
|
109270576 |
kingcrimeson |
B |
March 6, 2021, 4:01 p.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
15 |
0 |
|
|
109281351 |
For_Tawers |
B |
March 6, 2021, 5:10 p.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
30 |
0 |
|
|
109301530 |
WustHB |
B |
March 7, 2021, 3:01 a.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
30 |
0 |
|
|
109269131 |
202003012001 |
B |
March 6, 2021, 3:56 p.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
30 |
0 |
|
|
109302154 |
vanloc1808 |
B |
March 7, 2021, 3:19 a.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
30 |
307200 |
|
|
109301410 |
linxd |
B |
March 7, 2021, 2:58 a.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
31 |
0 |
|
|
109300285 |
njtech1921147136 |
B |
March 7, 2021, 2:22 a.m. |
OK |
MS C++ 2017 |
TESTS |
12 |
31 |
0 |
|
|
109269882 |
thetansquared |
B |
March 6, 2021, 3:59 p.m. |
OK |
.NET Core C# |
TESTS |
12 |
92 |
0 |
|
|
109279405 |
sakapon |
B |
March 6, 2021, 4:53 p.m. |
OK |
.NET Core C# |
TESTS |
12 |
202 |
3481600 |
|
|
109271486 |
louisono |
B |
March 6, 2021, 4:04 p.m. |
OK |
Ocaml |
TESTS |
12 |
31 |
512000 |
|
|
109271914 |
CrazyDr |
B |
March 6, 2021, 4:06 p.m. |
OK |
PHP |
TESTS |
12 |
234 |
0 |
|
|
109285641 |
Gaurav1 |
B |
March 6, 2021, 6:07 p.m. |
OK |
PyPy 2 |
TESTS |
12 |
108 |
3379200 |
|
|
109289900 |
maciaas |
B |
March 6, 2021, 7:22 p.m. |
OK |
PyPy 2 |
TESTS |
12 |
248 |
5529600 |
|
|
109287951 |
mbars |
B |
March 6, 2021, 6:45 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
93 |
102400 |
|
|
109291306 |
shade33 |
B |
March 6, 2021, 7:54 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
93 |
1331200 |
|
|
109270833 |
otsuneko |
B |
March 6, 2021, 4:02 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
93 |
1536000 |
|
|
109287872 |
marroncastle |
B |
March 6, 2021, 6:44 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
93 |
1740800 |
|
|
109269892 |
-LIMB_OF_PERSEPHONE- |
B |
March 6, 2021, 3:59 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
93 |
2867200 |
|
|
109280067 |
Rajesh_Kaipa |
B |
March 6, 2021, 4:58 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
108 |
1536000 |
|
|
109279389 |
armsusman |
B |
March 6, 2021, 4:53 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
108 |
2150400 |
|
|
109282879 |
nitish420 |
B |
March 6, 2021, 5:29 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
108 |
2252800 |
|
|
109286388 |
dheerajkhatri0802 |
B |
March 6, 2021, 6:19 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
108 |
2457600 |
|
|
109267987 |
complexroots |
B |
March 6, 2021, 3:53 p.m. |
OK |
PyPy 3 |
TESTS |
12 |
109 |
0 |
|
|
109288721 |
aman741 |
B |
March 6, 2021, 6:58 p.m. |
OK |
Python 3 |
TESTS |
12 |
62 |
307200 |
|
|
109282616 |
ellunia |
B |
March 6, 2021, 5:26 p.m. |
OK |
Python 3 |
TESTS |
12 |
62 |
307200 |
|
|
109290528 |
jaglike_makkar |
B |
March 6, 2021, 7:37 p.m. |
OK |
Python 3 |
TESTS |
12 |
77 |
307200 |
|
|
109283234 |
Namanrockzzz |
B |
March 6, 2021, 5:34 p.m. |
OK |
Python 3 |
TESTS |
12 |
77 |
307200 |
|
|
109279763 |
nikhilsai445 |
B |
March 6, 2021, 4:56 p.m. |
OK |
Python 3 |
TESTS |
12 |
77 |
307200 |
|
|
109276247 |
tusharjain0022 |
B |
March 6, 2021, 4:18 p.m. |
OK |
Python 3 |
TESTS |
12 |
77 |
307200 |
|
|
109273373 |
iimmortal |
B |
March 6, 2021, 4:10 p.m. |
OK |
Python 3 |
TESTS |
12 |
77 |
307200 |
|
|
109269948 |
arpan.parikh |
B |
March 6, 2021, 3:59 p.m. |
OK |
Python 3 |
TESTS |
12 |
77 |
512000 |
|
|
109283815 |
rupsgrover |
B |
March 6, 2021, 5:41 p.m. |
OK |
Python 3 |
TESTS |
12 |
108 |
307200 |
|
|
109269746 |
aryan_129 |
B |
March 6, 2021, 3:58 p.m. |
OK |
Python 3 |
TESTS |
12 |
124 |
307200 |
|
|
remove filters
Back to search problems