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"You are given a string s . Each character is either 0 or 1. You want all 1's in the string to form a contiguous subsegment. For example, if the string is 0, 1, 00111 or 01111100, then all 1's form a contiguous subsegment, and if the string is 0101, 100001 or 11111111111101, then this condition is not met. You may erase some (possibly none) 0's from the string. What is the minimum number of 0's that you have to erase? The first line contains one integer t ( 1 <= t <= 100 ) -- the number of test cases. Then t lines follow, each representing a test case. Each line contains one string s ( 1 <= |s| <= 100 ); each character of s is either 0 or 1. Print t integers, where the i -th integer is the answer to the i -th testcase (the minimum number of 0's that you have to erase from s ). In the first test case you have to delete the third and forth symbols from string 010011 (it turns into 0111). "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
70910728 |
strelas |
A |
Feb. 12, 2020, 6:12 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
7 |
30 |
0 |
|
700 |
70924943 |
541907010414 |
A |
Feb. 13, 2020, 1:51 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
7 |
46 |
1126400 |
|
700 |
71021966 |
Arteni_Cristi |
A |
Feb. 13, 2020, 8:48 p.m. |
OK |
FPC |
TESTS |
7 |
30 |
307200 |
|
700 |
70877875 |
Eric_Lian |
A |
Feb. 12, 2020, 3:30 p.m. |
OK |
FPC |
TESTS |
7 |
31 |
204800 |
|
700 |
70956138 |
canhtoannct |
A |
Feb. 13, 2020, 12:51 p.m. |
OK |
FPC |
TESTS |
7 |
31 |
512000 |
|
700 |
71052308 |
Big-Rookie |
A |
Feb. 14, 2020, 10:24 a.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
71043573 |
Tangtang511 |
A |
Feb. 14, 2020, 7:42 a.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
70959772 |
hnust_huqiong |
A |
Feb. 13, 2020, 1:52 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
70938239 |
vjudge2 |
A |
Feb. 13, 2020, 7:27 a.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
71071639 |
Cai_Chengen |
A |
Feb. 14, 2020, 4:03 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
70916707 |
Alperen_T |
A |
Feb. 12, 2020, 8:04 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
70915955 |
Aonkon |
A |
Feb. 12, 2020, 7:49 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
70899003 |
golgesiz |
A |
Feb. 12, 2020, 4:27 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
70898192 |
Tahmid3195 |
A |
Feb. 12, 2020, 4:25 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
70891034 |
hnust_guoqingwen |
A |
Feb. 12, 2020, 4:04 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
700 |
71075942 |
kimjungwow |
A |
Feb. 14, 2020, 5:19 p.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71065521 |
xplus2g4 |
A |
Feb. 14, 2020, 2:27 p.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71062890 |
Harmony_ |
A |
Feb. 14, 2020, 1:50 p.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71061925 |
TLLDW |
A |
Feb. 14, 2020, 1:36 p.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71057194 |
2_3_3 |
A |
Feb. 14, 2020, 12:20 p.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71057143 |
MyVegetableHasExploded |
A |
Feb. 14, 2020, 12:19 p.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71096156 |
shashikumarchalotra |
A |
Feb. 15, 2020, 4:59 a.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71090518 |
rqbqbqb |
A |
Feb. 15, 2020, 1:09 a.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71088590 |
yolobanana |
A |
Feb. 14, 2020, 11:09 p.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71079472 |
rns2452 |
A |
Feb. 14, 2020, 6:29 p.m. |
OK |
GNU C++11 |
TESTS |
7 |
15 |
0 |
|
700 |
71094709 |
kaash_56 |
A |
Feb. 15, 2020, 4:13 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71095205 |
M.A.Zohir |
A |
Feb. 15, 2020, 4:31 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71095238 |
copycode |
A |
Feb. 15, 2020, 4:32 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71095675 |
Shinchu_728 |
A |
Feb. 15, 2020, 4:45 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71096271 |
hellomath |
A |
Feb. 15, 2020, 5:02 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71096549 |
Biley |
A |
Feb. 15, 2020, 5:09 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71094437 |
vjudge5 |
A |
Feb. 15, 2020, 4:03 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71090466 |
ravi_the_great |
A |
Feb. 15, 2020, 1:06 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71090457 |
213ddw |
A |
Feb. 15, 2020, 1:05 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71090140 |
Rdpaula |
A |
Feb. 15, 2020, 12:41 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
700 |
71089979 |
AmrSaleh2234 |
A |
Feb. 15, 2020, 12:31 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71095538 |
cryptic_cyder |
A |
Feb. 15, 2020, 4:42 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71095303 |
Kirin_Sunset |
A |
Feb. 15, 2020, 4:34 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71094519 |
cycleke |
A |
Feb. 15, 2020, 4:06 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71094441 |
Himel44 |
A |
Feb. 15, 2020, 4:03 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71091506 |
JKLover |
A |
Feb. 15, 2020, 1:58 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71090007 |
AmrSaleh2234 |
A |
Feb. 15, 2020, 12:33 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71089570 |
wudixixi |
A |
Feb. 15, 2020, 12:05 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71088501 |
artun |
A |
Feb. 14, 2020, 11:05 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71088363 |
Vukadinovic |
A |
Feb. 14, 2020, 10:58 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
0 |
|
700 |
71093794 |
ving.xia |
A |
Feb. 15, 2020, 3:37 a.m. |
OK |
Go |
TESTS |
7 |
31 |
0 |
|
700 |
71059310 |
tuan_bitch |
A |
Feb. 14, 2020, 1 p.m. |
OK |
Go |
TESTS |
7 |
31 |
0 |
|
700 |
70927484 |
ktateish |
A |
Feb. 13, 2020, 3:23 a.m. |
OK |
Go |
TESTS |
7 |
31 |
0 |
|
700 |
70926943 |
KanhuKeNanu |
A |
Feb. 13, 2020, 3:05 a.m. |
OK |
Go |
TESTS |
7 |
31 |
0 |
|
700 |
70873533 |
snow_bear_328 |
A |
Feb. 12, 2020, 3:20 p.m. |
OK |
Go |
TESTS |
7 |
31 |
0 |
|
700 |
70942625 |
lsierant |
A |
Feb. 13, 2020, 8:54 a.m. |
OK |
Go |
TESTS |
7 |
46 |
0 |
|
700 |
70875020 |
jaimatadiletsrock |
A |
Feb. 12, 2020, 3:23 p.m. |
OK |
Go |
TESTS |
7 |
46 |
13414400 |
|
700 |
70979635 |
Russell_Emerine |
A |
Feb. 13, 2020, 3:12 p.m. |
OK |
Haskell |
TESTS |
7 |
15 |
102400 |
|
700 |
71012646 |
rm360179 |
A |
Feb. 13, 2020, 5:52 p.m. |
OK |
Haskell |
TESTS |
7 |
46 |
102400 |
|
700 |
70908395 |
Vatsal53 |
A |
Feb. 12, 2020, 5:38 p.m. |
OK |
Java 11 |
TESTS |
7 |
170 |
0 |
|
700 |
71087321 |
about |
A |
Feb. 14, 2020, 10:09 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
700 |
71018789 |
1NVAL1D |
A |
Feb. 13, 2020, 7:31 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
700 |
71009762 |
hursliza |
A |
Feb. 13, 2020, 5:20 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
700 |
71008484 |
warrioramrit |
A |
Feb. 13, 2020, 4:37 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
700 |
70960377 |
SamuelLH |
A |
Feb. 13, 2020, 2:02 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
700 |
70955991 |
hstr2785 |
A |
Feb. 13, 2020, 12:49 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
700 |
70943713 |
dash2199 |
A |
Feb. 13, 2020, 9:09 a.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
700 |
70936038 |
kiberKotleta2009 |
A |
Feb. 13, 2020, 6:46 a.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
700 |
70931239 |
makhanchor |
A |
Feb. 13, 2020, 5:13 a.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
700 |
70960495 |
Nutella3000 |
A |
Feb. 13, 2020, 2:04 p.m. |
OK |
Java 8 |
TESTS |
7 |
92 |
0 |
|
700 |
70927056 |
bluesky111 |
A |
Feb. 13, 2020, 3:09 a.m. |
OK |
Java 8 |
TESTS |
7 |
92 |
0 |
|
700 |
71009858 |
polyakoff |
A |
Feb. 13, 2020, 5:23 p.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
700 |
70940965 |
nadaabdo588 |
A |
Feb. 13, 2020, 8:22 a.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
700 |
70922506 |
Java |
A |
Feb. 12, 2020, 11:43 p.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
700 |
70885099 |
richikchanda1999 |
A |
Feb. 12, 2020, 3:48 p.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
700 |
71080350 |
om_prajapat |
A |
Feb. 14, 2020, 6:47 p.m. |
OK |
Java 8 |
TESTS |
7 |
108 |
0 |
|
700 |
71048974 |
di_halt |
A |
Feb. 14, 2020, 9:19 a.m. |
OK |
Java 8 |
TESTS |
7 |
108 |
0 |
|
700 |
71036047 |
Kavi.Prajapati |
A |
Feb. 14, 2020, 5:28 a.m. |
OK |
Java 8 |
TESTS |
7 |
108 |
0 |
|
700 |
70959328 |
AhmedZ |
A |
Feb. 13, 2020, 1:44 p.m. |
OK |
Java 8 |
TESTS |
7 |
108 |
0 |
|
700 |
70947085 |
pseudonimoX |
A |
Feb. 13, 2020, 10:03 a.m. |
OK |
JavaScript |
TESTS |
7 |
31 |
0 |
|
700 |
70946827 |
pseudonimoX |
A |
Feb. 13, 2020, 9:58 a.m. |
OK |
JavaScript |
TESTS |
7 |
31 |
0 |
|
700 |
70903110 |
formalist |
A |
Feb. 12, 2020, 4:45 p.m. |
OK |
Kotlin |
TESTS |
7 |
109 |
0 |
|
700 |
70948773 |
n.coder |
A |
Feb. 13, 2020, 10:34 a.m. |
OK |
Kotlin |
TESTS |
7 |
124 |
0 |
|
700 |
70941559 |
Spheniscine |
A |
Feb. 13, 2020, 8:35 a.m. |
OK |
Kotlin |
TESTS |
7 |
124 |
0 |
|
700 |
70926458 |
KanhuKeNanu |
A |
Feb. 13, 2020, 2:48 a.m. |
OK |
Kotlin |
TESTS |
7 |
139 |
0 |
|
700 |
70875594 |
sleepteam |
A |
Feb. 12, 2020, 3:24 p.m. |
OK |
Kotlin |
TESTS |
7 |
140 |
0 |
|
700 |
70904801 |
david_varela |
A |
Feb. 12, 2020, 4:58 p.m. |
OK |
Kotlin |
TESTS |
7 |
140 |
614400 |
|
700 |
remove filters
Back to search problems