Submission #863807

#TimeUsernameProblemLanguageResultExecution timeMemory
863807browntoadLamps (JOI19_lamps)C++14
4 / 100
7 ms6460 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...