結果
| 問題 |
No.182 新規性の虜
|
| コンテスト | |
| ユーザー |
NEEHATOV
|
| 提出日時 | 2020-06-08 22:06:50 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 464 bytes |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 29,568 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 13:31:09 |
| 合計ジャッジ時間 | 12,373 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 13 |
ソースコード
#include <stdio.h>
int main() {
int N,A[100000], i,j,cnt=0;
scanf("%d", &N);
cnt = N;
for (i = 0; i < N; i++) {
scanf("%d", &A[i]);
for (j = 0; j < i; j++) {
if (i != j && A[i] == A[j]) {
cnt--;
if (((j == 0 && i == 1) || (i == N-1))&& cnt > 0 ){
cnt--;
}
break;
}
}
}
printf("%d\n", cnt);
return 0;
}
NEEHATOV