結果
問題 | No.2851 Make Pairs |
ユーザー | nekoti |
提出日時 | 2024-08-25 13:45:02 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 23 ms / 2,000 ms |
コード長 | 471 bytes |
コンパイル時間 | 336 ms |
コンパイル使用メモリ | 29,952 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-25 13:45:03 |
合計ジャッジ時間 | 831 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,816 KB |
testcase_01 | AC | 1 ms
6,944 KB |
testcase_02 | AC | 21 ms
6,944 KB |
testcase_03 | AC | 22 ms
6,940 KB |
testcase_04 | AC | 23 ms
6,944 KB |
testcase_05 | AC | 23 ms
6,944 KB |
testcase_06 | AC | 23 ms
6,944 KB |
testcase_07 | AC | 1 ms
6,940 KB |
ソースコード
#define _DEBUG 0 #if _DEBUG #endif #include<stdio.h> #include<stdbool.h> #include<string.h> #include<stdlib.h> //memset(aaa, 0, sizeof(aaa)); int main(void) { int scan;//scanf警告用 int ans=0; int i, j; int count[200010]; memset(count,0,sizeof(count)); int n;scan=scanf("%d",&n); int a; for(i=0; i<n; i++) { scan=scanf("%d",&a); count[a-1]++; } for(i=0; i<200010; i++) { ans+=(count[i])/2; } printf("%d", ans); return 0; }