Submission #623627

#TimeUsernameProblemLanguageResultExecution timeMemory
623627ArnchLamps (JOI19_lamps)C++17
4 / 100
8 ms4428 KiB
// oooo /* har chi delet mikhad bebar ~ gitar o ba khodet nabar! ~ ;Amoo_Hasan; */ #include<bits/stdc++.h> //#pragma GCC optimize("O3,no-stack-protector,unroll-loops") //#pragma GCC target("avx2,fma") using namespace std; typedef long long ll; typedef long double ld; #define Sz(x) int((x).size()) #define All(x) (x).begin(), (x).end() #define wtf(x) cout<<#x <<" : " <<x <<endl constexpr ll inf = 1e18, N = 1e6 + 10, mod = 1e9 + 7, pr = 1000696969; int main() { ios :: sync_with_stdio(0), cin.tie(0); int n; cin >>n; string A, B; cin >>A >>B; for(int i = 0; i < n; i++) { if(A[i] != '0') { assert(0); } } int ans = 0; B.push_back('0'); for(int i = 1; i < Sz(B); i++) { if(B[i] == '0' && B[i - 1] == '1') ans++; } cout<<ans; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...