[V0.2.0]The overlaped shadows

input file:in.txt    output file:out.txt
time limit: 500ms
language:ASM、C、C++、C#、Java、VB


Difficulty:★
Describe:

    Now you have to put m unit cubes(whose edge lengths is 1)in a 5 - dimensional container v-w-x-y-z,we have to ensure that there isn't any cube whose shadow on 4 - dimensional v-w-x-y or v-w-x-z can overlap whith another cube's shadow.For example,the shadows of two points A(2,5,8,1,6) and B(2,5,8,19,6) will overlap in the 4 - dimensional v-w-x-z.Please find out a random way to put all these cubes.
Input:
    The first line:Five integer v,w,x,y,z(0<v,w,x,y,z<50),denoting the lengths of the 5 - dimensional container on each dimensional ;
    The following 5 lines:A single string,denoting the name of each dimensional;
    The next line:A single integer n(0<n<32768),denotion the number of unit cubes.
    The following n lines:A single string,denotion the name of each unit cube
Output:
    For each unit cube, output one line containing the coordinate of the cube in the format shown in the sample output.
    If there is no way to put all the cubes in the container output a single line:"No solution!".
Sample Input:
7 7 19 10 13
节次
星期
周数
教师
实验室
9
软件工程x1
软件工程x2
软件工程x3
软件工程s4
操作系统x6
UMLx1
UMLx7
UMLx8
Sample Output:
软件工程x1 节次0 星期2 周数15 教师7 实验室9
软件工程x2 节次2 星期1 周数5 教师6 实验室11
软件工程x3 节次3 星期6 周数6 教师5 实验室6
软件工程s4 节次4 星期4 周数2 教师4 实验室0
操作系统x6 节次4 星期3 周数0 教师9 实验室12
UMLx1 节次4 星期5 周数5 教师3 实验室2
UMLx7 节次5 星期1 周数2 教师2 实验室3
UMLx8 节次6 星期3 周数7 教师4 实验室7 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值