結果

問題 No.1183 コイン遊び
ユーザー ktr216ktr216
提出日時 2020-08-22 13:07:02
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 368 bytes
コンパイル時間 1,821 ms
コンパイル使用メモリ 164,792 KB
実行使用メモリ 11,240 KB
最終ジャッジ日時 2024-04-23 07:24:22
合計ジャッジ時間 9,198 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 1 ms
6,944 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 WA -
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 7 ms
6,944 KB
testcase_11 AC 18 ms
6,940 KB
testcase_12 AC 171 ms
8,192 KB
testcase_13 AC 149 ms
7,680 KB
testcase_14 AC 263 ms
10,556 KB
testcase_15 WA -
testcase_16 AC 278 ms
11,056 KB
testcase_17 WA -
testcase_18 AC 273 ms
11,060 KB
testcase_19 WA -
testcase_20 AC 276 ms
11,012 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 290 ms
11,000 KB
testcase_24 WA -
testcase_25 AC 269 ms
11,016 KB
testcase_26 AC 280 ms
11,020 KB
testcase_27 AC 278 ms
10,988 KB
testcase_28 AC 269 ms
11,192 KB
testcase_29 WA -
testcase_30 AC 274 ms
11,064 KB
testcase_31 AC 274 ms
11,000 KB
testcase_32 WA -
testcase_33 AC 270 ms
11,208 KB
testcase_34 AC 268 ms
11,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;

typedef long long ll;

int main() {
    int N;
    cin >> N;
    vector<int> A(N), B(N);
    rep(i, N) cin >> A[i];
    rep(i, N) cin >> B[i];
    int c = 1;
    rep(i, N - 1) {
        if ((A[i] ^ B[i]) != (A[i + 1] ^ B[i + 1])) c++;
    }
    cout << (c + 1) / 2 << "\n";
}
0