codeforces 448 A. Rewards

简介:

题目链接:http://codeforces.com/contest/448/problem/A
提示:水,看懂题即可

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    int a[3];
    int b[3];
    int m;
    int suma=0,sumb=0;
    for(int i=0; i<3; i++)
        cin>>a[i],suma+=a[i];
    for(int i=0; i<3; i++)
        cin>>b[i],sumb+=b[i];
    cin>>m;
    if(suma%5==0)
        suma/=5;
    else
        suma=suma/5+1;
    if(sumb%10==0)
        sumb/=10;
    else
        sumb=sumb/10+1;
    //cout<<suma<<" "<<sumb<<endl;
    if(suma+sumb>m)
        puts("NO");
    else
        puts("YES");
    return 0;
}
目录
相关文章
|
6月前
codeforces 312
A. Whose sentence is it?
26 0
|
6月前
codeforces 327 A Ciel and Dancing
给你一串只有0和1的数字,然后对某一区间的数翻转1次(0变1 1变0),只翻转一次而且不能不翻转,然后让你计算最多可能出现多少个1。 这里要注意很多细节 比如全为1,要求必须翻转,这时候我们只要翻转一个1就可以了,对于其他情况,我们只要计算区间里面如果0多于1,将其翻转后计算1的总数,然后取最大值。
20 0
|
6月前
codeforces 322 A Ciel and Dancing
有n个男孩和m个女孩,他们要结对跳舞,每对要有一个女孩和一个男孩,而且其中一个要求之前没有和其他人结对,求出最大可以结多少对。
21 0
|
6月前
codeforces 304A. Pythagorean Theorem II
给你一个n,计算出1 ≤ a ≤ b ≤ c ≤ n.使得由abc构成的三角形满足勾股定理,c为斜边。 没有简单的方法,直接爆力,但是要注意,有些abc满足勾股定理的表达式,但不一定是三角形,所以要判断一下,根据三角形三边的性质,两边之和大于第三边,两边之差小于第三边。
31 0
C - Rumor CodeForces - 893C
C - Rumor CodeForces - 893C
62 0
|
机器学习/深度学习 人工智能 网络架构
Codeforces 706B Interesting drink
B. Interesting drink time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard outp...
1137 0
|
人工智能
Codeforces 777C Alyona and Spreadsheet
C. Alyona and Spreadsheet time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard ...
1133 0
|
人工智能
Codeforces 719B Anatoly and Cockroaches
B. Anatoly and Cockroaches time limit per test:1 second memory limit per test:256 megabytes input:standard input output:stan...
862 0

热门文章

最新文章