結果

問題 No.1183 コイン遊び
ユーザー kotatsugamekotatsugame
提出日時 2020-08-22 15:09:50
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 316 ms / 2,000 ms
コード長 282 bytes
コンパイル時間 569 ms
コンパイル使用メモリ 63,988 KB
実行使用メモリ 7,680 KB
最終ジャッジ日時 2024-04-23 09:32:53
合計ジャッジ時間 9,325 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 21 ms
5,376 KB
testcase_12 AC 193 ms
6,016 KB
testcase_13 AC 176 ms
5,632 KB
testcase_14 AC 291 ms
7,108 KB
testcase_15 AC 309 ms
7,488 KB
testcase_16 AC 311 ms
7,584 KB
testcase_17 AC 310 ms
7,556 KB
testcase_18 AC 309 ms
7,424 KB
testcase_19 AC 309 ms
7,504 KB
testcase_20 AC 310 ms
7,324 KB
testcase_21 AC 297 ms
7,424 KB
testcase_22 AC 294 ms
7,552 KB
testcase_23 AC 308 ms
7,424 KB
testcase_24 AC 316 ms
7,420 KB
testcase_25 AC 311 ms
7,680 KB
testcase_26 AC 311 ms
7,376 KB
testcase_27 AC 310 ms
7,424 KB
testcase_28 AC 313 ms
7,584 KB
testcase_29 AC 293 ms
7,324 KB
testcase_30 AC 306 ms
7,464 KB
testcase_31 AC 310 ms
7,544 KB
testcase_32 AC 311 ms
7,680 KB
testcase_33 AC 310 ms
7,544 KB
testcase_34 AC 310 ms
7,448 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
int N,A[1<<20];
main()
{
	cin>>N;
	for(int i=0;i<N;i++)cin>>A[i];
	for(int i=0;i<N;i++)
	{
		int B;cin>>B;
		A[i]^=B;
	}
	int ans=0;
	for(int i=0;i<N;i++)
	{
		if(A[i])
		{
			while(i<N&&A[i])i++;
			i--;
			ans++;
		}
	}
	cout<<ans<<endl;
}
0