QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#315388#8168. Spacecraftucup-team1876#Compile Error//C++236.2kb2024-01-27 12:57:032024-01-27 12:57:03

详细

answer.code:220:2: error: #error 
  220 | #error
      |  ^~~~~
answer.code:24:17: error: ‘Point’ does not name a type
   24 |         using P=Point;
      |                 ^~~~~
answer.code:26:30: error: ‘P’ has not been declared
   26 | #define C(O) bool operator O(P p) const { return tie(x,y) O tie(p.x,p.y); }
      |                              ^
answer.code:27:9: note: in expansion of macro ‘C’
   27 |         C(<) C(==)
      |         ^
answer.code:26:30: error: ‘P’ has not been declared
   26 | #define C(O) bool operator O(P p) const { return tie(x,y) O tie(p.x,p.y); }
      |                              ^
answer.code:27:14: note: in expansion of macro ‘C’
   27 |         C(<) C(==)
      |              ^
answer.code:29:9: error: ‘P’ does not name a type; did you mean ‘P2’?
   29 |         P operator+(P p) const { return P{x+p.x, y+p.y}; }
      |         ^
      |         P2
answer.code:30:9: error: ‘P’ does not name a type; did you mean ‘P2’?
   30 |         P operator-(P p) const { return P{x-p.x, y-p.y}; }
      |         ^
      |         P2
answer.code:31:9: error: ‘P’ does not name a type; did you mean ‘P2’?
   31 |         P operator*(T d) const { return P{x*d, y*d}; }
      |         ^
      |         P2
answer.code:32:9: error: ‘P’ does not name a type; did you mean ‘P2’?
   32 |         P operator/(T d) const { return P{x/d, y/d}; }
      |         ^
      |         P2
answer.code:33:15: error: ‘P’ has not been declared
   33 |         T dot(P p) const { return x*p.x + y*p.y; }
      |               ^
answer.code:34:17: error: ‘P’ has not been declared
   34 |         T cross(P p) const { return x*p.y - y*p.x; }
      |                 ^
answer.code:35:17: error: ‘P’ has not been declared
   35 |         T cross(P a, P b) const { return (a-*this).cross(b-*this); }
      |                 ^
answer.code:35:22: error: ‘P’ has not been declared
   35 |         T cross(P a, P b) const { return (a-*this).cross(b-*this); }
      |                      ^
answer.code:36:37: error: ‘P’ has not been declared
   36 |         tuple<bool, T, T> decompose(P a, P b) const {
      |                                     ^
answer.code:36:42: error: ‘P’ has not been declared
   36 |         tuple<bool, T, T> decompose(P a, P b) const {
      |                                          ^
answer.code:44:9: error: ‘P’ does not name a type; did you mean ‘P2’?
   44 |         P perp() const { return P{-y, x}; } // rotates 90 degrees ccw
      |         ^
      |         P2
answer.code:46:9: error: ‘P’ does not name a type; did you mean ‘P2’?
   46 |         P rotate(double a) const {
      |         ^
      |         P2
answer.code:48:49: error: ‘P’ has not been declared
   48 |         friend ostream& operator<<(ostream& os, P p) {
      |                                                 ^
answer.code: In member function ‘bool P2::operator<(int) const’:
answer.code:26:67: error: request for member ‘x’ in ‘p’, which is of non-class type ‘int’
   26 | #define C(O) bool operator O(P p) const { return tie(x,y) O tie(p.x,p.y); }
      |                                                                   ^
answer.code:27:9: note: in expansion of macro ‘C’
   27 |         C(<) C(==)
      |         ^
answer.code:26:71: error: request for member ‘y’ in ‘p’, which is of non-class type ‘int’
   26 | #define C(O) bool operator O(P p) const { return tie(x,y) O tie(p.x,p.y); }
      |                                                                       ^
answer.code:27:9: note: in expansion of macro ‘C’
   27 |         C(<) C(==)
      |         ^
answer.code: In member function ‘bool P2::operator==(int) const’:
answer.code:26:67: error: request for member ‘x’ in ‘p’, which is of non-class type ‘int’
   26 | #define C(O) bool operator O(P p) const { return tie(x,y) O tie(p.x,p.y); }
      |                                                                   ^
answer.code:27:14: note: in expansion of macro ‘C’
   27 |         C(<) C(==)
      |              ^
answer.code:26:71: error: request for member ‘y’ in ‘p’, which is of non-class type ‘int’
   26 | #define C(O) bool operator O(P p) const { return tie(x,y) O tie(p.x,p.y); }
      |                                                                       ^
answer.code:27:14: note: in expansion of macro ‘C’
   27 |         C(<) C(==)
      |              ^
answer.code: In member function ‘T P2::dot(int) const’:
answer.code:33:39: error: request for member ‘x’ in ‘p’, which is of non-class type ‘int’
   33 |         T dot(P p) const { return x*p.x + y*p.y; }
      |                                       ^
answer.code:33:47: error: request for member ‘y’ in ‘p’, which is of non-class type ‘int’
   33 |         T dot(P p) const { return x*p.x + y*p.y; }
      |                                               ^
answer.code: In member function ‘T P2::cross(int) const’:
answer.code:34:41: error: request for member ‘y’ in ‘p’, which is of non-class type ‘int’
   34 |         T cross(P p...