제출 #135276

#제출 시각아이디문제언어결과실행 시간메모리
135276tinjyu말 (IOI15_horses)C++14
17 / 100
1576 ms12280 KiB
#include "horses.h" long long int n,x[1000005],y[1000005]; int init(int N, int X[], int Y[]) { n=N; for(int i=0;i<n;i++)x[i]=X[i]; for(int i=0;i<n;i++)y[i]=Y[i]; long long int tmp=1,ans=0; for(int i=0;i<n;i++) { tmp*=x[i]; if(tmp*y[i]>ans) { ans=tmp*y[i]; } } return ans%1000000007; } int updateX(int pos, int val) { x[pos]=val; long long int tmp=1,ans=0; for(int i=0;i<n;i++) { tmp*=x[i]; if(tmp*y[i]>ans) { ans=tmp*y[i]; } } return ans%1000000007; } int updateY(int pos, int val) { y[pos]=val; long long int tmp=1,ans=0; for(int i=0;i<n;i++) { tmp*=x[i]; if(tmp*y[i]>ans) { ans=tmp*y[i]; } } return ans%1000000007; }

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

horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:16:12: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
  return ans%1000000007;
         ~~~^~~~~~~~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:30:12: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
  return ans%1000000007;
         ~~~^~~~~~~~~~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:44:12: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
  return ans%1000000007;
         ~~~^~~~~~~~~~~
#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...