# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1005360 |
2024-06-22T11:10:01 Z |
AdamGS |
Lamps (JOI19_lamps) |
C++17 |
|
9 ms |
5488 KB |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
int n;
string s, t;
cin >> n >> s >> t;
t="0"+t;
int ans=0;
rep(i, n) if(t[i]=='0' && t[i+1]=='1') ++ans;
cout << ans << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
376 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
6 ms |
5292 KB |
Output is correct |
8 |
Correct |
6 ms |
5488 KB |
Output is correct |
9 |
Correct |
6 ms |
5484 KB |
Output is correct |
10 |
Correct |
5 ms |
5292 KB |
Output is correct |
11 |
Correct |
5 ms |
5296 KB |
Output is correct |
12 |
Correct |
5 ms |
5292 KB |
Output is correct |
13 |
Correct |
5 ms |
5292 KB |
Output is correct |
14 |
Correct |
9 ms |
5420 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |