結果

問題 No.1183 コイン遊び
ユーザー ぷらぷら
提出日時 2020-08-22 13:13:26
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 636 bytes
コンパイル時間 1,707 ms
コンパイル使用メモリ 163,744 KB
実行使用メモリ 19,072 KB
最終ジャッジ日時 2024-04-23 07:34:52
合計ジャッジ時間 10,573 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
5,376 KB
testcase_04 WA -
testcase_05 WA -
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 3 ms
5,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 202 ms
12,928 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 320 ms
18,816 KB
testcase_16 AC 318 ms
18,944 KB
testcase_17 AC 324 ms
18,908 KB
testcase_18 AC 322 ms
18,944 KB
testcase_19 AC 323 ms
18,832 KB
testcase_20 AC 323 ms
19,004 KB
testcase_21 AC 297 ms
18,896 KB
testcase_22 AC 302 ms
18,836 KB
testcase_23 WA -
testcase_24 AC 322 ms
18,972 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 294 ms
18,944 KB
testcase_30 WA -
testcase_31 AC 320 ms
18,832 KB
testcase_32 AC 319 ms
18,944 KB
testcase_33 WA -
testcase_34 AC 322 ms
18,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
int INF = 1e16+7;
int mod = 1e9+7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
    int N;
    cin >> N;
    vector<int>A(N),B(N);
    for(int i = 0; i < N; i++) {
        cin >> A[i];
    }
    int ans = 0;
    bool ok = false;
    for(int i = 0; i < N; i++) {
        cin >> B[i];
        if(A[i] != B[i] && ok == false) {
            ans++;
            ok = true;
        }
        if(A[i] == B[i] && ok == true) {
            ok = false;
        }
    }
    if(ok) {
        ans++;
    }
    cout << ans << endl;
}
0