結果
| 問題 | No.1183 コイン遊び |
| コンテスト | |
| ユーザー |
IKyopro
|
| 提出日時 | 2020-08-22 13:20:59 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 79 ms / 2,000 ms |
| コード長 | 576 bytes |
| 記録 | |
| コンパイル時間 | 1,429 ms |
| コンパイル使用メモリ | 210,760 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2026-06-12 16:02:04 |
| 合計ジャッジ時間 | 5,373 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T> using vec = vector<T>;
template <class T> using vvec = vector<vec<T>>;
template <class T> using vvvec = vector<vvec<T>>;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
vec<int> A(N),B(N);
for(auto& x:A) cin >> x;
for(auto& x:B) cin >> x;
int ans = 0;
for(int l=0;l<N;l++){
if(A[l]==B[l]) continue;
int r = l+1;
while(r<N && A[r]!=B[r]) r++;
ans++;
l = r-1;
}
cout << ans << "\n";
}
IKyopro