QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#179803#7123. Robot ContestLynkcat0 200ms4528kbC++203.8kb2023-09-15 09:25:422024-04-28 07:48:40

Judging History

你现在查看的是最新测评结果

  • [2024-04-28 07:48:40]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:200ms
  • 内存:4528kb
  • [2024-04-21 00:25:54]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:195ms
  • 内存:4536kb
  • [2023-09-15 09:25:42]
  • 评测
  • 测评结果:0
  • 用时:220ms
  • 内存:4228kb
  • [2023-09-15 09:25:42]
  • 提交

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: 200ms
memory: 4296kb

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: 187ms
memory: 4164kb

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: 194ms
memory: 4240kb

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: 196ms
memory: 4304kb

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
Wrong Answer

Test #64:

score: 0
Wrong Answer
time: 197ms
memory: 4528kb

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
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
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