QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#531348#7123. Robot Contestgreen_gold_dog#24 330ms7632kbC++202.0kb2024-08-24 20:06:372024-08-24 20:06:38

Judging History

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

  • [2024-08-24 20:06:38]
  • 评测
  • 测评结果:24
  • 用时:330ms
  • 内存:7632kb
  • [2024-08-24 20:06:37]
  • 提交

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 = 'W';
							}
							if (lp == 1) {
								go = 'S';
							}
							if (lp == 2) {
								go = 'E';
							}
							if (lp == 3) {
								go = 'N';
							}
							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 == 4) {
								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');
								}
							}
						}
					}
				}
			}
		}
	}
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 6
Accepted

Test #1:

score: 6
Accepted
time: 293ms
memory: 7340kb

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:

ok 

Test #2:

score: 6
Accepted
time: 310ms
memory: 7284kb

input:

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

ok 

Test #5:

score: 6
Accepted
time: 308ms
memory: 7440kb

input:

2 3
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:

ok 

Test #6:

score: 6
Accepted
time: 308ms
memory: 7632kb

input:

2 4
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:

ok 

Test #7:

score: 6
Accepted
time: 306ms
memory: 7396kb

input:

2 10
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:

ok 

Test #8:

score: 6
Accepted
time: 299ms
memory: 7380kb

input:

2 15
0 0 0 0 0 0 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:

ok 

Subtask #2:

score: 0
Wrong Answer

Test #9:

score: 10
Accepted
time: 313ms
memory: 7572kb

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:

ok 

Test #10:

score: 10
Accepted
time: 305ms
memory: 7336kb

input:

2 10
0 1 1 1 1 0 0 0 0 0
0 0 0 0 0 0 1 1 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:

ok 

Test #11:

score: 5
Acceptable Answer
time: 294ms
memory: 7332kb

input:

2 15
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 1 1 1 1 0 1 0 0 1 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:

points 0.50

Test #12:

score: 0
Wrong Answer
time: 330ms
memory: 7360kb

input:

2 15
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
1 1 1 0 1 0 0 0 0 1 1 1 1 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 Not a path

Subtask #3:

score: 18
Accepted

Test #28:

score: 18
Accepted
time: 306ms
memory: 7404kb

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:

ok 

Test #29:

score: 18
Accepted
time: 310ms
memory: 7576kb

input:

15 15
0 0 0 0 0 0 0 0 0 1 1 1 1 1 1
1 1 1 1 1 1 1 1 0 0 0 0 0 1 1
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1 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:

ok 

Test #36:

score: 18
Accepted
time: 303ms
memory: 7404kb

input:

15 15
0 0 0 1 0 0 0 1 0 0 1 0 0 1 0
0 1 1 0 0 1 0 1 0 1 0 1 0 1 0
0 1 0 1 1 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 1 1 1 0 1 0 1 1 0
0 1 0 1 0 1 0 0 0 0 1 1 0 1 1
0 1 0 1 0 0 1 1 1 0 0 0 0 0 0
0 0 1 0 0 1 1 0 1 0 1 1 1 0 1
0 1 0 0 1 1 0 0 0 0 0 0 0 1 0
0 1 1 0 0 0 1 0 1 0 1 0 1 0 0
0 0 0 0 1 0 0 1 0 0 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:

ok 

Test #37:

score: 18
Accepted
time: 312ms
memory: 7392kb

input:

15 15
0 1 0 0 1 0 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0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
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:

ok 

Test #39:

score: 18
Accepted
time: 315ms
memory: 7436kb

input:

15 15
0 0 1 0 0 0 0 0 0 0 1 0 1 0 0
1 0 0 0 1 1 0 1 1 0 1 0 1 0 1
1 0 1 1 0 0 1 0 0 1 0 0 1 0 0
0 0 0 0 0 1 0 1 0 1 0 1 1 0 1
0 1 0 1 1 0 0 0 0 1 0 1 0 0 0
0 0 1 1 1 0 1 0 1 0 0 1 0 1 0
0 1 0 1 0 0 0 1 1 1 0 0 0 0 1
0 0 0 0 0 1 0 0 1 0 0 1 1 0 0
0 1 1 0 1 1 1 0 0 1 0 0 0 1 0
0 1 0 0 0 1 1 1 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:

ok 

Subtask #4:

score: 0
Wrong Answer

Test #40:

score: 0
Wrong Answer
time: 309ms
memory: 7288kb

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