QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#179627#7123. Robot Contesttriple3210 1ms3852kbC++202.3kb2023-09-14 23:13:372024-04-28 07:48:35

Judging History

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

  • [2024-04-28 07:48:35]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:1ms
  • 内存:3852kb
  • [2024-04-21 00:25:53]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:1ms
  • 内存:3860kb
  • [2023-09-14 23:13:37]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3840kb
  • [2023-09-14 23:13:37]
  • 提交

answer

#include "robot.h"
#include <bits/stdc++.h>
#ifdef CYBER
#include "grader.cpp"
#endif

using namespace std;
#define lg long long

void fg(vector<lg> a, lg idx)
{
	if(idx == 5)
	{
		// cout << a[0] << ' ' << a[1] << ' ' << a[2] << ' ' << a[3] << ' ' << a[4] << ' ' << !(a[1] && a[2] && a[3] && a[4]) << ' ' << (char)(a[5]) << '\n';
		if(a[2] == -2 && a[3] == -2)	return;
		set_instruction({a[0], a[1], a[2], a[3], a[4]}, (a[1] && a[2] && a[3] && a[4] ? 2 : 1), (char)(a[5]));
		return;
	}
	if(!idx)
	{
		a[idx] = 1;
		fg(a, idx+1);
		a[idx] = 0;
		fg(a, idx+1);
		return;
	}
	if(a[idx] == -1)
	{
		fg(a, idx+1);
		a[idx] = -2;
		fg(a, idx+1);
		a[idx] = 1;
		fg(a, idx+1);
		a[idx] = 2;
		fg(a, idx+1);
		a[idx] = -1;
	}
	else if(a[idx] == -3)
	{
		a[idx] = -1;
		fg(a, idx+1);
		a[idx] = -2;
		fg(a, idx+1);
		a[idx] = 2;
		fg(a, idx+1);
		a[idx] = -3;
	}
	else	fg(a, idx+1);
	return;
}

void program_pulibot()
{
	vector<vector<lg>> v;
	v.push_back({0, 0, 0, 0, 0, 'E'});
	
	v.push_back({0, 0, 0, 0, -1, 'E'});
	v.push_back({0, 0, -1, 0, 0, 'E'});
	v.push_back({0, -1, 0, 0, 0, 'E'});
	v.push_back({0, 0, 0, -1, 0, 'S'});
	
	v.push_back({0, -1, 0, 0, -1, 'E'});
	v.push_back({0, -1, -1, 0, 0, 'E'});
	v.push_back({0, -1, 0, -1, 0, 'S'});
	v.push_back({0, 0, -1, 0, -1, 'E'});
	v.push_back({0, 0, -1, -1, 0, 'N'});
	v.push_back({0, 0, 0, -1, -1, 'S'});
	
	v.push_back({0, -1, -1, -1, 0, 'N'});
	v.push_back({0, -1, -1, 0, -1, 'E'});
	v.push_back({0, -1, 0, -1, -1, 'S'});
	v.push_back({0, 0, -1, -1, -1, 'W'});
	
	v.push_back({0, 1, -3, -3, -3, 'W'});
	v.push_back({0, -3, 1, -3, -3, 'S'});
	v.push_back({0, -3, -3, 1, -3, 'E'});
	v.push_back({0, -3, -3, -3, 1, 'N'});
	v.push_back({0, 2, -3, -3, -3, 'W'});
	v.push_back({0, -3, 2, -3, -3, 'S'});
	v.push_back({0, -3, -3, 2, -3, 'E'});
	v.push_back({0, -3, -3, -3, 2, 'N'});
	
	
	for(int i = 0; i < v.size(); i++)
	{
		fg(v[i], 0);
	}
    
	set_instruction({0, 1, -2, -2, -2}, 1, 'T');
	set_instruction({0, 1, -2, -2, -1}, 1, 'T');
	set_instruction({0, 1, -2, -2, 1}, 1, 'T');
	set_instruction({0, 1, -2, -2, 0}, 1, 'T');
	set_instruction({0, 0, -2, -2, 1}, 1, 'T');
	set_instruction({0, -1, -2, -2, 1}, 1, 'T');
	set_instruction({0, -2, -2, -2, 1}, 1, 'T');
}
/*
6 6
0 0 0 0 0 0
1 1 1 0 1 0
0 0 0 0 1 0
0 1 1 1 1 1
0 1 1 1 1 1
0 0 0 0 0 0
*/

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3848kb

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
Same state array

result:

wrong answer Same state array

Subtask #2:

score: 0
Wrong Answer

Test #9:

score: 0
Wrong Answer
time: 0ms
memory: 3552kb

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
Same state array

result:

wrong answer Same state array

Subtask #3:

score: 0
Wrong Answer

Test #28:

score: 0
Wrong Answer
time: 1ms
memory: 3656kb

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
Same state array

result:

wrong answer Same state array

Subtask #4:

score: 0
Wrong Answer

Test #40:

score: 0
Wrong Answer
time: 1ms
memory: 3852kb

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
Same state array

result:

wrong answer Same state array

Subtask #5:

score: 0
Wrong Answer

Test #64:

score: 0
Wrong Answer
time: 0ms
memory: 3716kb

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
Same state array

result:

wrong answer Same state array