# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
402655 |
2021-05-12T08:07:25 Z |
erray |
Lamps (JOI19_lamps) |
C++11 |
|
1 ms |
460 KB |
// author: erray
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
string a, b;
cin >> n >> a >> b;
assert(count(a.begin(), a.end(), '0') == n);
int ans = 0;
for (int i = 1; i < n; ++i) {
if (b[i] == '1' && b[i - 1] == '0') {
++ans;
}
}
cout << ans << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |