Codeforces Round #660 (Div. 2)
codeforces 1388 A solution in cpp
by ujjal roy
#include<bits/stdc++.h>
using namespace std;
main()
{
int t,n;
cin>>t;
while(t--)
{
cin>>n;
if(n>30)
{
cout<<"YES"<<endl;
if(n==36)
cout<<"5 6 10 15"<<endl;
else if(n==40)
cout<<"15 14 6 5"<<endl;
else if(n==44)
cout<<"6 7 10 21"<<endl;
else cout<<"14 10 6 "<<n-30<<endl;
}
else cout<<"NO"<<endl;
}
return 0;
}
0 Comments