結果

問題 No.1183 コイン遊び
ユーザー ohreitetsuohreitetsu
提出日時 2020-08-23 21:56:23
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 292 ms / 2,000 ms
コード長 411 bytes
コンパイル時間 1,094 ms
コンパイル使用メモリ 69,084 KB
実行使用メモリ 11,112 KB
最終ジャッジ日時 2023-08-05 22:12:25
合計ジャッジ時間 10,391 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 8 ms
4,376 KB
testcase_11 AC 19 ms
4,376 KB
testcase_12 AC 178 ms
7,904 KB
testcase_13 AC 160 ms
7,232 KB
testcase_14 AC 268 ms
10,280 KB
testcase_15 AC 285 ms
10,908 KB
testcase_16 AC 285 ms
10,908 KB
testcase_17 AC 283 ms
10,808 KB
testcase_18 AC 285 ms
10,852 KB
testcase_19 AC 281 ms
11,036 KB
testcase_20 AC 282 ms
10,788 KB
testcase_21 AC 268 ms
10,948 KB
testcase_22 AC 271 ms
10,748 KB
testcase_23 AC 285 ms
10,932 KB
testcase_24 AC 285 ms
11,112 KB
testcase_25 AC 286 ms
11,084 KB
testcase_26 AC 286 ms
10,748 KB
testcase_27 AC 287 ms
10,748 KB
testcase_28 AC 287 ms
11,088 KB
testcase_29 AC 269 ms
10,908 KB
testcase_30 AC 276 ms
10,848 KB
testcase_31 AC 292 ms
11,080 KB
testcase_32 AC 291 ms
10,796 KB
testcase_33 AC 287 ms
10,848 KB
testcase_34 AC 289 ms
10,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
int main(int argc, char* argv[])
{
	int N,i;
	cin>>N;
	vector<int> A(N),B(N);
	for (i=0;i<N;i++){
		cin>>A[i];
	}
	for (i=0;i<N;i++){
		cin>>B[i];
	}
	int ans=0;
	for (i=0;i<N;i++){
		if (A[i]==B[i]){
			continue;
		}
		ans++;
		int j;
		for (j=i+1;j<N;j++){
			if (A[j]!=B[j]){
				continue;
			}
			break;
		}
		i=j;
	}
	cout<<ans<<endl;
	return 0;
}
0