<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

        CodeforcesRound#256(Div.2)A.Rewards_html/css

        來源:懂視網(wǎng) 責(zé)編:小采 時間:2020-11-27 15:54:15
        文檔

        CodeforcesRound#256(Div.2)A.Rewards_html/css

        CodeforcesRound#256(Div.2)A.Rewards_html/css_WEB-ITnose:A. Rewards time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Bizon the Champion is called the Champion for a reason. Bizon the Champion has recently got a presen
        推薦度:
        導(dǎo)讀CodeforcesRound#256(Div.2)A.Rewards_html/css_WEB-ITnose:A. Rewards time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Bizon the Champion is called the Champion for a reason. Bizon the Champion has recently got a presen

        A. Rewards

        time limit per test

        1 second

        memory limit per test

        256 megabytes

        input

        standard input

        output

        standard output

        Bizon the Champion is called the Champion for a reason.

        Bizon the Champion has recently got a present ? a new glass cupboard with n shelves and he decided to put all his presents there. All the presents can be divided into two types: medals and cups. Bizon the Champion has a1 first prize cups, a2 second prize cups and a3 third prize cups. Besides, he has b1 first prize medals, b2 second prize medals and b3 third prize medals.

        Naturally, the rewards in the cupboard must look good, that's why Bizon the Champion decided to follow the rules:

      1. any shelf cannot contain both cups and medals at the same time;
      2. no shelf can contain more than five cups;
      3. no shelf can have more than ten medals.
      4. Help Bizon the Champion find out if we can put all the rewards so that all the conditions are fulfilled.

        Input

        The first line contains integers a1, a2 and a3 (0?≤?a1,?a2,?a3?≤?100). The second line contains integers b1, b2 and b3 (0?≤?b1,?b2,?b3?≤?100). The third line contains integer n (1?≤?n?≤?100).

        The numbers in the lines are separated by single spaces.

        Output

        Print "YES" (without the quotes) if all the rewards can be put on the shelves in the described manner. Otherwise, print "NO" (without the quotes).

        Sample test(s)

        Input

        1 1 11 1 14

        Output

        YES

        Input

        1 1 32 3 42

        Output

        YES

        Input

        1 0 01 0 01

        Output

        NO

        題意:一種是獎杯一種是獎牌放架子上,一層能放5個獎杯,或者10個獎牌,一層不能有兩種,水題。

        AC代碼:

        import java.util.*;public class Main { public static void main(String[] args) { Scanner scan=new Scanner(System.in); int a1=scan.nextInt(),a2=scan.nextInt(),a3=scan.nextInt(); int b1=scan.nextInt(),b2=scan.nextInt(),b3=scan.nextInt(); int n=scan.nextInt(); int sum1,sum2; sum1=a1+a2+a3; sum2=b1+b2+b3; int count=0; if(sum1%5==0){ count+=sum1/5; } else count+=sum1/5+1; if(sum2%10==0){ count+=sum2/10; } else count+=sum2/10+1; if(count>n) System.out.println("NO"); else System.out.println("YES"); }}

        ??

        聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        CodeforcesRound#256(Div.2)A.Rewards_html/css

        CodeforcesRound#256(Div.2)A.Rewards_html/css_WEB-ITnose:A. Rewards time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Bizon the Champion is called the Champion for a reason. Bizon the Champion has recently got a presen
        推薦度:
        標(biāo)簽: 256 codeforcesround# (div.2)
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 亚洲av无码专区国产乱码在线观看| 亚洲永久无码3D动漫一区| 99re免费视频| 亚洲国产精品成人网址天堂 | a级特黄毛片免费观看| 成年性羞羞视频免费观看无限| 亚洲综合视频在线| 四虎成人精品永久免费AV| 亚洲av伊人久久综合密臀性色 | 亚洲精品国产精品乱码视色 | 亚洲伊人成无码综合网| 真正全免费视频a毛片| 美女在线视频观看影院免费天天看 | 全黄a免费一级毛片人人爱| 一本色道久久综合亚洲精品蜜桃冫| 国产精品亚洲综合久久| 国产国产人免费视频成69堂| 亚洲视频在线观看不卡| 999国内精品永久免费观看| 亚洲AV成人噜噜无码网站| 一个人看的www在线观看免费| 亚洲最大视频网站| jizz日本免费| 亚洲日产韩国一二三四区| 免费看成人AA片无码视频吃奶| 亚洲av无码av制服另类专区| 久久久久成人精品免费播放动漫| 亚洲福利视频导航| 久久免费看黄a级毛片| 亚洲xxxx视频| 国产一区二区三区免费看| 亚洲免费在线观看| 久久91亚洲精品中文字幕| 久久受www免费人成_看片中文| 亚洲精品永久在线观看| 又粗又大又猛又爽免费视频| 中文字幕高清免费不卡视频| 中文字幕亚洲综合精品一区| 一二三四影视在线看片免费| 国产精品久久久久久亚洲小说| 亚洲日本一区二区三区在线|