답안 #427939

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
427939 2021-06-15T05:29:05 Z milleniumEeee Lamps (JOI19_lamps) C++17
4 / 100
61 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 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 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 224 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 50 ms 4148 KB Output is correct
8 Correct 52 ms 4056 KB Output is correct
9 Correct 51 ms 4056 KB Output is correct
10 Correct 61 ms 4152 KB Output is correct
11 Correct 51 ms 4152 KB Output is correct
12 Correct 55 ms 4144 KB Output is correct
13 Correct 49 ms 4104 KB Output is correct
14 Correct 61 ms 4076 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -