Submission #863808

# Submission time Handle Problem Language Result Execution time Memory
863808 2023-10-21T07:27:25 Z browntoad Lamps (JOI19_lamps) C++14
4 / 100
5 ms 4944 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 600 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 600 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 1 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 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 4 ms 4268 KB Output is correct
8 Correct 4 ms 4524 KB Output is correct
9 Correct 5 ms 4272 KB Output is correct
10 Correct 4 ms 4524 KB Output is correct
11 Correct 5 ms 4272 KB Output is correct
12 Correct 5 ms 4324 KB Output is correct
13 Correct 5 ms 4944 KB Output is correct
14 Correct 5 ms 4900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 600 KB Output isn't correct
2 Halted 0 ms 0 KB -