horses.cpp: In function 'void inits1(int, int, int)':
horses.cpp:23:25: warning: conversion to 'int' from 'std::vector<SEG>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
seg1[idx].l = seg1.size(); inits1(seg1[idx].l, s, (s+e)/2);
~~~~~~~~~^~
horses.cpp:24:25: warning: conversion to 'int' from 'std::vector<SEG>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
seg1[idx].r = seg1.size(); inits1(seg1[idx].r, (s+e)/2+1, e);
~~~~~~~~~^~
horses.cpp: In function 'void inits2(int, int, int)':
horses.cpp:33:25: warning: conversion to 'int' from 'std::vector<SEG>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
seg2[idx].l = seg2.size(); inits2(seg2[idx].l, s, (s+e)/2);
~~~~~~~~~^~
horses.cpp:34:25: warning: conversion to 'int' from 'std::vector<SEG>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
seg2[idx].r = seg2.size(); inits2(seg2[idx].r, (s+e)/2+1, e);
~~~~~~~~~^~
horses.cpp: In function 'll calc1(int, int, int, int, int)':
horses.cpp:38:45: warning: declaration of 'y' shadows a global declaration [-Wshadow]
ll calc1(int idx, int s, int e, int x, int y){
^
horses.cpp:9:16: note: shadowed declaration is here
vector<int> x, y;
^
horses.cpp:38:45: warning: declaration of 'x' shadows a global declaration [-Wshadow]
ll calc1(int idx, int s, int e, int x, int y){
^
horses.cpp:9:13: note: shadowed declaration is here
vector<int> x, y;
^
horses.cpp: In function 'll calc2(int, int, int, int, int)':
horses.cpp:45:45: warning: declaration of 'y' shadows a global declaration [-Wshadow]
ll calc2(int idx, int s, int e, int x, int y){
^
horses.cpp:9:16: note: shadowed declaration is here
vector<int> x, y;
^
horses.cpp:45:45: warning: declaration of 'x' shadows a global declaration [-Wshadow]
ll calc2(int idx, int s, int e, int x, int y){
^
horses.cpp:9:13: note: shadowed declaration is here
vector<int> x, y;
^
horses.cpp: In function 'void update1(int, int, int, int, int)':
horses.cpp:52:49: warning: declaration of 'y' shadows a global declaration [-Wshadow]
void update1(int idx, int s, int e, int x, int y){
^
horses.cpp:9:16: note: shadowed declaration is here
vector<int> x, y;
^
horses.cpp:52:49: warning: declaration of 'x' shadows a global declaration [-Wshadow]
void update1(int idx, int s, int e, int x, int y){
^
horses.cpp:9:13: note: shadowed declaration is here
vector<int> x, y;
^
horses.cpp: In function 'void update2(int, int, int, int, int)':
horses.cpp:66:49: warning: declaration of 'y' shadows a global declaration [-Wshadow]
void update2(int idx, int s, int e, int x, int y){
^
horses.cpp:9:16: note: shadowed declaration is here
vector<int> x, y;
^
horses.cpp:66:49: warning: declaration of 'x' shadows a global declaration [-Wshadow]
void update2(int idx, int s, int e, int x, int y){
^
horses.cpp:9:13: note: shadowed declaration is here
vector<int> x, y;
^
horses.cpp: In function 'int calc_ans()':
horses.cpp:87:20: warning: conversion to 'std::vector<int>::value_type {aka int}' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
t.push_back(x.size());
~~~~~~^~
horses.cpp:97:20: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
int idx = t.size()-1;
~~~~~~~~^~
horses.cpp:98:29: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
prvy = calc2(0, 0, x.size()-1, t[idx], t[idx-1]-1);
~~~~~~~~^~
horses.cpp:99:20: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
for(int i=t.size()-2; i>=1; i--){
~~~~~~~~^~
horses.cpp:101:30: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
nowy = calc2(0, 0, x.size()-1, t[i], t[i-1]-1);
~~~~~~~~^~
horses.cpp:109:29: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
ans = (calc1(0, 0, x.size()-1, 0, t[idx]) * prvy)%DIV;
~~~~~~~~^~
horses.cpp:114:9: warning: conversion to 'int' from 'll {aka long long int}' may alter its value [-Wconversion]
return ans;
^~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:134:24: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
update1(0, 0, x.size()-1, pos, val);
~~~~~~~~^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:140:24: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
update2(0, 0, x.size()-1, pos, val);
~~~~~~~~^~