# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
863807 |
2023-10-21T07:27:25 Z |
browntoad |
Lamps (JOI19_lamps) |
C++14 |
|
7 ms |
6460 KB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, n+1)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define pb push_back
#define pii pair<int, int>
#define f first
#define s second
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) (int)((x).size())
#define endl '\n'
const ll maxn = 3e5+5;
const ll inf = (1ll<<60);
const ll mod = 1e9+7;
signed main(){
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
int n; cin>>n;
string a, b; cin>>a>>b;
int cnt = 0;
b = '0'+b+'0';
REP(i, n+1){
if (b[i] != b[i+1]) cnt++;
}
cout<<cnt/2<<endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 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 |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
6 ms |
6216 KB |
Output is correct |
8 |
Correct |
6 ms |
6244 KB |
Output is correct |
9 |
Correct |
6 ms |
6248 KB |
Output is correct |
10 |
Correct |
6 ms |
6440 KB |
Output is correct |
11 |
Correct |
7 ms |
6460 KB |
Output is correct |
12 |
Correct |
5 ms |
5080 KB |
Output is correct |
13 |
Correct |
5 ms |
5064 KB |
Output is correct |
14 |
Correct |
6 ms |
5352 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |