Submission #1233595

#TimeUsernameProblemLanguageResultExecution timeMemory
123359512baaterHorses (IOI15_horses)C++20
17 / 100
15 ms4420 KiB
#include "horses.h"
#include <algorithm>

using namespace std;
typedef long long ll;

const ll MOD = 1E9 + 7;


int init(int N, int X[], int Y[]) {
    ll horses = 1;
    ll profit = 0;
    for (int i = 0; i < N; i++) {
        horses *= X[i];
        profit = max(profit, horses*Y[i] % MOD);
    }
	return static_cast<int>(profit);
}

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

int updateY(int pos, int val) {
	return 0;
}
#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...