肥婆纳妾 @ 2018-08-10 15:51:04
#include<bits/stdc++.h>
using namespace std;
int g_list[]=
{
2,.......19997
};
int main()
{
int n;
cin>>n;
for(int i=0;i<2061;++i)
for(int j=0;j<2061;++j)
{
if(binary_search(g_list,g_list+2060,n-g_list[i]-g_list[j]))
{
cout<<g_list[i]<<" "<<g_list[j]<<" "<<n-g_list[i]-g_list[j];
return 0;
}
}
return 0;
}
by 花园Serena @ 2018-08-10 16:06:54
要你打表