結果

問題 No.1183 コイン遊び
ユーザー aiueoaiueo
提出日時 2021-01-09 12:16:37
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 915 bytes
コンパイル時間 2,009 ms
コンパイル使用メモリ 201,992 KB
実行使用メモリ 11,172 KB
最終ジャッジ日時 2024-04-28 19:43:14
合計ジャッジ時間 10,937 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 WA -
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 8 ms
6,944 KB
testcase_11 AC 21 ms
6,940 KB
testcase_12 AC 197 ms
8,140 KB
testcase_13 AC 176 ms
7,552 KB
testcase_14 AC 295 ms
10,592 KB
testcase_15 AC 316 ms
10,988 KB
testcase_16 AC 314 ms
11,112 KB
testcase_17 AC 313 ms
11,112 KB
testcase_18 AC 314 ms
11,000 KB
testcase_19 AC 313 ms
11,172 KB
testcase_20 AC 313 ms
10,980 KB
testcase_21 AC 297 ms
11,008 KB
testcase_22 AC 297 ms
11,008 KB
testcase_23 AC 310 ms
11,076 KB
testcase_24 AC 309 ms
10,972 KB
testcase_25 AC 313 ms
11,096 KB
testcase_26 AC 313 ms
11,108 KB
testcase_27 AC 317 ms
10,968 KB
testcase_28 AC 312 ms
11,020 KB
testcase_29 AC 296 ms
10,964 KB
testcase_30 AC 304 ms
11,004 KB
testcase_31 AC 314 ms
11,080 KB
testcase_32 AC 313 ms
11,076 KB
testcase_33 AC 313 ms
11,124 KB
testcase_34 AC 312 ms
11,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define all(v) begin(v),end(v)
#define fi first
#define se second
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
constexpr ll inf = 2e9;
constexpr ll llinf = 9e18;
//constexpr ll MOD = 998244353;
constexpr ll MOD = 1000000007;
const double pai=acos(-1);

int main() {
    //cout<<fixed<<setprecision(15);
    int n;cin>>n;
    vector<int> a(n),b(n);
    rep(i,n)cin>>a[i];
    rep(i,n)cin>>b[i];
    int ans=0;
    rep(i,n-1){
        if(a[i]!=b[i]&&a[i+1]==b[i+1])ans++;
        if(i==n-2&&a[i+1]!=b[i+1])ans++;
    }
    cout<<ans<<endl;
}
0