結果
| 問題 | No.1183 コイン遊び |
| コンテスト | |
| ユーザー |
aspi
|
| 提出日時 | 2020-08-17 00:34:58 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 201 ms / 2,000 ms |
| + 77µs | |
| コード長 | 524 bytes |
| 記録 | |
| コンパイル時間 | 332 ms |
| コンパイル使用メモリ | 83,968 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-13 22:25:47 |
| 合計ジャッジ時間 | 8,369 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int N,ans=0,count=0;
cin>>N;
bool A[1000004],B[1000004];//配列A,B
for(int i=0; i<N; i++){
cin>>A[i];
}
for(int i=0; i<N; i++){
cin>>B[i];
}
for(int i=0; i<N; i++){
if(A[i]^B[i]){//A[i]!=B[i]でもOK
count++;
}
else if(count>0){
ans++;
count=0;
}
}
if(count>0){
ans++;
}
cout<<ans<<endl;
}
aspi