HDU 5463 Clarke and minecraft
2015-09-20 10:37
375 查看
#include <iostream> #include <cstdio> #include <cstring> #include <vector> using namespace std; struct node { int t,n; }nn; int T,N,ans; vector<node> V; int main() { scanf("%d",&T); while(T--) { V.clear();ans=0; scanf("%d",&N); while(N--) { scanf("%d%d",&nn.t,&nn.n); bool f=false; for(int i=0;i<V.size();i++) { if(V[i].t==nn.t) { f=true; V[i].n+=nn.n; break; } } if(!f) { V.push_back(nn); } } //cout<<V.size()<<"\n"; //cout<<V[0].t<<" "<<V[0].n<<"\n"; for(int i=0;i<V.size();i++) { ans+=V[i].n/64; if(V[i].n%64) ans++; } if(ans%36) ans=ans/36+1; else ans=ans/36; printf("%d\n",ans); } }
相关文章推荐
- HDU 1568
- HDU1290
- HDU1568(Fobonacci公式)
- HDU ACM Step 2.2.2 Joseph(约瑟夫环问题)
- HDU 1405
- HDU 1297
- hdu 1205
- hdu 2087
- hdu 1016
- HDU 4898 The Revenge of the Princess’ Knight ( 2014 Multi-University Training Contest 4 )
- HDU 5240 Exam (好水的题)
- HDU5237 Base64 大模拟
- HDU 1000
- HDU 1001
- hdu-5385
- hdu-5405
- HDU 1622 Trees On The Level
- HDU 1063 Exponentiation
- Hdu5033
- HDU 1166 敌兵布阵