Submission #623762

#TimeUsernameProblemLanguageResultExecution timeMemory
623762iomoon191산악 구조대 (JOI13_mountain)C++17
Compilation error
0 ms0 KiB
#include <grader.h> #include <bits/stdc++.h> using namespace sstd; int x_; void sub(x1, x2, y1, y2, cx, cy, dx, dy){ while(x1 <= cx and cx <= x2 and y1 <= cy and cy <= y2){ int h = Measure(cx, cy); if(h == x_){ Pinpoint(cx, cy); } else if(h < x_) cx += dx; else cy += dy; } } void Rescue(int r, int c, int rs, int cs, int x){ _x = x; sub(1, rs, 1, cs, 1, cs, 1, -1); sub(rs, r, 1, cs, r, cs, -1, -1); sub(1, rs, cs, c, 1, cs, 1, 1); sub(rs, r, cs, c, r, cs, -1, 1); }

Compilation message (stderr)

mountain.cpp:3:17: error: 'sstd' is not a namespace-name
    3 | using namespace sstd;
      |                 ^~~~
mountain.cpp:7:6: error: variable or field 'sub' declared void
    7 | void sub(x1, x2, y1, y2, cx, cy, dx, dy){
      |      ^~~
mountain.cpp:7:10: error: 'x1' was not declared in this scope; did you mean 'x_'?
    7 | void sub(x1, x2, y1, y2, cx, cy, dx, dy){
      |          ^~
      |          x_
mountain.cpp:7:14: error: 'x2' was not declared in this scope; did you mean 'x_'?
    7 | void sub(x1, x2, y1, y2, cx, cy, dx, dy){
      |              ^~
      |              x_
mountain.cpp:7:22: error: 'y2' was not declared in this scope; did you mean 'yn'?
    7 | void sub(x1, x2, y1, y2, cx, cy, dx, dy){
      |                      ^~
      |                      yn
mountain.cpp:7:26: error: 'cx' was not declared in this scope
    7 | void sub(x1, x2, y1, y2, cx, cy, dx, dy){
      |                          ^~
mountain.cpp:7:30: error: 'cy' was not declared in this scope
    7 | void sub(x1, x2, y1, y2, cx, cy, dx, dy){
      |                              ^~
mountain.cpp:7:34: error: 'dx' was not declared in this scope
    7 | void sub(x1, x2, y1, y2, cx, cy, dx, dy){
      |                                  ^~
mountain.cpp:7:38: error: 'dy' was not declared in this scope
    7 | void sub(x1, x2, y1, y2, cx, cy, dx, dy){
      |                                      ^~
mountain.cpp: In function 'void Rescue(int, int, int, int, int)':
mountain.cpp:19:2: error: '_x' was not declared in this scope; did you mean 'x'?
   19 |  _x = x;
      |  ^~
      |  x
mountain.cpp:20:2: error: 'sub' was not declared in this scope; did you mean 'fsub'?
   20 |  sub(1, rs, 1, cs, 1, cs, 1, -1);
      |  ^~~
      |  fsub