답안 #672317

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
672317 2022-12-15T13:51:57 Z Trisanu_Das 말 (IOI15_horses) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007

int init(int n, int x[], int y[]){
  int ans = 0, hrspr = 1;
  for(int i = 0; i < n; i++){
    h *= x[i];
    (ans = max(ans, h * y[i])) %= MOD;
  }
  return ans;
}

int updateX(int pos, int val){return 0;}
int updateY(int pos, int val){return 0;}

Compilation message

horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:8:5: error: 'h' was not declared in this scope
    8 |     h *= x[i];
      |     ^
horses.cpp:6:16: warning: unused variable 'hrspr' [-Wunused-variable]
    6 |   int ans = 0, hrspr = 1;
      |                ^~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:14:17: warning: unused parameter 'pos' [-Wunused-parameter]
   14 | int updateX(int pos, int val){return 0;}
      |             ~~~~^~~
horses.cpp:14:26: warning: unused parameter 'val' [-Wunused-parameter]
   14 | int updateX(int pos, int val){return 0;}
      |                      ~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:15:17: warning: unused parameter 'pos' [-Wunused-parameter]
   15 | int updateY(int pos, int val){return 0;}
      |             ~~~~^~~
horses.cpp:15:26: warning: unused parameter 'val' [-Wunused-parameter]
   15 | int updateY(int pos, int val){return 0;}
      |                      ~~~~^~~