#include "robot.h"
void program_pulibot()
{
//set_instruction({0, -2, -1, 0, -2}, 1, 'E');
//set_instruction({0, 1, -1, 0, -2}, 1, 'E');
//set_instruction({0, 1, 0, -2, -2}, 1, 'S');
//set_instruction({0, -1, -2, -2, 1}, 1, 'T');
set_instruction({0,-2,0,0,-2},1,'E');
set_instruction({0,-2,-1,0,-2},1,'E');
set_instruction({0,-2,0,-1,-2},1,'S');
set_instruction({0,1,0,0,-2},1,'E');
set_instruction({0,1,-1,0,-2},1,'E');
set_instruction({0,1,0,-1,-2},1,'S');
set_instruction({0,1,0,-2,-2},1,'S');
for(int f1=-2;f1<=1;f1++)
{
for(int f2=-1;f2<=1;f2++)
{
set_instruction({0,f1,-2,0,f2},1,'E');
}
}
///set_instruction({0,(1/0/-1/-2),-2,0,(0/1/-1)},1,'E');
for(int f1=-1;f1<=1;f1++)
{
for(int f2=-1;f2<=1;f2++)
{
set_instruction({0,(1/0/-1),-2,-2,(1/0/-1)},1,'T');
}
}
///set_instruction({0,(1/0/-1),-2,-2,(1/0/-1)},1,'T');
//set_instruction({0,1,0,0,-2},1,'E');
//set_instruction({0,1,0,-2,-2},1,'S');
//set_instruction({0,0,0,-2,1},1,'S');
//set_instruction({0,0,-2,-2,1},1,'T');
}
컴파일 시 표준 에러 (stderr) 메시지
robot.cpp: In function 'void program_pulibot()':
robot.cpp:32:34: warning: division by zero [-Wdiv-by-zero]
32 | set_instruction({0,(1/0/-1),-2,-2,(1/0/-1)},1,'T');
| ~^~
robot.cpp:32:49: warning: division by zero [-Wdiv-by-zero]
32 | set_instruction({0,(1/0/-1),-2,-2,(1/0/-1)},1,'T');
| ~^~| # | 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... |