| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1128164 | Alihan_8 | Lamps (JOI19_lamps) | C++20 | 33 ms | 4156 KiB |
#include <bits/stdc++.h>
using namespace std;
signed main(){
int n; cin >> n;
string a, b; cin >> a >> b;
int ans = 0;
for ( int i = 0; i < n; i++ ){
if ( b[i] != '1' ) continue;
int j = i;
while ( b[j] == '1' ) j++;
i = j; ans += 1;
}
cout << ans << '\n';
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
