답안 #132555

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
132555 2019-07-19T07:21:42 Z MrTEK Lamps (JOI19_lamps) C++14
4 / 100
8 ms 4264 KB
#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair <int,int> ii;

const int N = 1e6 + 5;
const int inf = 2e9;
const int SQ = 300;

int n,ans;
char a[N],b[N];

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL) ; cout.tie(NULL);
	cin >> n >> (a + 1) >> (b + 1);
	for (int i = 1 ; i <= n ; i++) {
		if (b[i] == '0')
			continue;
		while(i + 1 <= n && b[i + 1] == '1')
			i++;
		ans++;
	}
	cout << ans << endl;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 3 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 7 ms 2296 KB Output is correct
8 Correct 8 ms 4216 KB Output is correct
9 Correct 8 ms 4216 KB Output is correct
10 Correct 8 ms 4216 KB Output is correct
11 Correct 8 ms 4216 KB Output is correct
12 Correct 7 ms 4264 KB Output is correct
13 Correct 7 ms 4188 KB Output is correct
14 Correct 8 ms 4216 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -