結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2022-11-08 18:57:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 509 bytes |
コンパイル時間 | 2,333 ms |
コンパイル使用メモリ | 159,328 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-22 03:02:57 |
合計ジャッジ時間 | 2,957 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <ios> #include <iomanip> #include <iostream> #include <string> #include <algorithm> int main(){ int a; int count3=0; int count2=0; cin >>a; a *=3; vector<int> vec(a); for(int i=0;i<a;i++){ cin >> vec.at(i); } for(int k=0;k<11;k++){ int count1=0; for(int i=0;i<a;i++){ if(k==vec.at(i)){ count1 ++; } } count2=count2+count1 /2; count3=count3+count1 %2; } cout << count2+count3/4; }