Submission #1005360

#TimeUsernameProblemLanguageResultExecution timeMemory
1005360AdamGSLamps (JOI19_lamps)C++17
4 / 100
9 ms5488 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(a, b) for(int a = 0; a < (b); ++a) #define st first #define nd second #define pb push_back #define all(a) a.begin(), a.end() int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; string s, t; cin >> n >> s >> t; t="0"+t; int ans=0; rep(i, n) if(t[i]=='0' && t[i+1]=='1') ++ans; 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...