QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#369402#6324. Expanded Hullucup-team864Compile Error//C++177.2kb2024-03-28 07:27:172024-03-28 07:27:19

Details

answer.code:149:35: error: return type ‘P’ {aka ‘struct std::array<int, 3>’} is incomplete
  149 | P operator-(const P& A, const P& B){
      |                                   ^
answer.code: In function ‘void operator-(const P&, const P&)’:
answer.code:150:18: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  150 |         return {A[0] - B[0], A[1] - B[1], A[2] - B[2]};
      |                  ^
answer.code:150:25: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  150 |         return {A[0] - B[0], A[1] - B[1], A[2] - B[2]};
      |                         ^
answer.code:150:31: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  150 |         return {A[0] - B[0], A[1] - B[1], A[2] - B[2]};
      |                               ^
answer.code:150:38: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  150 |         return {A[0] - B[0], A[1] - B[1], A[2] - B[2]};
      |                                      ^
answer.code:150:44: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  150 |         return {A[0] - B[0], A[1] - B[1], A[2] - B[2]};
      |                                            ^
answer.code:150:51: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  150 |         return {A[0] - B[0], A[1] - B[1], A[2] - B[2]};
      |                                                   ^
answer.code: At global scope:
answer.code:152:31: error: return type ‘P’ {aka ‘struct std::array<int, 3>’} is incomplete
  152 | P Cross(const P& A, const P& B){
      |                               ^
answer.code: In function ‘void Cross(const P&, const P&)’:
answer.code:153:18: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                  ^
answer.code:153:25: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                         ^
answer.code:153:32: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                                ^
answer.code:153:39: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                                       ^
answer.code:153:45: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                                             ^
answer.code:153:52: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                                                    ^
answer.code:153:59: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                                                           ^
answer.code:153:66: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                                                                  ^
answer.code:153:72: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                                                                        ^
answer.code:153:79: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * B[2], A[0] * B[1] - A[1]*  B[0]};
      |                                                                               ^
answer.code:153:86: error: no match for ‘operator[]’ (operand types are ‘const P’ {aka ‘const std::array<int, 3>’} and ‘int’)
  153 |         return {A[1] * B[2] - A[2] * B[1], A[2] * B[0] - A[0] * ...