제출 #229584

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
2295842020-05-05 09:01:33Haunted_Cpp게임 (IOI13_game)C++17
컴파일 에러
0 ms0 KiB
#include "game.h"
#include <iostream>
using namespace std;
long long gcd2(long long X, long long Y) {
long long tmp;
while (X != Y && Y != 0) {
tmp = X;
X = Y;
Y = tmp % Y;
}
return X;
}
struct Seg {
Seg *l, *r;
long long sum;
Seg () {
l = r = nullptr;
sum = 0;
}
};
struct Node {
Node *l, *r;
Seg *segmentTree;
long long sum;
Node () {
l = r = nullptr;
sum = 0;
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

grader.c: In function 'int main()':
grader.c:18:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
  int res;
      ^~~
game.cpp: In function 'void update_linha(Node*&, int, int, int, long long int, int)':
game.cpp:72:89: error: cannot convert 'bool' to 'Seg*' for argument '6' to 'void update_coluna(Seg*&, int, int, int, long long int, Seg*, Seg*)'
     update_coluna (cur -> segmentTree, 0, _C - 1, coluna, delta, false, nullptr, nullptr);
                                                                                         ^
game.cpp:85:164: error: cannot convert 'bool' to 'Seg*' for argument '6' to 'void update_coluna(Seg*&, int, int, int, long long int, Seg*, Seg*)'
   update_coluna (cur -> segmentTree, 0, _C - 1, coluna, delta, true, (cur -> l ? cur -> l -> segmentTree: nullptr), (cur -> r ? cur -> r -> segmentTree : nullptr) );
                                                                                                                                                                    ^