結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
cww
|
| 提出日時 | 2016-09-16 12:45:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 491 bytes |
| 記録 | |
| コンパイル時間 | 1,307 ms |
| コンパイル使用メモリ | 166,012 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 20:58:53 |
| 合計ジャッジ時間 | 2,142 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<(n); i++)
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int main()
{
int N;
cin >> N;
vector<int> vc( N*3 );
for( auto& x : vc )
{
cin >> x;
}
sort( vc.begin(), vc.end() );
int count{}, tmp{};
REP( i, N*3 )
{
if( vc[i] == vc[i+1] )
{
count++;
i += 1;
}
else
{
tmp++;
if( tmp == 4 )
{
count++;
tmp = 0;
}
}
}
cout << count << endl;
return 0;
}
cww