Submission #420185

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4201852021-06-08 07:24:31Aldas25Horses (IOI15_horses)C++14
77 / 100
1570 ms33924 KiB
#include "horses.h"
#include <bits/stdc++.h>
using namespace std;
#define FAST_IO ios_base::sync_with_stdio(0); cin.tie(nullptr)
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define REP(n) FOR(O, 1, (n))
#define f first
#define s second
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<ll> vl;
const int MAXN = 500100;
const ll MOD = 1e9+7;
ll pwr (ll a, ll p) {
if (p == 0) return 1;
if (p == 1) return a%MOD;
ll ret = pwr(a, p/2);
ret = (ret*ret)%MOD;
if (p%2 == 1) ret = (ret*(a%MOD))%MOD;
return ret%MOD;
}
ll modInv (ll a) {
return pwr(a%MOD, MOD-2);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

horses.cpp: In function 'll getMax()':
horses.cpp:148:31: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
  148 |             int mxId = getMaxY(i, le);
      |                        ~~~~~~~^~~~~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:178:15: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
  178 |  return getMax();
      |         ~~~~~~^~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:189:15: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
  189 |  return getMax();
      |         ~~~~~~^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:196:15: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
  196 |  return getMax();
      |         ~~~~~~^~
#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...