Submission #865270

#TimeUsernameProblemLanguageResultExecution timeMemory
865270LittleOrangeLamps (JOI19_lamps)C++17
4 / 100
4 ms4496 KiB
#include<bits/stdc++.h> using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(0);cin.tie(0); ll n; string a,b; cin >> n >> a >> b; ll ans = 0; for(ll i = 0;i<n;i++) ans += b[i]=='1'&&(i==0||b[i-1]=='0'); cout << ans << "\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...