Submission #700853

#TimeUsernameProblemLanguageResultExecution timeMemory
700853PenguinsAreCuteLamps (JOI19_lamps)C++17
4 / 100
46 ms6112 KiB
#include <bits/stdc++.h> using namespace std; int main() { int N, blocks = 0; cin >> N; string A, B; cin >> A >> B; if(B[0] == '1') blocks++; for(int i = 1; i < N; i++) { if(B[i] == '1' && B[i - 1] == '0') blocks++; } cout << blocks; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...