Submission #28684

# Submission time Handle Problem Language Result Execution time Memory
28684 2017-07-16T08:42:14 Z 이제 내가 두목이다~(#1175, exqt, kshy9598) LR Springboard (FXCUP2_springboard) C++11
0 / 1
0 ms 1132 KB
#include "springboard.h"

void Reorder(int N)
{
//	PutBall(3); // ��ȯ�� = -1
//	PutBall(1); // ��ȯ�� = 1

    PutBall(N/2+1);
    int dir = PutBall(N/2+1);

    for(int i=12; i>=0; i--) // 13
    {
        if((1<<i) >= N) continue;
        if(dir == -1) dir = PutBall((1<<i)+1);
        else if(dir == 1) dir = PutBall(N-(1<<i)+1);
    }

    if(dir == -1)
    {
        dir = PutBall(1);
        if(dir == -1) PutBall(N);
    }
    else if(dir == 1)
    {
        dir = PutBall(N);
        if(dir == -1) PutBall(1);
    }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1132 KB Output is correct
2 Correct 0 ms 1132 KB Output is correct
3 Correct 0 ms 1132 KB Output is correct
4 Correct 0 ms 1132 KB Output is correct
5 Correct 0 ms 1132 KB Output is correct
6 Incorrect 0 ms 1132 KB Output isn't correct
7 Halted 0 ms 0 KB -