제출 #97884

#제출 시각아이디문제언어결과실행 시간메모리
97884someone_aa말 (IOI15_horses)C++17
17 / 100
23 ms13816 KiB
#include "horses.h" #include <bits/stdc++.h> #define ll long long using namespace std; const int maxn = 100100; const ll mod = 1e9 + 7; ll x[maxn], y[maxn], n; int solve() { ll h = 1LL; ll result = 0LL; for(int i=0;i<n;i++) { h *= x[i]; h %= mod; ll temp = (h * y[i]) % mod; result = max(result, temp); } return result; } int init(int N, int X[], int Y[]) { n = N; for(int i=0;i<N;i++) { x[i] = X[i]; y[i] = Y[i]; } return solve(); } int updateX(int pos, int val) { x[pos] = val; return solve(); } int updateY(int pos, int val) { y[pos] = val; return solve(); }

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

horses.cpp: In function 'int solve()':
horses.cpp:18:12: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
     return result;
            ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...