結果

問題 No.1183 コイン遊び
ユーザー shiomusubi496shiomusubi496
提出日時 2020-08-22 17:05:26
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 321 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 1,820 ms
コンパイル使用メモリ 165,188 KB
実行使用メモリ 19,052 KB
最終ジャッジ日時 2024-04-23 11:07:03
合計ジャッジ時間 10,676 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 2 ms
6,816 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 8 ms
6,948 KB
testcase_11 AC 21 ms
6,940 KB
testcase_12 AC 196 ms
12,988 KB
testcase_13 AC 176 ms
11,904 KB
testcase_14 AC 293 ms
17,852 KB
testcase_15 AC 317 ms
18,816 KB
testcase_16 AC 315 ms
18,988 KB
testcase_17 AC 315 ms
18,900 KB
testcase_18 AC 311 ms
18,840 KB
testcase_19 AC 314 ms
18,976 KB
testcase_20 AC 314 ms
19,016 KB
testcase_21 AC 300 ms
18,816 KB
testcase_22 AC 299 ms
18,824 KB
testcase_23 AC 321 ms
18,900 KB
testcase_24 AC 310 ms
18,840 KB
testcase_25 AC 313 ms
18,816 KB
testcase_26 AC 313 ms
18,816 KB
testcase_27 AC 315 ms
18,816 KB
testcase_28 AC 311 ms
18,812 KB
testcase_29 AC 297 ms
18,836 KB
testcase_30 AC 303 ms
18,908 KB
testcase_31 AC 319 ms
19,052 KB
testcase_32 AC 313 ms
18,980 KB
testcase_33 AC 313 ms
18,888 KB
testcase_34 AC 313 ms
18,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
  int N;
  cin>>N;
  vector<int> A(N),B(N);
  for(int &i:A)cin>>i;
  for(int &i:B)cin>>i;
  int n=0,ans=0;
  for(int i=0;i<N;i++){
    if(n==0 && A[i]!=B[i])ans++;
    n=(A[i]+B[i])%2;
  }
  cout<<ans<<endl;
}
0