제출 #851985

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8519852023-09-21 03:27:00ntkphong말 (IOI15_horses)C++14
100 / 100
590 ms54772 KiB
#include "horses.h"
#include <bits/stdc++.h>
using namespace std;
const int lim = 1e9;
const int mod = 1e9 + 7;
const int mxN = 5e5 + 10;
int n;
int aX[mxN], aY[mxN];
pair<int, int> ST[mxN << 2];
map<int, int> mp;
void update(int node, int l, int r, int x) {
if(r < x || x < l) return ;
if(l == r) {
ST[node].first = aX[l];
ST[node].second = aY[l];
return ;
}
int mid = (l + r) / 2;
update(node * 2, l, mid, x);
update(node * 2 + 1, mid + 1, r, x);
ST[node].first = 1LL * ST[node * 2].first * ST[node * 2 + 1].first % mod;
ST[node].second = max(ST[node * 2].second, ST[node * 2 + 1].second);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

horses.cpp: In function 'void update(int, int, int, int)':
horses.cpp:27:72: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   27 |     ST[node].first = 1LL * ST[node * 2].first * ST[node * 2 + 1].first % mod;
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int get_mul(int, int, int, int)':
horses.cpp:39:80: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   39 |         return 1LL * ST[node * 2].first * get_mul(node * 2 + 1, mid + 1, r, x) % mod;
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int find_max()':
horses.cpp:56:61: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   56 |     int res = 1LL * get_mul(1, 0, n - 1, n - 1) * aY[n - 1] % mod;
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp:75:57: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   75 |                 res = 1LL * get_mul(1, 0, n - 1, l) * x % mod;
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
#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...