# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1027453 | LIF | Robot Contest (IOI23_robot) | C++17 | 112 ms | 6044 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "robot.h"
#include<bits/stdc++.h>
using namespace std;
enum state
{
Start, //當在起點,且已經存在1,代表已經回到起點
Extent, //如果存在0時向四周擴展
Back, //如果不存在0時,代表應返回
End, //-2 -2
Clear, //無路可走時,正式clear,返回到1和4;
Clear_extent, //當周圍存在4時,去找2
};
class robot
{
public:
state robot_state;
vector<int> S;
robot(){return;}
robot(vector<int> _S)//init;
{
S = _S;
if(S[2] == -2 && S[3] == -2)
{
robot_state = state::End;
return;
}
for(int i=0;i<5;i++)
{
if(S[i] == 1 || S[i] == 4) // 周圍存在4;
{
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |