제출 #132315

#제출 시각아이디문제언어결과실행 시간메모리
132315ioilolcom말 (IOI15_horses)C++14
0 / 100
29 ms6136 KiB
#include "horses.h" #include <bits/stdc++.h> using namespace std; int n; const int mod=1000000007; const int NN=20; const int M=1015; int dp[NN][M]; /* int solve(int day,int horses, int X[], int Y[]){ if(day==n || horses==0) { return 0; } if(dp[day][horses]!=-1) { return dp[day][horses]; } horses=horses*X[day]; int ans=0; for(int tosell=0; tosell<=horses; tosell++) { ans=max(ans,solve(day+1,horses-tosell,X,Y)+tosell*Y[day]); } ans%=mod; return dp[day][horses]=ans; } */ int init(int N, int X[], int Y[]) { n=N; //memset(dp,-1,sizeof dp); //int ans=solve(0,1,X,Y); int ans=1; for(int i=0; i<N; i++) { ans=ans*X[i]; ans%=mod; } ans*=Y[N-1]; return ans; } int updateX(int pos, int val) { return 0; } int updateY(int pos, int val) { return 0; }

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

horses.cpp: In function 'int updateX(int, int)':
horses.cpp:39:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateX(int pos, int val) {
                 ^~~
horses.cpp:39:26: warning: unused parameter 'val' [-Wunused-parameter]
 int updateX(int pos, int val) {
                          ^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:43:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateY(int pos, int val) {
                 ^~~
horses.cpp:43:26: warning: unused parameter 'val' [-Wunused-parameter]
 int updateY(int pos, int val) {
                          ^~~
#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...