QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#179803 | #7123. Robot Contest | Lynkcat | 0 | 220ms | 4228kb | C++20 | 3.8kb | 2023-09-15 09:25:42 | 2023-09-15 09:25:42 |
Judging History
answer
#include<bits/stdc++.h>
#include "robot.h"
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 998244353
// #define int ll
// #define N
using namespace std;
namespace
{
int s[5];
string val="WSENHT";
}
inline int rev(int x)
{
return ((x-2)^4)+2;
}
inline int rl(int x)
{
return (x-2)&3;
}
inline int sta(int x)
{
if (x<2) return 2;
return (x-2)>3;
}
void work(int k)
{
if (k==5)
{
if (s[0]<0) return;
if (s[0]==0)
{
if (s[2]==-2&&s[3]==-2)
{
int pos=0;
for (int i=1;i<5;i++)
if (s[i]==1) pos=i;
if (pos)
set_instruction(poly(s,s+5),1,val[pos-1]);
return;
}
if (s[1]==-2&&s[4]==-2)
{
set_instruction(poly(s,s+5),2,'H');
return;
}
int pos=0;
for (int i=1;i<5;i++)
if (s[i]==1) pos=i;
if (pos)
{
set_instruction(poly(s,s+5),2+pos,val[pos-1]);
}
return;
}
if (s[0]==1)
{
int pos=0;
for (int i=1;i<5;i++)
if (s[i]==1) pos=i;
if (pos)
{
pos=0;
for (int i=1;i<5;i++)
if (s[i]>2&&s[i]-2==(2^i)) pos=i;
if (pos)
set_instruction(poly(s,s+5),1,val[pos-1]);
else
{
if (s[1]==-2&&s[4]==-2)
{
set_instruction(poly(s,s+5),1,'T');
return;
}
pos=0;
for (int i=1;i<5;i++)
if (s[i]==2) pos=i;
if (pos)
set_instruction(poly(s,s+5),1,val[pos-1]);
else
{
pos=0;
for (int i=1;i<5;i++)
if (s[i]==1) pos=i;
set_instruction(poly(s,s+5),0,val[pos-1]);
}
}
return;
}
for (int i=1;i<5;i++)
if (s[i]==0) pos=i;
if (pos)
{
set_instruction(poly(s,s+5),1,val[pos-1]);
} else
{
if (s[1]==-2&&s[4]==-2)
{
set_instruction(poly(s,s+5),2,'H');
return;
}
for (int i=1;i<5;i++)
if (s[i]==2) pos=i;
if (pos)
set_instruction(poly(s,s+5),0,val[pos-1]);
}
return;
}
if (s[0]==2)
{
int pos=0;
for (int i=1;i<5;i++)
if (s[i]==1) pos=i;
if (pos)
{
set_instruction(poly(s,s+5),1,'H');
return;
}
for (int i=1;i<5;i++)
if (s[i]>2&&s[i]-2==(2^i)) pos=i;
if (pos)
{
set_instruction(poly(s,s+5),2,val[pos-1]);
} else
{
set_instruction(poly(s,s+5),1,'H');
}
return;
}
set_instruction(poly(s,s+5),2,'H');
return;
}
for (int i=-2;i<=6;i++)
{
s[k]=i;
work(k+1);
}
}
void program_pulibot()
{
int mx=9;
work(0);
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 211ms
memory: 4228kb
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 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 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 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 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 0 0 0 0 ...
result:
wrong answer Too many steps
Subtask #2:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 202ms
memory: 4088kb
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 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 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 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 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 0 0 0 0 ...
result:
wrong answer Too many steps
Subtask #3:
score: 0
Wrong Answer
Test #28:
score: 0
Wrong Answer
time: 220ms
memory: 4228kb
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 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 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 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 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 0 0 0 0 ...
result:
wrong answer Too many steps
Subtask #4:
score: 0
Wrong Answer
Test #40:
score: 0
Wrong Answer
time: 211ms
memory: 4188kb
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 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 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 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 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 0 0 0 0 ...
result:
wrong answer Too many steps
Subtask #5:
score: 0
Skipped
Dependency #1:
0%