제출 #1004794

#제출 시각아이디문제언어결과실행 시간메모리
1004794magikarp23말 (IOI15_horses)C++17
17 / 100
21 ms8276 KiB
#include <bits/stdc++.h>
#include "horses.h"
using namespace std;

const int MAX_N = 500000 + 1;
long long MOD = 1000000000 + 7;
int memo[MAX_N];


int init(int N, int X[], int Y[]) {
	long long max_profit = 0;
	long long num_horses = 1;
	for (int i=0; i<N; i++) {
		num_horses *= X[i];
		max_profit = max(max_profit, num_horses * Y[i]);
	}
	return max_profit;
}

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

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

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

horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:17:9: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   17 |  return max_profit;
      |         ^~~~~~~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:20:17: warning: unused parameter 'pos' [-Wunused-parameter]
   20 | int updateX(int pos, int val) {
      |             ~~~~^~~
horses.cpp:20:26: warning: unused parameter 'val' [-Wunused-parameter]
   20 | int updateX(int pos, int val) {
      |                      ~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:24:17: warning: unused parameter 'pos' [-Wunused-parameter]
   24 | int updateY(int pos, int val) {
      |             ~~~~^~~
horses.cpp:24:26: warning: unused parameter 'val' [-Wunused-parameter]
   24 | 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...