제출 #291473

#제출 시각아이디문제언어결과실행 시간메모리
291473cig32Game (IOI13_game)C++14
컴파일 에러
0 ms0 KiB
#include "game.h" #include <bits/stdc++.h> #define ll long long using namespace std; int grid[1000][1000]; void init(int R,int C){ for(int i=0;i<R;i++){ for(int j=0;j<C;j++){ grid[i][j]=0; } } } void update(int P,int Q,long long K){ grid[P][Q]=K; } long long calculate(int P,int Q,int U,int V){ ll GCD=grid[P][Q]; for(int i=P;i<=U;i++){ for(int j=Q;j<=V;j++){ if(grid[i][j]!=0) GCD=gcd2(GCD,grid[i][j]); } } return GCD; }

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

grader.c: In function 'int main()':
grader.c:25:5: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   25 |     while(res != 1);
      |     ^~~~~
grader.c:26:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
   26 |  res = fscanf(f, "%d", &C);
      |  ^~~
grader.c:27:5: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   27 |     while(res != 1);
      |     ^~~~~
grader.c:28:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
   28 |  res = fscanf(f, "%d", &N);
      |  ^~~
game.cpp: In function 'long long int calculate(int, int, int, int)':
game.cpp:20:35: error: 'gcd2' was not declared in this scope
   20 |             if(grid[i][j]!=0) GCD=gcd2(GCD,grid[i][j]);
      |                                   ^~~~