結果

問題 No.1183 コイン遊び
ユーザー aiueoaiueo
提出日時 2021-01-09 12:27:02
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 318 ms / 2,000 ms
コード長 876 bytes
コンパイル時間 2,105 ms
コンパイル使用メモリ 202,612 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-04-28 19:51:55
合計ジャッジ時間 10,839 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 8 ms
5,376 KB
testcase_11 AC 20 ms
5,376 KB
testcase_12 AC 196 ms
8,192 KB
testcase_13 AC 175 ms
7,552 KB
testcase_14 AC 295 ms
10,496 KB
testcase_15 AC 317 ms
11,100 KB
testcase_16 AC 314 ms
11,008 KB
testcase_17 AC 316 ms
11,008 KB
testcase_18 AC 313 ms
11,068 KB
testcase_19 AC 312 ms
11,136 KB
testcase_20 AC 312 ms
11,008 KB
testcase_21 AC 300 ms
11,076 KB
testcase_22 AC 301 ms
11,008 KB
testcase_23 AC 310 ms
10,976 KB
testcase_24 AC 311 ms
11,008 KB
testcase_25 AC 316 ms
11,008 KB
testcase_26 AC 314 ms
11,008 KB
testcase_27 AC 318 ms
11,008 KB
testcase_28 AC 314 ms
11,108 KB
testcase_29 AC 299 ms
10,968 KB
testcase_30 AC 308 ms
11,008 KB
testcase_31 AC 316 ms
11,136 KB
testcase_32 AC 313 ms
11,004 KB
testcase_33 AC 314 ms
10,980 KB
testcase_34 AC 313 ms
11,008 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+1),b(n+1);
    rep(i,n)cin>>a[i];
    rep(i,n)cin>>b[i];
    int ans=0;
    rep(i,n){
        if(a[i]!=b[i]&&a[i+1]==b[i+1])ans++;
    }
    cout<<ans<<endl;
}
0