zoukankan      html  css  js  c++  java
  • 题解【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;//结束主函数
    }
    
  • 相关阅读:
    单例模式
    Java多线程小例子(三个窗口卖火车票)
    HashMap和HashTable的区别
    javascript操作对象的方法
    javascript基本语法
    其他标签
    头标签
    label标签
    表单标签
    IO流-LineNumberReader
  • 原文地址:https://www.cnblogs.com/xsl19/p/11109654.html
Copyright © 2011-2022 走看看