QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#163963 | #7123. Robot Contest | QAQAutoMaton# | 0 | 199ms | 4680kb | C++14 | 1.1kb | 2023-09-04 17:22:35 | 2024-04-21 00:21:18 |
Judging History
answer
#include "robot.h"
#include<bits/stdc++.h>
// 1 W y-1
// 2 S x+1
// 3 E y+1
// 4 N x-1
//
// 2 -> to be deleted
// 3 4 5 6 -> WSEN
// 7 8 9 10 -> del WSEN
const char s[]="WSEN";
const char r[]="ENWS";
void check(std::vector<int> v){
int fr=-1;
for(int i=2;i<=3;++i)if(v[i]>=3 && r[v[i]-3]==s[i-1]){
fr=i-1;
break;
}
if(v[2]==-2 && v[3]==-2){
if(~fr)set_instruction(v,1,s[fr]);
else set_instruction(v,1,'T');
return;
}
int end=0;
for(int i=2;i<=3;++i)if(v[i]==1)end=i;
if(end){
for(int i=2;i<=3;++i)if(v[i]==2){
set_instruction(v,1,s[i-1]);
return;
}
if(~fr)set_instruction(v,1,s[fr]);
else if(v[1]==-2 && v[4]==-2)set_instruction(v,1,'T');
else set_instruction(v,0,s[end-1]);
}
else{
for(int i=2;i<=3;++i)if(v[i]==0){
set_instruction(v,i+2,s[i-1]);
return;
}
if(~fr)set_instruction(v,2,s[fr]);
else set_instruction(v,1,'T');
}
}
void program_pulibot()
{
for(int a=-2;a<=6;++a)
for(int b=-2;b<=6;++b)
for(int c=-2;c<=6;++c)
for(int d=-2;d<=6;++d)
for(int e=-2;e<=6;++e){
check({a,b,c,d,e});
}
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 190ms
memory: 4680kb
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 OK 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 133 133 133 133 133 133 133 133 133 0 0 0 0 0 0 0 0 0 0 0 0 0 193 128 128 128 128 128 128 128 128 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 ...
result:
wrong answer Not a path
Subtask #2:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 199ms
memory: 4392kb
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 OK 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 133 133 133 133 133 133 133 133 133 0 0 0 0 0 0 0 0 0 0 0 0 0 193 128 128 128 128 128 128 128 128 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 ...
result:
wrong answer Not a path
Subtask #3:
score: 0
Wrong Answer
Test #28:
score: 0
Wrong Answer
time: 199ms
memory: 4680kb
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 OK 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 133 133 133 133 133 133 133 133 133 0 0 0 0 0 0 0 0 0 0 0 0 0 193 128 128 128 128 128 128 128 128 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 ...
result:
wrong answer Not a path
Subtask #4:
score: 0
Wrong Answer
Test #40:
score: 0
Wrong Answer
time: 199ms
memory: 4380kb
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 OK 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 133 133 133 133 133 133 133 133 133 0 0 0 0 0 0 0 0 0 0 0 0 0 193 128 128 128 128 128 128 128 128 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 ...
result:
wrong answer Not a path
Subtask #5:
score: 0
Wrong Answer
Test #64:
score: 0
Wrong Answer
time: 189ms
memory: 4672kb
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 OK 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 193 193 193 193 193 0 0 0 0 0 0 0 0 0 0 0 0 0 133 133 133 133 133 133 133 133 133 0 0 0 0 0 0 0 0 0 0 0 0 0 193 128 128 128 128 128 128 128 128 0 0 0 0 0 0 0 0 0 0 0 0 0 193 193 193 193 ...
result:
wrong answer Not a path