結果
| 問題 |
No.182 新規性の虜
|
| コンテスト | |
| ユーザー |
ninhydrin_
|
| 提出日時 | 2015-04-20 10:23:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 351 bytes |
| コンパイル時間 | 473 ms |
| コンパイル使用メモリ | 30,208 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 19:07:10 |
| 合計ジャッジ時間 | 1,769 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 27 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%d",&N);
| ~~~~~^~~~~~~~~
main.cpp:16:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
16 | scanf("%d",&a);
| ~~~~~^~~~~~~~~
ソースコード
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
int map[1000000001];
int main(){
int N;
scanf("%d",&N);
int i;
int a;
int max=N;
for (i = 0; i < N; ++i){
scanf("%d",&a);
if(map[a]==1){max-=2;map[a]=2;}
else if(map[a]==2)max--;
else{map[a]=1;}
}
printf("%d\n",max);
return 0;
}
ninhydrin_