zoukankan      html  css  js  c++  java
  • 【Codeforces 1114A】Got Any Grapes?

    【链接】 我是链接,点我呀:)
    【题意】

    水题

    【题解】

    哪个比较挑剔优先给他选>_<

    【代码】

    import java.io.*;
    import java.util.*;
    
    public class Main {
    	
    	static int N = (int)1e6;
    	static InputReader in;
    	static PrintWriter out;
    		
    	public static void main(String[] args) throws IOException{
    		//InputStream ins = new FileInputStream("E:\rush.txt");
    		InputStream ins = System.in;
    		in = new InputReader(ins);
    		out = new PrintWriter(System.out);
    		//code start from here
    		new Task().solve(in, out);
    		out.close();
    	}
    	
    	static class Task{
    		public void solve(InputReader in,PrintWriter out) {
    			int x,y,z;
    			int a,b,c;
    			x = in.nextInt();y = in.nextInt();z = in.nextInt();
    			a = in.nextInt();b = in.nextInt();c = in.nextInt();
    			if (x>a) {
    				out.println("NO");
    				return;
    			}
    			//x<=a;
    			a-=x;
    			if (y>a+b) {
    				out.println("NO");
    				return;
    			}
    			//y<=a+b
    			if (z>a+b+c-y) {
    				out.println("NO");
    				return;
    			}
    			out.println("YES");
    		
    		}
    	}
    
    	
    
    	static class InputReader{
    		public BufferedReader br;
    		public StringTokenizer tokenizer;
    		
    		public InputReader(InputStream ins) {
    			br = new BufferedReader(new InputStreamReader(ins));
    			tokenizer = null;
    		}
    		
    		public String next(){
    			while (tokenizer==null || !tokenizer.hasMoreTokens()) {
    				try {
    				tokenizer = new StringTokenizer(br.readLine());
    				}catch(IOException e) {
    					throw new RuntimeException(e);
    				}
    			}
    			return tokenizer.nextToken();
    		}
    		
    		public int nextInt() {
    			return Integer.parseInt(next());
    		}
    	}
    }
    
  • 相关阅读:
    vue-以文件流-blob-的形式-下载-导出文件
    vue-element-upload 文件上传打开选择文件弹框前进行提示或操作
    django-创建Template(模板)
    django-配置url
    django-创建页面
    django创建应用及应用模块解释
    django创建项目及目录介绍
    django的安装
    Python2X学习16-python-列表
    Request
  • 原文地址:https://www.cnblogs.com/AWCXV/p/10361129.html
Copyright © 2011-2022 走看看