結果

問題 No.1183 コイン遊び
ユーザー karinohitokarinohito
提出日時 2022-11-09 16:06:28
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 286 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 2,069 ms
コンパイル使用メモリ 199,892 KB
実行使用メモリ 7,160 KB
最終ジャッジ日時 2023-09-30 04:05:24
合計ジャッジ時間 14,027 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 7 ms
4,380 KB
testcase_11 AC 18 ms
4,376 KB
testcase_12 AC 174 ms
5,296 KB
testcase_13 AC 156 ms
5,140 KB
testcase_14 AC 261 ms
6,808 KB
testcase_15 AC 279 ms
7,004 KB
testcase_16 AC 278 ms
6,988 KB
testcase_17 AC 279 ms
6,876 KB
testcase_18 AC 280 ms
6,884 KB
testcase_19 AC 278 ms
6,880 KB
testcase_20 AC 279 ms
6,932 KB
testcase_21 AC 267 ms
6,880 KB
testcase_22 AC 269 ms
6,940 KB
testcase_23 AC 286 ms
6,880 KB
testcase_24 AC 285 ms
6,880 KB
testcase_25 AC 280 ms
7,160 KB
testcase_26 AC 280 ms
7,060 KB
testcase_27 AC 281 ms
6,888 KB
testcase_28 AC 282 ms
6,932 KB
testcase_29 AC 267 ms
6,940 KB
testcase_30 AC 275 ms
6,888 KB
testcase_31 AC 278 ms
6,936 KB
testcase_32 AC 279 ms
6,880 KB
testcase_33 AC 279 ms
7,008 KB
testcase_34 AC 279 ms
6,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ld = long double;
int main() {
    int N;
    cin>>N;
    vector<int> A(N+2,0);
    for(int i=0;i<2;i++)for(int j=1;j<=N;j++){
        int p;
        cin>>p;
        A[j]=A[j]^p;
    }
    int an=0;
    for(int j=0;j<=N;j++)an+=(A[j]^A[j+1]);
    cout<<an/2<<endl;
}
0