結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
HAHAHA
|
| 提出日時 | 2014-11-02 17:51:10 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 595 bytes |
| 記録 | |
| コンパイル時間 | 485 ms |
| コンパイル使用メモリ | 71,752 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 20:50:21 |
| 合計ジャッジ時間 | 1,310 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<sstream>
#include<algorithm>
using namespace std;
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define rep(i,n) for(int i=0;i<n;i++)
#define rev(j,m) for(int j=1;j<m;j++)
typedef vector<pair<int,int> > pii;
int main(){
int n,x,A[10]={0},sum=0,ans=0;
cin >> n;
rep(i,n){
rep(j,3){
cin >> x;
A[x-1]++;
}
}
rep(i,10){
ans+=A[i]/2;
A[i]%=2;
sum+=A[i];
}
cout << ans+sum/4 << endl;
return 0;
}
HAHAHA