제출 #1188868

#제출 시각아이디문제언어결과실행 시간메모리
1188868pensive말 (IOI15_horses)C++20
컴파일 에러
0 ms0 KiB
#include <iostream> #include <algorithm> using namespace std; #define REP(a,i,n) for (ll i=a;i<n;i++) #define ll long long #define ssize 500'000 const ll MOD = 10e9+7; int N; ll X[ssize], Y[ssize]; ll solve() { ll mx=0, hNum=1; REP(0,i,N) { hNum = (hNum X[i])%MOD; mx = max(mx, hNum*Y[i])%MOD; } return mx; } ll init(int n, ll x[], ll y[]) { N = n; REP(0,i,n) { X[i] = x[i]; Y[i] = y[i]; } return solve(); } ll updateX(int pos, ll val) { X[pos] = val; return solve(); } ll updateY(int pos, ll val) { Y[pos] = val; return solve(); }

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

horses.cpp: In function 'long long int solve()':
horses.cpp:16:21: error: expected ')' before 'X'
   16 |         hNum = (hNum X[i])%MOD;
      |                ~    ^~
      |                     )