結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2016-05-09 15:39:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 379 bytes |
コンパイル時間 | 475 ms |
コンパイル使用メモリ | 64,052 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 00:31:42 |
合計ジャッジ時間 | 1,447 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include<iostream> using namespace std; int nlist[10]; int level; int main(){ int N; cin>>N; for(int i=0;i<N;i++){ int a,b,c; cin>>a>>b>>c; nlist[a-1]++; nlist[b-1]++; nlist[c-1]++; } int temp=0; for(int i=0;i<10;i++){ if(nlist[i] >= 2){ level += nlist[i]/2; } temp += nlist[i]%2; } cout<<level+temp/4<<endl; return 0; }