zoukankan      html  css  js  c++  java
  • 题解 CF1388A 【Captain Flint and Crew Recruitment】(思维、贪心)

    AC代码:

    #include<bits/stdc++.h>
    using namespace std;
    
    void solve() {
    	int n; cin >> n;
    	if (n <= 30)
    		cout << "no" << endl;
    	else {
    		if (n != 36 && n != 40 && n != 44)
    			cout << "YES
    6 10 14 " << n - 30 << "
    ";
    		else cout << "YES
    6 10 15 " << n - 31 << "
    ";
    	}
    }
    
    int main() {
    	//freopen("in.txt", "r", stdin);
    	ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    	int t; cin >> t;
    	while (t--)solve();
    }
    

    The desire of his soul is the prophecy of his fate
    你灵魂的欲望,是你命运的先知。

  • 相关阅读:
  • 原文地址:https://www.cnblogs.com/RioTian/p/13562007.html
Copyright © 2011-2022 走看看