QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#179627 | #7123. Robot Contest | triple321 | 0 | 1ms | 3852kb | C++20 | 2.3kb | 2023-09-14 23:13:37 | 2024-04-28 07:48:35 |
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
*/
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3848kb
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: 3552kb
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: 3656kb
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: 1ms
memory: 3852kb
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: 0ms
memory: 3716kb
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