제출 #1049295

#제출 시각아이디문제언어결과실행 시간메모리
1049295IUA_Hasin로봇 대회 (IOI23_robot)C++17
0 / 100
81 ms5644 KiB
#include "robot.h"

void program_pulibot()
{
    //subtask 1
    // set_instruction({0, -2, 0, 0, -2}, 1, 'E');
    // set_instruction({0, 1, 0, 0, -2}, 1, 'E');
    // set_instruction({0, 1, 0, -2, -2}, 1, 'S');
    // set_instruction({0, 0, 0, -2, 1}, 1, 'S');
    // set_instruction({0, 0,-2, -2, 1}, 1, 'T');

    //subtask 2
    //when to go right
    for(int i=-2; i<=1; i++){
        for(int j=-1; j<=1; j++){
            if(i!=0){
                set_instruction({0, i, j, 0, -2}, 1, 'E');
            }
        }
    }
    for(int i=-2; i<=1; i++){
        for(int j=-1; j<=1; j++){
            set_instruction({0, i, -2, 0, j}, 1, 'E');
        }
    }

    //when to go down
    for(int i=-2; i<=-1; i++){
        for(int j=-2; j<=1; j++){
            if(j>=-2){
                set_instruction({0, j, 0, i, -2}, 1, 'S');
            }
        }
    }

    //when to go up
    set_instruction({0, 1, -2, -1, 0}, 1, 'N');
    set_instruction({0, 0, -2, -1, 0}, 1, 'N');

    //when to terminate
    set_instruction({0, -1, -2, -2, 1}, 1, 'T');
    set_instruction({0, 0, -2, -2, 1}, 1, 'T');
    set_instruction({0, 1, -2, -2, 0}, 1, 'T');
    set_instruction({0, 1, -2, -2, -1}, 1, 'T');

}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...