码迷,mamicode.com
首页 > 其他好文 > 详细

UESTC 2016 Summer Training #1 Div.2

时间:2016-07-11 23:55:28      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:

最近意志力好飘摇..不知道坚不坚持得下去..

这么弱还瞎纠结...可以滚了..

 

水题都不会做..

LCS (A)

 

LCS (B)

没有看题

 

Gym 100989C

 

1D Cafeteria (B)

不会捉

 

Gym 100989E

 

Gym 100989F

 

Mission in Amman (B)

没看题

 

Queue (A)

感觉题意理解得有问题啊

技术分享
 1 #include <iostream>
 2 #include <cstdio>
 3 #include <cstring>
 4 #include <algorithm>
 5 using namespace std;
 6 int n,f[6],c[6],b[6],cnt[100];
 7 
 8 int check(int x){
 9     for(int i = 5;i >= 1;i--){
10         int cc = x/b[i];
11         if(cc > cnt[b[i]]) return 0;
12         cnt[b[i]] -= cc;
13         x -= b[i]*cc;
14     }
15     return 1;
16 }
17 
18 void solve(){
19     int tot;
20     b[1]=1;b[2]=5;b[3]=10;b[4]=20;b[5]=50;
21     memset(c,0,sizeof(c));
22     memset(cnt,0,sizeof(cnt));
23     int ok = 0;
24     for(int i = 1;i <= n;i++){
25         scanf("%d",&tot);
26         int tmp = 0,yu = 0;
27         for(int j = 1;j <= 5;j++){
28             scanf("%d",&c[j]);
29             tmp += c[j]*b[j];
30             cnt[b[j]] += c[j];
31         } 
32         yu = tmp-tot;
33         if(!check(yu)) ok = 1;
34     }
35 
36     if(ok == 1) puts("no");
37     else puts("yes");
38 }
39 
40 int main(){
41     while(scanf("%d",&n) != EOF){
42         solve();
43     }
44     return 0;
45 }
View Code

 

Queue (B)

没读题

 

Objects Panel (A)

觉得很难写,,而且不会写...可是过的人很多啊

 

Objects Panel (B)

没看题

 

Plus or Minus (A)

 

Plus or Minus (B)

没看题

 

Mixed Dimensions

没看题

 

我好菜啊...............................................

 

UESTC 2016 Summer Training #1 Div.2

标签:

原文地址:http://www.cnblogs.com/wuyuewoniu/p/5661995.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!