結果

問題 No.1183 コイン遊び
ユーザー glretoglreto
提出日時 2021-03-09 16:29:03
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 954 bytes
コンパイル時間 995 ms
コンパイル使用メモリ 96,628 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-04-19 20:16:45
合計ジャッジ時間 9,000 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 WA -
testcase_05 AC 1 ms
5,376 KB
testcase_06 WA -
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 7 ms
5,376 KB
testcase_11 AC 19 ms
5,376 KB
testcase_12 WA -
testcase_13 AC 161 ms
7,680 KB
testcase_14 WA -
testcase_15 AC 297 ms
11,136 KB
testcase_16 AC 294 ms
11,084 KB
testcase_17 AC 293 ms
11,008 KB
testcase_18 WA -
testcase_19 AC 294 ms
11,008 KB
testcase_20 WA -
testcase_21 AC 271 ms
11,000 KB
testcase_22 AC 275 ms
11,008 KB
testcase_23 AC 285 ms
11,084 KB
testcase_24 AC 292 ms
11,136 KB
testcase_25 AC 293 ms
11,264 KB
testcase_26 WA -
testcase_27 AC 301 ms
10,996 KB
testcase_28 AC 296 ms
11,008 KB
testcase_29 AC 272 ms
11,136 KB
testcase_30 AC 286 ms
11,012 KB
testcase_31 AC 292 ms
11,008 KB
testcase_32 AC 289 ms
11,008 KB
testcase_33 AC 295 ms
11,008 KB
testcase_34 AC 292 ms
10,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include<iomanip>
#include<functional>
#include<algorithm>
#include<deque>
#include<math.h>
#include<set>
#include<string>
#include<queue>
#include<complex>
#include<numeric>
#include<stack>
#include<map>
using namespace std;
#define rep(i,n) for(ll i = 0;i<n;i++)
#define req(i,n) for(ll i = 1;i<=n;i++)
#define rrep(i,n) for(int i = n-1;i>=0;i--)
#define ALL(a) a.begin(),a.end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
typedef long long ll;
typedef long double ld;
int main() {
    int n; cin >> n; vector<int> a(n), b(n);
    rep(i, n) cin >> a[i];
    int cnt = 0, ans = 0;
    rep(i, n) {
        cin >> b[i];
        if (i != 0 && a[i] != b[i]) {
            if (cnt == 0) ans++, cnt = 1;
        }if (cnt > 0 && a[i] == b[i]) cnt = 0;
    }cout << ans << endl;
}
0