結果

問題 No.1183 コイン遊び
ユーザー 夜
提出日時 2020-08-23 16:47:38
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 321 ms / 2,000 ms
コード長 668 bytes
コンパイル時間 824 ms
コンパイル使用メモリ 92,168 KB
実行使用メモリ 5,504 KB
最終ジャッジ日時 2024-04-23 18:06:34
合計ジャッジ時間 9,630 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 8 ms
5,376 KB
testcase_11 AC 21 ms
5,376 KB
testcase_12 AC 198 ms
5,376 KB
testcase_13 AC 177 ms
5,376 KB
testcase_14 AC 296 ms
5,376 KB
testcase_15 AC 317 ms
5,504 KB
testcase_16 AC 318 ms
5,504 KB
testcase_17 AC 315 ms
5,376 KB
testcase_18 AC 317 ms
5,504 KB
testcase_19 AC 321 ms
5,376 KB
testcase_20 AC 318 ms
5,504 KB
testcase_21 AC 299 ms
5,376 KB
testcase_22 AC 300 ms
5,504 KB
testcase_23 AC 315 ms
5,504 KB
testcase_24 AC 316 ms
5,504 KB
testcase_25 AC 316 ms
5,376 KB
testcase_26 AC 316 ms
5,504 KB
testcase_27 AC 319 ms
5,376 KB
testcase_28 AC 317 ms
5,376 KB
testcase_29 AC 298 ms
5,504 KB
testcase_30 AC 308 ms
5,504 KB
testcase_31 AC 318 ms
5,504 KB
testcase_32 AC 316 ms
5,504 KB
testcase_33 AC 316 ms
5,504 KB
testcase_34 AC 316 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
bool a[1000010], b[1000010];
int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	for (int j = 0; j < n; j++) {
		cin >> b[j];
	}
	int ans = 0;
	bool bo = false;
	for (int i = 0; i < n; i++) {
		if (a[i] != b[i]) {
			bo = true;
		}
		else {
			if (bo) {
				ans++;
			}
			bo = false;
		}
	}
	if (bo) {
		ans++;
	}
	cout << ans << endl;
	return 0;
}
0