Submission #219603

#TimeUsernameProblemLanguageResultExecution timeMemory
219603mode149256말 (IOI15_horses)C++14
0 / 100
33 ms8312 KiB
/*input

*/
#include <bits/stdc++.h>
#include "horses.h"
using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef vector<pi> vpi;
typedef vector<vpi> vpii;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<pd> vpd;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef std::string str;
typedef std::vector<str> vs;

#define x first
#define y second
#define debug(...) cout<<"["<<#__VA_ARGS__<<": "<<__VA_ARGS__<<"]\n"

const int MOD = 1000000007;
const ll INF = std::numeric_limits<ll>::max();
const int MX = 100101;
const ld PI = 3.14159265358979323846264338327950288419716939937510582097494L;

template<typename T>
pair<T, T> operator+(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x + b.x, a.y + b.y); }
template<typename T>
pair<T, T> operator-(const pair<T, T> &a, const pair<T, T> &b) { return pair<T, T>(a.x - b.x, a.y - b.y); }
template<typename T>
T operator*(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.x + a.y * b.y); }
template<typename T>
T operator^(const pair<T, T> &a, const pair<T, T> &b) { return (a.x * b.y - a.y * b.x); }

template<typename T>
void print(vector<T> vec, string name = "") {
	cout << name;
	for (auto u : vec)
		cout << u << ' ';
	cout << '\n';
}

int init(int N, int X[], int Y[]) {
	ll ats = 0;
	ll curr = 1;
	for (int i = 0; i < N; ++i)
	{
		curr *= X[i];
		ats = max(ats, curr * Y[i]);
	}
	printf("ats = %d\n", ats);
	return (int)(ats % MOD);
}

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

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

Compilation message (stderr)

horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:65:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll {aka long long int}' [-Wformat=]
  printf("ats = %d\n", ats);
                          ^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:69:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateX(int pos, int val) {
                 ^~~
horses.cpp:69:26: warning: unused parameter 'val' [-Wunused-parameter]
 int updateX(int pos, int val) {
                          ^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:73:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateY(int pos, int val) {
                 ^~~
horses.cpp:73: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...