結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2014-11-16 19:04:09 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| + 288µs | |
| コード長 | 273 bytes |
| 記録 | |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 61,824 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-15 21:23:37 |
| 合計ジャッジ時間 | 1,425 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <map>
#include <cstdio>
int main(){
std::map<int,int>se;
int i=0,n,x,c=0,r=0;
for(scanf("%d",&n);i<3*n;i++)scanf("%d",&x),se[x]++;
for(std::map<int,int>::iterator it=se.begin();it!=se.end();++it)r+=it->second/2,c+=it->second%2;
printf("%d\n",r+c/4);
}