結果

問題 No.1183 コイン遊び
ユーザー 🍮かんプリン🍮かんプリン
提出日時 2020-08-22 17:26:33
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 289 ms / 2,000 ms
コード長 530 bytes
コンパイル時間 1,495 ms
コンパイル使用メモリ 168,592 KB
実行使用メモリ 16,544 KB
最終ジャッジ日時 2023-08-05 14:12:57
合計ジャッジ時間 10,085 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 7 ms
4,380 KB
testcase_11 AC 19 ms
4,380 KB
testcase_12 AC 177 ms
11,120 KB
testcase_13 AC 156 ms
10,732 KB
testcase_14 AC 262 ms
14,640 KB
testcase_15 AC 284 ms
15,516 KB
testcase_16 AC 282 ms
15,056 KB
testcase_17 AC 285 ms
15,844 KB
testcase_18 AC 287 ms
16,156 KB
testcase_19 AC 287 ms
15,372 KB
testcase_20 AC 284 ms
16,444 KB
testcase_21 AC 265 ms
15,004 KB
testcase_22 AC 269 ms
16,296 KB
testcase_23 AC 283 ms
16,496 KB
testcase_24 AC 285 ms
15,912 KB
testcase_25 AC 285 ms
14,644 KB
testcase_26 AC 286 ms
16,544 KB
testcase_27 AC 283 ms
15,396 KB
testcase_28 AC 289 ms
15,112 KB
testcase_29 AC 266 ms
15,228 KB
testcase_30 AC 275 ms
14,836 KB
testcase_31 AC 285 ms
15,900 KB
testcase_32 AC 284 ms
14,952 KB
testcase_33 AC 281 ms
15,316 KB
testcase_34 AC 279 ms
16,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/**
 *   @FileName	a.cpp
 *   @Author	kanpurin
 *   @Created	2020.08.22 17:26:30
**/

#include "bits/stdc++.h" 
using namespace std; 
typedef long long ll;

int main() {
    int n;cin >> n;
    vector<int> a(n),b(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
        cin >> b[i];
        b[i] = a[i] ^ b[i];
    }
    int cnt = 0;
    b.push_back(0);
    for (int i = 0; i < n; i++) {
        if (b[i] == 1 & b[i + 1] == 0) cnt++;
    }
    cout << cnt << endl;
    return 0;
}
0