记录编号 550424 评测结果 AAAAAAAAAAAAAAAAAAAAAAAAA
题目名称 [NOI Online 2020 1st PJ]文具订购(民间数据) 最终得分 100
用户昵称 Gravatar夜莺 是否通过 通过
代码语言 C++ 运行时间 0.010 s
提交时间 2020-03-09 14:49:55 内存使用 4.40 MiB
显示代码纯文本
#include<cstdio>
using namespace std;
int n,ans;
int main(){
	freopen("noi_online2020pj_order.in","r",stdin);
	freopen("noi_online2020pj_order.out","w",stdout);
	scanf("%d",&n);
	if(n==1||n==2||n==5){
		printf("-1");
		return 0;
	}
	ans=n/14;
	n%=14;
	if(n==1||n==2||n==5){
		n+=14;
		ans--;
	}
	if(n==0)
		printf("%d %d %d",ans,ans,ans);
	if(n==3)
		printf("%d %d %d",ans,ans,ans+1);
	if(n==4)
		printf("%d %d %d",ans,ans+1,ans);
	if(n==6)
		printf("%d %d %d",ans,ans,ans+2);
	if(n==7)
		printf("%d %d %d",ans,ans+1,ans+1);
	if(n==8)
		printf("%d %d %d",ans,ans+2,ans);
	if(n==9)
		printf("%d %d %d",ans,ans,ans+3);
	if(n==10)
		printf("%d %d %d",ans,ans+1,ans+2);
	if(n==11)
		printf("%d %d %d",ans,ans+2,ans+1);
	if(n==12)
		printf("%d %d %d",ans,ans,ans+4);
	if(n==13)
		printf("%d %d %d",ans,ans+1,ans+3);
	if(n==15)
		printf("%d %d %d",ans,ans,ans+5);
	if(n==16)
		printf("%d %d %d",ans,ans+1,ans+4);
	if(n==19)
		printf("%d %d %d",ans,ans+1,ans+5);
	return 0;
}