Submission #1099108


Source Code Expand

Copy
ENV[Z='RUBY_THREAD_VM_STACK_SIZE']||exec({Z=>?5*8},'ruby',$0);def f(i,c)(h=(H[i].map{|e|f e,i}.max||0)+1)>=K&&c!=1&&(h=0;$r+=1);h end;N,K,Q,*A=`dd`.split.map &:to_i;H=Hash.new{|h,k|h[k]=[]};2.upto(N){|i|H[A[i-$r=2]]<<i};f 1,1;p$r--~Q/Q

Submission Info

Submission Time
Task A - Divide a Cuboid
User leafmoon
Language Ruby (2.3.3)
Score 0
Code Size 235 Byte
Status
Exec Time 2114 ms
Memory 147924 KB

Compile Error

./Main.rb:1: warning: `&' interpreted as argument prefix

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_00.txt, 0_01.txt, 0_02.txt
All 0 / 200 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt
Case Name Status Exec Time Memory
0_00.txt 74 ms 5056 KB
0_01.txt 54 ms 4300 KB
0_02.txt 54 ms 4300 KB
1_00.txt
1_01.txt
1_02.txt
1_03.txt
1_04.txt
1_05.txt