結果

問題 No.1183 コイン遊び
ユーザー okkuukenkenokkuukenken
提出日時 2022-07-19 15:54:47
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 289 ms / 2,000 ms
コード長 550 bytes
コンパイル時間 1,332 ms
コンパイル使用メモリ 128,404 KB
実行使用メモリ 11,344 KB
最終ジャッジ日時 2023-09-14 11:30:17
合計ジャッジ時間 10,380 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,372 KB
testcase_01 AC 2 ms
5,368 KB
testcase_02 AC 3 ms
5,376 KB
testcase_03 AC 2 ms
5,296 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,420 KB
testcase_06 AC 2 ms
5,304 KB
testcase_07 AC 2 ms
5,300 KB
testcase_08 AC 2 ms
5,468 KB
testcase_09 AC 2 ms
5,380 KB
testcase_10 AC 8 ms
5,596 KB
testcase_11 AC 19 ms
7,656 KB
testcase_12 AC 180 ms
9,660 KB
testcase_13 AC 158 ms
9,460 KB
testcase_14 AC 262 ms
10,892 KB
testcase_15 AC 280 ms
11,240 KB
testcase_16 AC 282 ms
11,140 KB
testcase_17 AC 280 ms
11,180 KB
testcase_18 AC 283 ms
11,132 KB
testcase_19 AC 281 ms
11,304 KB
testcase_20 AC 279 ms
11,192 KB
testcase_21 AC 266 ms
11,140 KB
testcase_22 AC 268 ms
11,060 KB
testcase_23 AC 279 ms
11,064 KB
testcase_24 AC 281 ms
11,088 KB
testcase_25 AC 284 ms
11,304 KB
testcase_26 AC 281 ms
11,080 KB
testcase_27 AC 281 ms
11,140 KB
testcase_28 AC 289 ms
11,152 KB
testcase_29 AC 265 ms
11,344 KB
testcase_30 AC 276 ms
11,136 KB
testcase_31 AC 283 ms
11,136 KB
testcase_32 AC 284 ms
11,304 KB
testcase_33 AC 282 ms
11,136 KB
testcase_34 AC 285 ms
11,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<iomanip>
#include<numeric>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<random>
using namespace std;
typedef long long ll;
const int mod=998244353;
int main(){
	static int n,a[1000001],b[1000001];
	cin>>n;
	a[n]=b[n]=0;
	for(int i=0;i<n;i++)
		cin>>a[i];
	for(int i=0;i<n;i++)
		cin>>b[i];
	int ans=0;
	for(int i=0;i<n;i++)
		if(a[i]!=b[i]&&a[i+1]==b[i+1])
			ans++;
	cout<<ans<<endl;
}
0