Main.cpp:6:8: error: 'll y1' redeclared as different kind of entity
6 | ll x1, y1;
| ^~
In file included from /usr/include/features.h:461,
from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:518,
from /usr/include/c++/10/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
from Main.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:221:1: note: previous declaration 'double y1(double)'
221 | __MATHCALL (y1,, (_Mdouble_));
| ^~~~~~~~~~
Main.cpp: In function 'void upd(ll, ll, std::vector<long long int>&)':
Main.cpp:8:10: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
8 | while(id<=v.size()){
| ~~^~~~~~~~~~
Main.cpp: In function 'll sum(ll, ll, std::vector<long long int>&)':
Main.cpp:24:10: error: assignment of function 'double y1(double)'
24 | x1=x, y1=y;
| ~~^~
Main.cpp:25:13: error: invalid conversion from 'double (*)(double) noexcept' to 'll' {aka 'long long int'} [-fpermissive]
25 | return que(y1, v)-que(x1-1, v);
| ^~
| |
| double (*)(double) noexcept
Main.cpp:14:11: note: initializing argument 1 of 'll que(ll, std::vector<long long int>&)'
14 | ll que(ll id, vector<ll> &v){
| ~~~^~
Main.cpp: In function 'll prefix(ll, ll, std::vector<long long int>&, std::vector<long long int>&)':
Main.cpp:29:10: error: assignment of function 'double y1(double)'
29 | x1=x, y1=y;
| ~~^~
Main.cpp:30:13: error: invalid conversion from 'double (*)(double) noexcept' to 'll' {aka 'long long int'} [-fpermissive]
30 | return que(y1, pre)-que(x1-1, pre)-(x1-1)*sum(x1, y1, v);
| ^~
| |
| double (*)(double) noexcept
Main.cpp:14:11: note: initializing argument 1 of 'll que(ll, std::vector<long long int>&)'
14 | ll que(ll id, vector<ll> &v){
| ~~~^~
Main.cpp:30:52: error: invalid conversion from 'double (*)(double) noexcept' to 'll' {aka 'long long int'} [-fpermissive]
30 | return que(y1, pre)-que(x1-1, pre)-(x1-1)*sum(x1, y1, v);
| ^~
| |
| double (*)(double) noexcept
Main.cpp:23:17: note: initializing argument 2 of 'll sum(ll, ll, std::vector<long long int>&)'
23 | ll sum(ll x, ll y, vector<ll> &v){
| ~~~^