当前位置: 首页 > 工具软件 > FLINT > 使用案例 >

A. Captain Flint and Crew Recruitment

朱建弼
2023-12-01

原题连接

简单贪心

#include <bits/stdc++.h>
using namespace std;


int main()
{

    int t;
    cin >> t;
    while(t--) {
        int n;
        cin >> n;
        // 6 10 14
        if(n <= 30) {
            cout << "NO" << endl;
            continue;
        }
        cout << "YES" << endl;
        if(n - 30 == 6 || n - 30 == 10 || n - 30 == 14)
            cout << 6 << " " << 10 << " " << 15 << " " << n - 31 << endl;
        else
            cout << 6 << " " << 10 << " " << 14 << " " << n - 30 << endl;
    }

    return 0;
}
 类似资料:

相关阅读

相关文章

相关问答