結果
| 問題 |
No.1183 コイン遊び
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-22 15:09:50 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 320 ms / 2,000 ms |
| コード長 | 282 bytes |
| コンパイル時間 | 532 ms |
| コンパイル使用メモリ | 64,884 KB |
| 実行使用メモリ | 7,532 KB |
| 最終ジャッジ日時 | 2024-10-15 09:27:04 |
| 合計ジャッジ時間 | 9,259 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main()
| ^~~~
ソースコード
#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;
}