結果
問題 | No.1183 コイン遊び |
ユーザー |
![]() |
提出日時 | 2020-08-22 13:05:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 390 ms / 2,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 2,198 ms |
コンパイル使用メモリ | 196,212 KB |
最終ジャッジ日時 | 2025-01-13 07:05:38 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
#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; }