답안 #427937

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
427937 2021-06-15T05:28:14 Z milleniumEeee Lamps (JOI19_lamps) C++17
4 / 100
69 ms 4152 KB
#include <bits/stdc++.h>
using namespace std;

signed main() {
	int n;
	cin >> n;
	string a, b;
	cin >> a >> b;
	a = ' ' + a;
	b = ' ' + b;
	int ans = 0;
	for (int i = 1; i <= n; i++) {
		if (b[i] == '1') {
			int r = i;
			while (r <= n && b[r] == '1') {
				r++;
			}r--;
			ans++;
			i = r;
		}
	}
	cout << ans << endl;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 60 ms 4024 KB Output is correct
8 Correct 50 ms 4032 KB Output is correct
9 Correct 52 ms 4084 KB Output is correct
10 Correct 50 ms 4044 KB Output is correct
11 Correct 51 ms 4112 KB Output is correct
12 Correct 53 ms 4072 KB Output is correct
13 Correct 69 ms 4152 KB Output is correct
14 Correct 52 ms 4036 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -