제출 #1128164

#제출 시각아이디문제언어결과실행 시간메모리
1128164Alihan_8Lamps (JOI19_lamps)C++20
4 / 100
33 ms4156 KiB
#include <bits/stdc++.h> using namespace std; signed main(){ int n; cin >> n; string a, b; cin >> a >> b; int ans = 0; for ( int i = 0; i < n; i++ ){ if ( b[i] != '1' ) continue; int j = i; while ( b[j] == '1' ) j++; i = j; ans += 1; } 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...