結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2022-08-15 16:04:28 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 694 bytes |
コンパイル時間 | 3,123 ms |
コンパイル使用メモリ | 244,224 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-02 05:00:23 |
合計ジャッジ時間 | 4,098 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
外部呼び出し有り |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h>#define ll long long#define ld long double#define rep(i,a,b) for (int i = a; i < b; i++)#define irep(i,a,b) for (int i = a; i > b; i--)#define print(n) cout << n << endl#define rup(a,b) (a+b-1)/busing namespace std;int d[11];int main(){cout << fixed << setprecision(15);int N;cin >> N;int a,b,c;rep(i,0,N) {cin>>a>>b>>c;d[a] += 1;d[b] += 1;d[c] += 1;}int count = 0;int now = 0;int p;rep(i,1,11){p = (int)(d[i] / 2);count += p;d[i] %= 2;now += d[i];}count += now/4;print(count);system("pause");return 0;}