結果
問題 |
No.29 パワーアップ
|
ユーザー |
👑 |
提出日時 | 2020-01-21 01:30:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 363 bytes |
コンパイル時間 | 578 ms |
コンパイル使用メモリ | 64,412 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 23:32:54 |
合計ジャッジ時間 | 1,396 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <iostream> using namespace std; int nm[10]; int main(){ int n;cin>>n; for(int i = 0; n > i; i++){ for(int j = 0; 3 > j; j++){ int t;cin>>t; nm[--t]++; } } int ans = 0; int s = 0; for(int i = 0; 10 > i; i++){ ans += nm[i]/2; s += nm[i]%2; } cout << ans+s/4 << endl; }