// File: cmaureir[P]strip-packing/scattersearch.cpp
// Function: print_strip(solution)
void print_strip(solution sol){

    const string colors[] = {
            "\e[0;34m",// BLUE
            "\e[0;32m",// GREEN
            "\e[0;36m",// CYAN
            "\e[0;31m",// RED
            "\e[0;35m",// PURPLE
            "\e[0;33m",// BROWN
            "\e[0;37m",// LIGHT GRAY
            "\e[1;33m",// DARK GRAY
            "\e[1;34m",// LIGHT BLUE
            "\e[1;32m",// LIGHT GREEN
            "\e[1;36m",// CYANCLARO
            "\e[1;31m",// LIGHT RED
            "\e[1;35m",// LIGHT PURPLE
            "\e[1;33m",// YELLOW
            "\e[0;37m" // WHITE
    };

    vector<int> tmp = sol.items;
    int h = sol.height;

    for (int j = h-1; j >= 0; j--)
    {
        for (int i = 0; i < strip_width; i++)
        {

            if ( sol.strip[i][j] != 0)
            {
                for (int k = 0; k < (int)tmp.size(); k++)
                {
                    if(tmp[k] == sol.strip[i][j])
                    {
                        cout << colors[k%14] << sol.strip[i][j] << "\t";
                    }
                }
            }
            else
            {
                 cout << colors[14] << "#" << "\t";
            }
        }
        cout << endl;
    }
    cout << colors[14] << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rdi, -0x260(%rbp)
movq %rdi, -0x8(%rbp)
movb $0x1, -0x21b(%rbp)
leaq -0x1f0(%rbp), %rax
movq %rax, -0x258(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x4560
movq -0x258(%rbp), %rdi
movq -0x250(%rbp), %rdx
leaq 0xe3a5(%rip), %rsi      # 0x172bf
callq 0xb810
jmp 0x8f21
leaq -0x1d0(%rbp), %rax
movq %rax, -0x270(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x20d(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x4560
movq -0x270(%rbp), %rdi
movq -0x268(%rbp), %rdx
leaq 0xe369(%rip), %rsi      # 0x172c7
callq 0xb810
jmp 0x8f65
leaq -0x1b0(%rbp), %rax
movq %rax, -0x280(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x20e(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x4560
movq -0x280(%rbp), %rdi
movq -0x278(%rbp), %rdx
leaq 0xe32d(%rip), %rsi      # 0x172cf
callq 0xb810
jmp 0x8fa9
leaq -0x190(%rbp), %rax
movq %rax, -0x290(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x20f(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0x4560
movq -0x290(%rbp), %rdi
movq -0x288(%rbp), %rdx
leaq 0xe2f1(%rip), %rsi      # 0x172d7
callq 0xb810
jmp 0x8fed
leaq -0x170(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x210(%rbp), %rdi
movq %rdi, -0x298(%rbp)
callq 0x4560
movq -0x2a0(%rbp), %rdi
movq -0x298(%rbp), %rdx
leaq 0xe2b5(%rip), %rsi      # 0x172df
callq 0xb810
jmp 0x9031
leaq -0x150(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x211(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x4560
movq -0x2b0(%rbp), %rdi
movq -0x2a8(%rbp), %rdx
leaq 0xe279(%rip), %rsi      # 0x172e7
callq 0xb810
jmp 0x9075
leaq -0x130(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x212(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x4560
movq -0x2c0(%rbp), %rdi
movq -0x2b8(%rbp), %rdx
leaq 0xe23d(%rip), %rsi      # 0x172ef
callq 0xb810
jmp 0x90b9
leaq -0x110(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x213(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x4560
movq -0x2d0(%rbp), %rdi
movq -0x2c8(%rbp), %rdx
leaq 0xe201(%rip), %rsi      # 0x172f7
callq 0xb810
jmp 0x90fd
leaq -0xf0(%rbp), %rax
movq %rax, -0x2e0(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x214(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x4560
movq -0x2e0(%rbp), %rdi
movq -0x2d8(%rbp), %rdx
leaq 0xe1c5(%rip), %rsi      # 0x172ff
callq 0xb810
jmp 0x9141
leaq -0xd0(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x215(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x4560
movq -0x2f0(%rbp), %rdi
movq -0x2e8(%rbp), %rdx
leaq 0xe189(%rip), %rsi      # 0x17307
callq 0xb810
jmp 0x9185
leaq -0xb0(%rbp), %rax
movq %rax, -0x300(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x216(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x4560
movq -0x300(%rbp), %rdi
movq -0x2f8(%rbp), %rdx
leaq 0xe14d(%rip), %rsi      # 0x1730f
callq 0xb810
jmp 0x91c9
leaq -0x90(%rbp), %rax
movq %rax, -0x310(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x217(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x4560
movq -0x310(%rbp), %rdi
movq -0x308(%rbp), %rdx
leaq 0xe111(%rip), %rsi      # 0x17317
callq 0xb810
jmp 0x920d
leaq -0x70(%rbp), %rax
movq %rax, -0x320(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x4560
movq -0x320(%rbp), %rdi
movq -0x318(%rbp), %rdx
leaq 0xe0d8(%rip), %rsi      # 0x1731f
callq 0xb810
jmp 0x924e
leaq -0x50(%rbp), %rax
movq %rax, -0x330(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x219(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x4560
movq -0x330(%rbp), %rdi
movq -0x328(%rbp), %rdx
leaq 0xe06f(%rip), %rsi      # 0x172f7
callq 0xb810
jmp 0x928f
leaq -0x30(%rbp), %rax
movq %rax, -0x340(%rbp)
movq %rax, -0x1f8(%rbp)
leaq -0x21a(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x4560
movq -0x340(%rbp), %rdi
movq -0x338(%rbp), %rdx
leaq 0xe026(%rip), %rsi      # 0x172ef
callq 0xb810
jmp 0x92d0
movb $0x0, -0x21b(%rbp)
leaq -0x21a(%rbp), %rdi
callq 0x4340
leaq -0x219(%rbp), %rdi
callq 0x4340
leaq -0x218(%rbp), %rdi
callq 0x4340
leaq -0x217(%rbp), %rdi
callq 0x4340
leaq -0x216(%rbp), %rdi
callq 0x4340
leaq -0x215(%rbp), %rdi
callq 0x4340
leaq -0x214(%rbp), %rdi
callq 0x4340
leaq -0x213(%rbp), %rdi
callq 0x4340
leaq -0x212(%rbp), %rdi
callq 0x4340
leaq -0x211(%rbp), %rdi
callq 0x4340
leaq -0x210(%rbp), %rdi
callq 0x4340
leaq -0x20f(%rbp), %rdi
callq 0x4340
leaq -0x20e(%rbp), %rdi
callq 0x4340
leaq -0x20d(%rbp), %rdi
callq 0x4340
leaq -0x1f9(%rbp), %rdi
callq 0x4340
movq -0x260(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x5290
jmp 0x93a0
movq -0x260(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x23c(%rbp)
movl -0x23c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x240(%rbp)
cmpl $0x0, -0x240(%rbp)
jl 0x9852
movl $0x0, -0x244(%rbp)
movl -0x244(%rbp), %eax
cmpl 0x19036(%rip), %eax     # 0x22418
jge 0x9827
movq -0x260(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x244(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x240(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x97c5
movl $0x0, -0x248(%rbp)
movl -0x248(%rbp), %eax
movl %eax, -0x344(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x53e0
movq %rax, %rcx
movl -0x344(%rbp), %eax
cmpl %ecx, %eax
jge 0x97c3
movslq -0x248(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0xbcc0
movq -0x260(%rbp), %rcx
movl (%rax), %eax
movq 0x58(%rcx), %rcx
movslq -0x244(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x240(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x97ad
movslq -0x248(%rbp), %rcx
movl %ecx, %eax
imulq $-0x6db6db6d, %rcx, %rcx # imm = 0x92492493
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x3, %ecx
addl %edx, %ecx
movl %ecx, %edx
shll $0x4, %edx
addl %ecx, %ecx
subl %edx, %ecx
addl %ecx, %eax
cltq
shlq $0x5, %rax
leaq -0x1f0(%rbp,%rax), %rsi
movq 0x18b1b(%rip), %rdi     # 0x21fd8
callq 0x4290
movq %rax, -0x350(%rbp)
jmp 0x94cb
movq -0x350(%rbp), %rdi
movq -0x260(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x244(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x240(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x4520
movq %rax, -0x358(%rbp)
jmp 0x9500
movq -0x358(%rbp), %rdi
leaq 0xde26(%rip), %rsi      # 0x17334
callq 0x42e0
jmp 0x9515
jmp 0x97ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x970a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x96fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x96f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x96e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x96da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x96ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x96c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x96b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x96aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x969e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x9692
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x9686
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x967a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x966e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x21a(%rbp), %rdi
callq 0x4340
leaq -0x219(%rbp), %rdi
callq 0x4340
leaq -0x218(%rbp), %rdi
callq 0x4340
leaq -0x217(%rbp), %rdi
callq 0x4340
leaq -0x216(%rbp), %rdi
callq 0x4340
leaq -0x215(%rbp), %rdi
callq 0x4340
leaq -0x214(%rbp), %rdi
callq 0x4340
leaq -0x213(%rbp), %rdi
callq 0x4340
leaq -0x212(%rbp), %rdi
callq 0x4340
leaq -0x211(%rbp), %rdi
callq 0x4340
leaq -0x210(%rbp), %rdi
callq 0x4340
leaq -0x20f(%rbp), %rdi
callq 0x4340
leaq -0x20e(%rbp), %rdi
callq 0x4340
leaq -0x20d(%rbp), %rdi
callq 0x4340
leaq -0x1f9(%rbp), %rdi
callq 0x4340
testb $0x1, -0x21b(%rbp)
jne 0x9721
jmp 0x976e
movq -0x1f8(%rbp), %rax
leaq -0x1f0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x360(%rbp)
je 0x976c
movq -0x360(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x368(%rbp)
callq 0x4190
movq -0x368(%rbp), %rax
leaq -0x1f0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x360(%rbp)
jne 0x973b
jmp 0x976e
jmp 0x992f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x98e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x5380
jmp 0x98e1
jmp 0x97af
movl -0x248(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x248(%rbp)
jmp 0x9419
jmp 0x9811
leaq -0x30(%rbp), %rsi
movq 0x18808(%rip), %rdi     # 0x21fd8
callq 0x4290
movq %rax, -0x370(%rbp)
jmp 0x97de
movq -0x370(%rbp), %rdi
leaq 0xdb3b(%rip), %rsi      # 0x17327
callq 0x42e0
movq %rax, -0x378(%rbp)
jmp 0x97fa
movq -0x378(%rbp), %rdi
leaq 0xdb2c(%rip), %rsi      # 0x17334
callq 0x42e0
jmp 0x980f
jmp 0x9811
jmp 0x9813
movl -0x244(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x244(%rbp)
jmp 0x93d6
movq 0x187aa(%rip), %rdi     # 0x21fd8
movq 0x18763(%rip), %rsi     # 0x21f98
callq 0x4320
jmp 0x983c
jmp 0x983e
movl -0x240(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x240(%rbp)
jmp 0x93bf
leaq -0x30(%rbp), %rsi
movq 0x1877b(%rip), %rdi     # 0x21fd8
callq 0x4290
movq %rax, -0x380(%rbp)
jmp 0x986b
movq -0x380(%rbp), %rdi
movq 0x1871f(%rip), %rsi     # 0x21f98
callq 0x4320
jmp 0x9880
leaq -0x238(%rbp), %rdi
callq 0x5380
leaq -0x1f0(%rbp), %rax
movq %rax, -0x390(%rbp)
addq $0x1e0, %rax            # imm = 0x1E0
movq %rax, -0x388(%rbp)
movq -0x388(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x398(%rbp)
callq 0x4190
movq -0x390(%rbp), %rcx
movq -0x398(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x388(%rbp)
jne 0x98a7
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbp
retq
leaq -0x1f0(%rbp), %rax
movq %rax, -0x3a8(%rbp)
addq $0x1e0, %rax            # imm = 0x1E0
movq %rax, -0x3a0(%rbp)
movq -0x3a0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3b0(%rbp)
callq 0x4190
movq -0x3a8(%rbp), %rcx
movq -0x3b0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3a0(%rbp)
jne 0x98fc
jmp 0x992f
movq -0x208(%rbp), %rdi
callq 0x4550
nopl (%rax,%rax)