Submission #1331182

#TimeUsernameProblemLanguageResultExecution timeMemory
1331182QuocSenseiRobot Contest (IOI23_robot)C++20
10 / 100
38 ms5556 KiB
#include "robot.h"
#include <bits/stdc++.h>

#define ll long long 
#define el cout << endl

using namespace std;

namespace SUBTASK_1
{
    void program_pulibot()
    {
        set_instruction({0, 1, -2, -2, 0}, 1, 'T');
        set_instruction({0, -2, 0, 0, -2}, 1, 'S');
        set_instruction({0, -2, 0, 0, 1}, 1, 'S');
        set_instruction({0, -2, -2, 0, 1}, 1, 'E');
        set_instruction({0, 1, -2, 0, 0}, 1, 'E');
    }
};
namespace SUBTASK_2
{
    void program_pulibot()
    {
        auto genE = [&] ()
        {
            for (int x = -2; x <= 1; x++)
                for (int y = -2; y <= 1; y++)
                    for (int q = -2; q <= 1; q++)
                    {
                        int p = 0;
                        set_instruction({0, x, y, p, q}, 1, 'E');
                    }
        };
        auto genN = [&] ()
        {
            for (int x = -2; x <= 1; x++)
                for (int y = -2; y <= 1; y++)
                {
                    for (int p = -2; p <= -1; p++)
                    {
                        if (y == -2 && p == -2)
                            continue;
                        int q = 0;
                        set_instruction({0, x, y, p, q}, 1, 'N');
                    }
                }
        };
        auto genS = [&] ()
        {
            for (int x = -2; x <= 1; x++)
                for (int p = -2; p <= -1; p++)
                    for (int q = -2; q <= -1; q++)
                    {
                        int y = 0;
                        set_instruction({0, x, y, p, q}, 1, 'S');
                    }
        };
        auto genT = [&] ()
        {
            for (int x = -2; x <= 1; x++)
                for (int q = -2; q <= 1; q++)
                {
                    int y = -2;
                    int p = -2;
                    set_instruction({0, x, y, p, q}, 1, 'T');
                }
        };
        genE();
        genN();
        genS();
        genT();
    }
}

void program_pulibot()
{
    SUBTASK_2::program_pulibot();
}
#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...