QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#179627 | #7123. Robot Contest | triple321 | 0 | 1ms | 3860kb | C++20 | 2.3kb | 2023-09-14 23:13:37 | 2024-04-21 00:25:53 |
Judging History
answer
#include "robot.h"
#include <bits/stdc++.h>
#ifdef CYBER
#include "grader.cpp"
#endif
using namespace std;
#define lg long long
void fg(vector<lg> a, lg idx)
{
if(idx == 5)
{
// cout << a[0] << ' ' << a[1] << ' ' << a[2] << ' ' << a[3] << ' ' << a[4] << ' ' << !(a[1] && a[2] && a[3] && a[4]) << ' ' << (char)(a[5]) << '\n';
if(a[2] == -2 && a[3] == -2) return;
set_instruction({a[0], a[1], a[2], a[3], a[4]}, (a[1] && a[2] && a[3] && a[4] ? 2 : 1), (char)(a[5]));
return;
}
if(!idx)
{
a[idx] = 1;
fg(a, idx+1);
a[idx] = 0;
fg(a, idx+1);
return;
}
if(a[idx] == -1)
{
fg(a, idx+1);
a[idx] = -2;
fg(a, idx+1);
a[idx] = 1;
fg(a, idx+1);
a[idx] = 2;
fg(a, idx+1);
a[idx] = -1;
}
else if(a[idx] == -3)
{
a[idx] = -1;
fg(a, idx+1);
a[idx] = -2;
fg(a, idx+1);
a[idx] = 2;
fg(a, idx+1);
a[idx] = -3;
}
else fg(a, idx+1);
return;
}
void program_pulibot()
{
vector<vector<lg>> v;
v.push_back({0, 0, 0, 0, 0, 'E'});
v.push_back({0, 0, 0, 0, -1, 'E'});
v.push_back({0, 0, -1, 0, 0, 'E'});
v.push_back({0, -1, 0, 0, 0, 'E'});
v.push_back({0, 0, 0, -1, 0, 'S'});
v.push_back({0, -1, 0, 0, -1, 'E'});
v.push_back({0, -1, -1, 0, 0, 'E'});
v.push_back({0, -1, 0, -1, 0, 'S'});
v.push_back({0, 0, -1, 0, -1, 'E'});
v.push_back({0, 0, -1, -1, 0, 'N'});
v.push_back({0, 0, 0, -1, -1, 'S'});
v.push_back({0, -1, -1, -1, 0, 'N'});
v.push_back({0, -1, -1, 0, -1, 'E'});
v.push_back({0, -1, 0, -1, -1, 'S'});
v.push_back({0, 0, -1, -1, -1, 'W'});
v.push_back({0, 1, -3, -3, -3, 'W'});
v.push_back({0, -3, 1, -3, -3, 'S'});
v.push_back({0, -3, -3, 1, -3, 'E'});
v.push_back({0, -3, -3, -3, 1, 'N'});
v.push_back({0, 2, -3, -3, -3, 'W'});
v.push_back({0, -3, 2, -3, -3, 'S'});
v.push_back({0, -3, -3, 2, -3, 'E'});
v.push_back({0, -3, -3, -3, 2, 'N'});
for(int i = 0; i < v.size(); i++)
{
fg(v[i], 0);
}
set_instruction({0, 1, -2, -2, -2}, 1, 'T');
set_instruction({0, 1, -2, -2, -1}, 1, 'T');
set_instruction({0, 1, -2, -2, 1}, 1, 'T');
set_instruction({0, 1, -2, -2, 0}, 1, 'T');
set_instruction({0, 0, -2, -2, 1}, 1, 'T');
set_instruction({0, -1, -2, -2, 1}, 1, 'T');
set_instruction({0, -2, -2, -2, 1}, 1, 'T');
}
/*
6 6
0 0 0 0 0 0
1 1 1 0 1 0
0 0 0 0 1 0
0 1 1 1 1 1
0 1 1 1 1 1
0 0 0 0 0 0
*/
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3576kb
input:
4 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
output:
p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp PV Same state array
result:
wrong answer Same state array
Subtask #2:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 0ms
memory: 3688kb
input:
2 15 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 t
output:
p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp PV Same state array
result:
wrong answer Same state array
Subtask #3:
score: 0
Wrong Answer
Test #28:
score: 0
Wrong Answer
time: 1ms
memory: 3860kb
input:
15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 1 1 1 1 0 0 1 0 0 0 1 1 0 1 0 1 0 ...
output:
p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp PV Same state array
result:
wrong answer Same state array
Subtask #4:
score: 0
Wrong Answer
Test #40:
score: 0
Wrong Answer
time: 0ms
memory: 3580kb
input:
15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 ...
output:
p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp PV Same state array
result:
wrong answer Same state array
Subtask #5:
score: 0
Wrong Answer
Test #64:
score: 0
Wrong Answer
time: 1ms
memory: 3640kb
input:
15 15 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 ...
output:
p71c1rw3EvfjFcMVWG0EOedGbWDX5uUp PV Same state array
result:
wrong answer Same state array