結果

問題 No.1183 コイン遊び
ユーザー ohreitetsuohreitetsu
提出日時 2020-08-23 21:56:23
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 289 ms / 2,000 ms
コード長 411 bytes
コンパイル時間 541 ms
コンパイル使用メモリ 68,720 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-04-23 18:35:49
合計ジャッジ時間 8,746 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 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 7 ms
5,376 KB
testcase_11 AC 18 ms
5,376 KB
testcase_12 AC 176 ms
8,064 KB
testcase_13 AC 157 ms
7,552 KB
testcase_14 AC 261 ms
10,496 KB
testcase_15 AC 289 ms
11,008 KB
testcase_16 AC 285 ms
11,136 KB
testcase_17 AC 277 ms
11,008 KB
testcase_18 AC 289 ms
11,008 KB
testcase_19 AC 280 ms
11,008 KB
testcase_20 AC 281 ms
11,008 KB
testcase_21 AC 269 ms
11,008 KB
testcase_22 AC 271 ms
11,008 KB
testcase_23 AC 288 ms
11,008 KB
testcase_24 AC 280 ms
11,008 KB
testcase_25 AC 285 ms
11,136 KB
testcase_26 AC 280 ms
11,264 KB
testcase_27 AC 285 ms
11,136 KB
testcase_28 AC 285 ms
11,264 KB
testcase_29 AC 269 ms
11,136 KB
testcase_30 AC 268 ms
11,008 KB
testcase_31 AC 279 ms
11,008 KB
testcase_32 AC 281 ms
11,008 KB
testcase_33 AC 279 ms
11,008 KB
testcase_34 AC 277 ms
11,136 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