結果
問題 |
No.1183 コイン遊び
|
ユーザー |
![]() |
提出日時 | 2020-08-22 13:12:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 312 ms / 2,000 ms |
コード長 | 462 bytes |
コンパイル時間 | 1,642 ms |
コンパイル使用メモリ | 168,624 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-10-15 07:22:32 |
合計ジャッジ時間 | 10,108 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n), b(n); for(int &c : a) { cin >> c; } for(int &c : b) { cin >> c; } int count = 0; for(int i = 0; i < n; i++) { if(a.at(i) != b.at(i)) { count++; while(i < n && (a.at(i) != b.at(i))) { i++; } i--; } } cout << count << endl; }