結果
| 問題 |
No.1183 コイン遊び
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2020-08-22 13:06:54 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 497 ms / 2,000 ms |
| コード長 | 478 bytes |
| コンパイル時間 | 4,337 ms |
| コンパイル使用メモリ | 193,304 KB |
| 最終ジャッジ日時 | 2025-01-13 07:08:58 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
vector<int> A(n),B(n);
rep(i,n) cin>>A[i];
rep(i,n) cin>>B[i];
bool b=true;
int cnt=0;
rep(i,n){
if(b==true && A[i]!=B[i]) b=false;
else if(b==false && A[i]==B[i]){
b=true;
cnt++;
}
}
if(b==false) cnt++;
cout<<cnt<<endl;
return 0;
}
umezo