题解【CF1186A】 Vus the Cossack and a Contest

这题是入门难度的题目吧……

根据题意可以得出,只有当\(m\)\(k\)都大于等于\(n\)时,\(Vus\)才可以实现他的计划。

因此,我们不难得出以下\(AC\)代码:

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <cctype>//头文件准备

using namespace std;//使用标准名字空间

inline int gi()
{
    int f = 1, x = 0; char c = getchar();
    while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar();}
    while (c >= '0' && c <= '9') { x = x * 10 + c - '0'; c = getchar();}
    return f * x;
}//快速读入模板

int n, k, m;//n,k,m的含义如题目

int main()
{
    n = gi(), k = gi(), m = gi();//输入这3个数
    if (k >= n && m >= n) puts("Yes");//如果k和m都大于等于n,Vus就能实现他的计划,输出"Yes"
    else puts("No");//否则,Vus实现不了他的计划,输出"No"
    return 0;//结束主函数
}
posted @ 2019-06-30 14:34  csxsi  阅读(135)  评论(0编辑  收藏  举报