QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#531369 | #7123. Robot Contest | green_gold_dog# | 0 | 100ms | 6776kb | C++20 | 1.9kb | 2024-08-24 20:14:10 | 2024-08-24 20:14:11 |
Judging History
answer
#include "robot.h"
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
void program_pulibot() {//W = (0, -1), S = (+1, 0), E = (0, +1), N = (-1, 0)
for (ll i = 0; i <= 17; i++) {
if (i == 1) {
continue;
}
for (ll w = -2; w <= 17; w++) {
for (ll s = -2; s <= 17; s++) {
for (ll e = -2; e <= 17; e++) {
for (ll n = -2; n <= 17; n++) {
if (i == 0) {
if (w > 0) {
set_instruction(vector<ll>{i, w, s, e, n}, 2, 'H');
} else if (s > 0) {
set_instruction(vector<ll>{i, w, s, e, n}, 3, 'H');
} else if (e > 0) {
set_instruction(vector<ll>{i, w, s, e, n}, 4, 'H');
} else if (n > 0) {
set_instruction(vector<ll>{i, w, s, e, n}, 5, 'H');
} else {
set_instruction(vector<ll>{i, w, s, e, n}, 2, 'H');
}
} else {
ll ni = i - 2;
ll np = ni % 4;
ll lp = ni / 4;
if (lp >= np) {
lp++;
}
char cp;
if (np == 0) {
cp = 'W';
}
if (np == 1) {
cp = 'S';
}
if (np == 2) {
cp = 'E';
}
if (np == 3) {
cp = 'N';
}
char go;
if (lp == 0) {
go = 'S';
}
if (lp == 1) {
go = 'E';
}
vector<ll> num{w, s, e, n};
if (num[np] < 0) {
cp = 'T';
}
if (s == -2 && e == -2) {
set_instruction(vector<ll>{i, w, s, e, n}, 1, cp);
continue;
}
if (lp > 0 && num[lp - 1 - (lp - 1 == np)] == 1) {
set_instruction(vector<ll>{i, w, s, e, n}, 1, cp);
continue;
}
if (lp == 2) {
set_instruction(vector<ll>{i, w, s, e, n}, 0, cp);
} else {
if (num[lp] == 0) {
set_instruction(vector<ll>{i, w, s, e, n}, i + 4, go);
} else {
set_instruction(vector<ll>{i, w, s, e, n}, i + 4, 'H');
}
}
}
}
}
}
}
}
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 93ms
memory: 6656kb
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 Invalid color
result:
wrong answer Invalid color
Subtask #2:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 98ms
memory: 6776kb
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 Invalid color
result:
wrong answer Invalid color
Subtask #3:
score: 0
Wrong Answer
Test #28:
score: 0
Wrong Answer
time: 99ms
memory: 6772kb
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 Invalid color
result:
wrong answer Invalid color
Subtask #4:
score: 0
Wrong Answer
Test #40:
score: 0
Wrong Answer
time: 100ms
memory: 6656kb
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 Invalid color
result:
wrong answer Invalid color
Subtask #5:
score: 0
Wrong Answer
Test #64:
score: 0
Wrong Answer
time: 97ms
memory: 6656kb
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 Invalid color
result:
wrong answer Invalid color