結果

問題 No.1183 コイン遊び
ユーザー uw_yu1rabbituw_yu1rabbit
提出日時 2020-08-22 15:11:06
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 631 bytes
コンパイル時間 852 ms
コンパイル使用メモリ 78,548 KB
実行使用メモリ 18,984 KB
最終ジャッジ日時 2024-04-27 03:25:21
合計ジャッジ時間 5,250 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
純コード判定待ち
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 4 ms
6,944 KB
testcase_11 AC 9 ms
6,944 KB
testcase_12 AC 84 ms
12,804 KB
testcase_13 AC 76 ms
11,780 KB
testcase_14 AC 122 ms
17,788 KB
testcase_15 AC 133 ms
18,976 KB
testcase_16 AC 131 ms
18,916 KB
testcase_17 AC 130 ms
18,848 KB
testcase_18 AC 131 ms
18,688 KB
testcase_19 AC 130 ms
18,828 KB
testcase_20 AC 131 ms
18,688 KB
testcase_21 AC 118 ms
18,984 KB
testcase_22 AC 113 ms
18,840 KB
testcase_23 AC 115 ms
18,808 KB
testcase_24 AC 116 ms
18,820 KB
testcase_25 AC 131 ms
18,928 KB
testcase_26 AC 131 ms
18,856 KB
testcase_27 AC 129 ms
18,824 KB
testcase_28 AC 134 ms
18,924 KB
testcase_29 AC 117 ms
18,808 KB
testcase_30 AC 112 ms
18,848 KB
testcase_31 AC 130 ms
18,748 KB
testcase_32 AC 128 ms
18,852 KB
testcase_33 AC 129 ms
18,892 KB
testcase_34 AC 133 ms
18,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<vector>
using namespace std;
using i32 = int_fast32_t;
using i64 = int_fast64_t;
#define rep(i, n) for (i32 i = 0; i < (i32)(n); i++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
using P = pair<i64,i64>;

int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
i32 n;
cin >> n;
vector<i32> a(n),b(n);
rep(i,n) cin >> a[i];
rep(j,n) cin >> b[j];
i32 cnt = 0;
i32 tmp = 0;
rep(i,n){
    if(a[i] != b[i])tmp++;
    else tmp = 0;
    if(tmp == 1)cnt++;
}
cout << cnt << endl;
}
0