이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "robot.h"
#include "bits/stdc++.h"
using namespace std;
#define forR(i, x) for(int i = 0; i < (x); ++i)
#define REP(i, a, b) for(int i = (a); i < (b); ++i)
#define all(x) x.begin(), x.end()
#define asst(x) if(!(x)) exit(2)
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
void add_all(vector<vector<int>> S, int Z, char A) {
forR(a, S[0].size()) {
forR(b, S[1].size()) {
forR(c, S[2].size()) {
forR(d, S[3].size()) {
forR(e, S[4].size()) {
set_instruction({S[0][a], S[1][b], S[2][c], S[3][d], S[4][e]}, Z, A);
}
}
}
}
}
}
void program_pulibot()
{
vi ept = {0, 1};
vi any = {-2, 0, 1};
add_all({{0}, any, any, {0}, {-2}}, 1, 'E');
add_all({{0}, any, {0}, {-2}, any}, 1, 'S');
add_all({{0}, any, {-2}, {-2}, any}, 1, 'T');
}
컴파일 시 표준 에러 (stderr) 메시지
robot.cpp: In function 'void add_all(std::vector<std::vector<int> >, int, char)':
robot.cpp:4:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define forR(i, x) for(int i = 0; i < (x); ++i)
| ^
robot.cpp:15:5: note: in expansion of macro 'forR'
15 | forR(a, S[0].size()) {
| ^~~~
robot.cpp:4:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define forR(i, x) for(int i = 0; i < (x); ++i)
| ^
robot.cpp:16:9: note: in expansion of macro 'forR'
16 | forR(b, S[1].size()) {
| ^~~~
robot.cpp:4:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define forR(i, x) for(int i = 0; i < (x); ++i)
| ^
robot.cpp:17:13: note: in expansion of macro 'forR'
17 | forR(c, S[2].size()) {
| ^~~~
robot.cpp:4:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define forR(i, x) for(int i = 0; i < (x); ++i)
| ^
robot.cpp:18:17: note: in expansion of macro 'forR'
18 | forR(d, S[3].size()) {
| ^~~~
robot.cpp:4:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define forR(i, x) for(int i = 0; i < (x); ++i)
| ^
robot.cpp:19:21: note: in expansion of macro 'forR'
19 | forR(e, S[4].size()) {
| ^~~~
# | 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... |