結果
問題 | No.29 パワーアップ |
ユーザー |
|
提出日時 | 2024-03-27 03:51:18 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 703 bytes |
コンパイル時間 | 2,076 ms |
コンパイル使用メモリ | 195,900 KB |
最終ジャッジ日時 | 2025-02-20 13:58:44 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> v; int d[11]; int point = 0; int sum = 0; for (int i = 0; i < 11; i++) { d[i] = 0; } for (int i = 0; i < n; i++) { int a, b, c; cin >>a>> b >> c; v.push_back(a); v.push_back(b); v.push_back(c); } for (auto &i : v) d[i]++; for (auto &i : d) { point += i / 2; i %= 2; } // cout<<point<<endl; // for(auto &i:v){ // cout<<i<<endl; // } for (auto &i : d) { sum += i; } point += sum / 4; cout << point << endl; // system("pause"); }