# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
105831 |
2019-04-15T09:56:37 Z |
Alexa2001 |
Lamps (JOI19_lamps) |
C++17 |
|
21 ms |
11860 KB |
#include <bits/stdc++.h>
using namespace std;
const int Nmax = 1e6 + 5;
int a[Nmax], b[Nmax];
int i, n;
int main()
{
// freopen("input", "r", stdin);
cin.sync_with_stdio(false);
cin >> n;
string A, B;
cin >> A >> B;
for(i=1; i<=n; ++i)
a[i] = A[i-1] - '0', b[i] = B[i-1] - '0';
int dif = 0;
for(i=1; i<=n+1; ++i)
dif += (b[i] != b[i-1]);
cout << dif / 2 << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
384 KB |
Output is correct |
2 |
Correct |
2 ms |
384 KB |
Output is correct |
3 |
Correct |
2 ms |
384 KB |
Output is correct |
4 |
Correct |
2 ms |
384 KB |
Output is correct |
5 |
Correct |
2 ms |
384 KB |
Output is correct |
6 |
Correct |
3 ms |
384 KB |
Output is correct |
7 |
Correct |
18 ms |
11860 KB |
Output is correct |
8 |
Correct |
18 ms |
11348 KB |
Output is correct |
9 |
Correct |
19 ms |
11312 KB |
Output is correct |
10 |
Correct |
17 ms |
11348 KB |
Output is correct |
11 |
Correct |
18 ms |
11340 KB |
Output is correct |
12 |
Correct |
21 ms |
11340 KB |
Output is correct |
13 |
Correct |
16 ms |
11372 KB |
Output is correct |
14 |
Correct |
18 ms |
11476 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |