F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Even For Ever

Time Limit: 5000/2000 MS (Java/Others)    Memory Limit: 125536/65536 K (Java/Others)
Total Submission(s): 149    Accepted Submission(s): 5
Special Judge


Problem Description
Hollywood is making a big film these days.It tells a story about the fight between Kongfu Panda and Police Black Cat.Each of them needs to release n bombs during the fight.Kongfu Panda will release n bombs a1,a2,...,an, one at each time.And each time,the product of Panda's bomb and Cat's bomb shoule be 1.This is what they call as Fight Principle.For the Kongfu Panda,the sum of all its bombs' values will be an integer s,which will be given in the input data.But for Police Black Cat,you know ,because his price is a bit lower,the sum of his bombs' values will be 1.
Now as the audiences' wish,you should figure out one possible solution of their bombs' value.

 

Input
First an integer m,the number of test cases.Then an integer s,as described above.(1<=s<=100000).
Notice that all the n integers will be positive.
 

Output
The answer of every case should be in one line.If there's no such an answer,output -1,else first gives n,then n integers,from a1 to an.

 

Sample Input
3 1 2 10
 

Sample Output
1 1 -1 3 2 4 4
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 15:08:11, Gzip enabled