結果
| 問題 |
No.1183 コイン遊び
|
| コンテスト | |
| ユーザー |
koutykkk
|
| 提出日時 | 2020-08-22 13:57:37 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 308 ms / 2,000 ms |
| コード長 | 873 bytes |
| コンパイル時間 | 1,526 ms |
| コンパイル使用メモリ | 169,348 KB |
| 実行使用メモリ | 18,936 KB |
| 最終ジャッジ日時 | 2024-10-15 08:14:44 |
| 合計ジャッジ時間 | 9,918 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define all(x) x.begin(),x.end()
#define rep(i,j,n) for (long long i = j; i < (long long)(n); i++)
#define _GLIBCXX_DEBUG
const ll MOD = 1000000007;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//(a+b-1)/b
//priority_queue<ll, vector<ll>, greater<ll>> q;
signed main(){
//cout << fixed << setprecision(10);
ll n; cin >> n;
vl a(n),b(n);
rep(i,0,n)cin >>a[i];
rep(i,0,n)cin >> b[i];
ll ans = 0, cnt = 0;
rep(i,0,n){
if(a[i] != b[i])cnt++;
else{
ans += (cnt != 0);
cnt = 0;
}
}
ans += (cnt != 0);
cout << ans << endl;
return 0;
}
koutykkk