結果
問題 | No.2851 Make Pairs |
ユーザー |
![]() |
提出日時 | 2024-08-25 13:45:02 |
言語 | C (gcc 13.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 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 |
ソースコード
#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;}