結果

問題 No.1183 コイン遊び
ユーザー Osmium_1008Osmium_1008
提出日時 2020-08-22 13:04:29
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 1,076 bytes
コンパイル時間 5,935 ms
コンパイル使用メモリ 399,292 KB
実行使用メモリ 18,948 KB
最終ジャッジ日時 2023-08-05 09:43:37
合計ジャッジ時間 9,756 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,356 KB
testcase_01 AC 1 ms
4,356 KB
testcase_02 AC 1 ms
4,360 KB
testcase_03 AC 1 ms
4,352 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 1 ms
4,356 KB
testcase_06 AC 1 ms
4,352 KB
testcase_07 AC 1 ms
4,356 KB
testcase_08 AC 2 ms
4,356 KB
testcase_09 AC 2 ms
4,352 KB
testcase_10 AC 4 ms
4,356 KB
testcase_11 AC 10 ms
4,352 KB
testcase_12 AC 80 ms
12,952 KB
testcase_13 AC 71 ms
11,692 KB
testcase_14 AC 120 ms
17,752 KB
testcase_15 AC 129 ms
18,492 KB
testcase_16 AC 129 ms
18,784 KB
testcase_17 AC 129 ms
18,684 KB
testcase_18 AC 128 ms
18,736 KB
testcase_19 AC 130 ms
18,780 KB
testcase_20 AC 128 ms
18,760 KB
testcase_21 AC 116 ms
18,768 KB
testcase_22 AC 112 ms
18,672 KB
testcase_23 AC 112 ms
18,948 KB
testcase_24 AC 113 ms
18,840 KB
testcase_25 AC 128 ms
18,788 KB
testcase_26 AC 130 ms
18,828 KB
testcase_27 AC 128 ms
18,872 KB
testcase_28 AC 127 ms
18,780 KB
testcase_29 AC 116 ms
18,692 KB
testcase_30 AC 112 ms
18,832 KB
testcase_31 AC 127 ms
18,940 KB
testcase_32 AC 129 ms
18,808 KB
testcase_33 AC 128 ms
18,672 KB
testcase_34 AC 130 ms
18,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>

#define int long long

#define override_rep(i, l, r, mes, ...) mes
#define rep1(i, n) for (int i = 0; i < n; i++)
#define rep2(i, l, r) for (int i = l; i < r; i++)
#define rep(...) override_rep(__VA_ARGS__, rep2, rep1)(__VA_ARGS__)

using namespace std;
using P = pair<int, int>;
using ll = long long;
using ld = double;

using bint = boost::multiprecision::cpp_int;

constexpr int MOD = 1e9 + 7;

template<typename T, typename U>
istream& operator>>(istream& in, pair<T, U>& p) {
    in >> p.first >> p.second;
    return in;
}

// https://twitter.com/vane11ope ←フォローしましょう
// (ノ)>◡<(ヾ)モチモチ
signed main(signed argc, char* argv[]) {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int n;
    cin>>n;
    vector<int> a(n),b(n);
    rep(i,n)cin>>a[i];
    rep(i,n)cin>>b[i];
    bool bo=true;
    int ans=0;
    rep(i,n){
        if(bo && a[i]!=b[i]){
            bo=false;
            ans++;
        }
        if(a[i]==b[i])bo=true;
    }
    cout<<ans<<endl;
}
0