結果
| 問題 |
No.1183 コイン遊び
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-22 16:19:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 311 ms / 2,000 ms |
| コード長 | 544 bytes |
| コンパイル時間 | 1,504 ms |
| コンパイル使用メモリ | 168,148 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-10-15 10:23:40 |
| 合計ジャッジ時間 | 10,007 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int>a(n);
vector<int>b(n);
for(int i=0;i<n;i++)
cin >> a.at(i);
for(int i=0;i<n;i++)
cin >> b.at(i);
int ans=0;
bool che=false;
for(int i=0;i<n;i++){
if(che){
if(a.at(i)==b.at(i)){
che=false;
}
}else{
if(a.at(i)!=b.at(i)){
ans++;
che=true;
}
}
}
cout << ans << endl;
return 0;
}