Submission #1234643

#TimeUsernameProblemLanguageResultExecution timeMemory
1234643ericl23302Robot Contest (IOI23_robot)C++20
10 / 100
67 ms5588 KiB
#include "robot.h"
#include <bits/stdc++.h>

using namespace std;

#define STAY 'H'
#define LEFT 'W'
#define DOWN 'S'
#define RIGHT 'E'
#define UP 'N'
#define STOP 'T'

/*

     4
     |
     |
1 -- 0 -- 3
     |
     |
     2

*/

void program_pulibot()
{
    // right
    set_instruction({0, -2, 0, 0, -2}, 1, RIGHT);
    set_instruction({0, -2, -1, 0, -2}, 1, RIGHT);
    set_instruction({0, -1, 1, 0, -2}, 1, RIGHT);
    set_instruction({0, 1, -1, 0, -2}, 1, RIGHT);
    set_instruction({0, 1, 0, 0, -2}, 1, RIGHT);
    set_instruction({0, 0, 1, 0, -2}, 1, RIGHT);
    
    set_instruction({0, -2, -2, 0, 1}, 1, RIGHT);
    set_instruction({0, -1, -2, 0, 1}, 1, RIGHT);
    set_instruction({0, 1, -2, 0, -1}, 1, RIGHT);
    set_instruction({0, 0, -2, 0, 1}, 1, RIGHT);
    set_instruction({0, 1, -2, 0, 0}, 1, RIGHT);

    // down
    set_instruction({0, 1, 0, -2, -2}, 1, DOWN);
    set_instruction({0, 1, 0, -1, -2}, 1, DOWN);
    set_instruction({0, -2, 0, -1, -2}, 1, DOWN);

    // up
    set_instruction({0, 1, -2, -1, 0}, 1, UP);
    // set_instruction({0, 1, -2, -2, 0}, 1, UP);

    // stops
    set_instruction({0, 0, -2, -2, 1}, 1, STOP);
    set_instruction({0, 1, -2, -2, 0}, 1, STOP);
    set_instruction({0, 1, -2, -2, 1}, 1, STOP);
    set_instruction({0, -1, -2, -2, 1}, 1, STOP);
    set_instruction({0, 1, -2, -2, -1}, 1, STOP);
}
#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...