結果

問題 No.1183 コイン遊び
ユーザー ateate
提出日時 2020-08-22 13:05:01
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 283 ms / 2,000 ms
コード長 378 bytes
コンパイル時間 2,211 ms
コンパイル使用メモリ 199,420 KB
実行使用メモリ 23,032 KB
最終ジャッジ日時 2024-04-23 07:20:30
合計ジャッジ時間 10,286 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 1 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,940 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 7 ms
6,940 KB
testcase_11 AC 19 ms
6,940 KB
testcase_12 AC 178 ms
15,500 KB
testcase_13 AC 160 ms
14,256 KB
testcase_14 AC 262 ms
21,504 KB
testcase_15 AC 277 ms
22,816 KB
testcase_16 AC 281 ms
22,736 KB
testcase_17 AC 278 ms
22,696 KB
testcase_18 AC 278 ms
22,932 KB
testcase_19 AC 281 ms
22,692 KB
testcase_20 AC 278 ms
23,032 KB
testcase_21 AC 263 ms
22,732 KB
testcase_22 AC 267 ms
22,788 KB
testcase_23 AC 282 ms
22,728 KB
testcase_24 AC 275 ms
22,780 KB
testcase_25 AC 282 ms
22,796 KB
testcase_26 AC 283 ms
22,820 KB
testcase_27 AC 282 ms
22,728 KB
testcase_28 AC 283 ms
22,832 KB
testcase_29 AC 280 ms
22,904 KB
testcase_30 AC 272 ms
22,828 KB
testcase_31 AC 280 ms
22,696 KB
testcase_32 AC 277 ms
22,824 KB
testcase_33 AC 283 ms
22,876 KB
testcase_34 AC 276 ms
22,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

using ll = int_fast64_t;
#define rep(i,n) for(int i=0;i<(n);++i)

signed main(){

  int n;
  cin>>n;
  vector<ll> a(n),b(n);
  rep(i,n)cin>>a[i];
  rep(i,n)cin>>b[i];

  vector<int> t(n);
  rep(i,n)t[i]=(a[i]==b[i]);

  t.erase(unique(begin(t),end(t)),end(t));

  int ans = 0;
  for(auto ti:t)if(ti==0)ans++;
  cout<<(ans)<<endl;

}
0