Submission #120606

#TimeUsernameProblemLanguageResultExecution timeMemory
120606khulegubHorses (IOI15_horses)C++14
0 / 100
27 ms6656 KiB
#include "horses.h"
#include<bits/stdc++.h>
#define ll(x) x*2+1
#define rr(x) x*2+2

using namespace std;
typedef long long i64;
int mod = 1e9 + 7;

// vector<i64> st;
vector<int> arr;
int n;
// void build(int l, int r, int node){
// 	if(l == r){
// 		st[node] = arr[l];
// 		return ;
// 	}
// 	int mid = (l + r) >> 1;
// 	build(l, mid, ll(node));
// 	build(mid+1, rr, rr(node));
// 	st[node] = max(st[ll(node)], st[rr(node)]);
// }

// i64 query(int l, int r, )
// void update(int pos, int val, int l, int r, int node){

// }






int init(int N, int X[], int Y[]) {
	n=N;
	int mx=1;
	arr.resize(N);
	for(int i = 0; i < N; i++){
		arr[i] = Y[i];
		if(i > 0) arr[i] *= arr[i-1];
		// cout << arr[i] << ' ';
		mx = max(mx, X[i] * arr[i]);
	}
	// st.resize(4*N);
	// build(0, N-1, 0);
	return mx;
}

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

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

Compilation message (stderr)

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