Submission #988709

# Submission time Handle Problem Language Result Execution time Memory
988709 2024-05-25T16:39:00 Z bigo Horses (IOI15_horses) C++14
0 / 100
12 ms 8460 KB
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <utility>
using namespace std;
#define all(a) a.begin(), a.end()
#define rep(i,s,e) for(ll i=s;i<e;i++)
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
const ll INF = 1e18;
typedef complex<double> cd;
const double pi = acos(-1);
const int mod = 1e9 + 7;
const ll mod1 = 1e9 + 9;
const ll mod2 = 998244353;
const ll mac = 31;
const int MAXN = 4e5 + 2;
typedef vector<int> vi;
typedef vector<vi> vvi;
vi x, y;
int n;
int init(int N, int X[], int Y[]) {
	n = N;
	rep(i, 0, n) x[i] = X[i], y[i] = Y[i];
	int ans = 1, cef = 1;
	rep(i, 0, n) {
		cef *= x[i];
		cef %= mod;
		ans = max(ans, (cef * y[i])%mod);
	}
	return ans;
}

int updateX(int pos, int val) {
	x[pos] = val;
	int ans = 1, cef = 1;
	rep(i, 0, n) {
		cef *= x[i];
		cef %= mod;
		ans = max(ans, (cef * y[i]) % mod);
	}
	return ans;
}

int updateY(int pos, int val) {
	y[pos] = val;
	int ans = 1, cef = 1;
	rep(i, 0, n) {
		cef *= x[i];
		cef %= mod;
		ans = max(ans, (cef * y[i]) % mod);
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 12 ms 8460 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -