Submission #1004426

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10044262024-06-21 08:50:20HasanV11010238Horses (IOI15_horses)C++17
0 / 100
43 ms31772 KiB
#include "horses.h"
#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
int n;
vector<ll> x, y, tr;
void build(int v, int l, int r){
if (l == r){
tr[v] = x[l];
return;
}
int mid = (l + r) / 2;
build(v * 2, l, mid);
build(v * 2 + 1, mid + 1, r);
tr[v] = (tr[v * 2] * tr[v * 2 + 1]) % mod;
}
void update(int v, int l, int r, int pos, ll val){
if (l == r){
tr[v] = val;
}
else{
int mid = (l + r) / 2;
if (pos <= mid){
update(v * 2, l, mid, pos, val);
}
else{
update(v * 2 + 1, mid + 1, r, pos, val);
}
tr[v] = (tr[v * 2] * tr[v * 2 + 1]) % mod;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

horses.cpp: In function 'long long int calc()':
horses.cpp:56:15: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   56 |  for (int i = in; i < n; i++){
      |               ^~
horses.cpp:62:34: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   62 |   ext = query(1, 0, n - 1, 0, ti - 1);
      |                               ~~~^~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:74:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   74 |  return calc();
      |         ~~~~^~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:80:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   80 |  return calc();
      |         ~~~~^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:85:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   85 |  return calc();
      |         ~~~~^~
#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...