chessboard.cpp:11:16: error: 'int y1 [100007]' redeclared as different kind of symbol
int x1[N], y1[N], x2[N], y2[N];
^
In file included from /usr/include/features.h:367:0,
from /usr/include/assert.h:35,
from /usr/include/c++/5/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:33,
from chessboard.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:251:1: note: previous declaration 'double y1(double)'
__MATHCALL (y1,, (_Mdouble_));
^
chessboard.cpp: In function 'void calc(long long int)':
chessboard.cpp:34:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
ll o1 = gety(y2[i], len) - gety(y1[i] - 1, len);
^
chessboard.cpp:34:43: warning: pointer to a function used in arithmetic [-Wpointer-arith]
ll o1 = gety(y2[i], len) - gety(y1[i] - 1, len);
^
chessboard.cpp:34:41: error: invalid conversion from 'double (*)(double) throw ()' to 'long long int' [-fpermissive]
ll o1 = gety(y2[i], len) - gety(y1[i] - 1, len);
^
chessboard.cpp:17:11: note: initializing argument 1 of 'long long int gety(long long int, long long int)'
inline ll gety(ll y,ll len){
^
chessboard.cpp:35:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
ll e1 = (y2[i] - y1[i] + 1) - o1;
^
chessboard.cpp:35:24: error: invalid operands of types 'int' and 'double(double) throw ()' to binary 'operator-'
chessboard.cpp:39:12: warning: pointer to a function used in arithmetic [-Wpointer-arith]
yy = y1[i] / len;
^
chessboard.cpp:39:16: error: invalid operands of types 'double(double) throw ()' and 'long long int' to binary 'operator/'
yy = y1[i] / len;
^
chessboard.cpp:49:49: warning: pointer to a function used in arithmetic [-Wpointer-arith]
ev = 1ll * (x2[i] - x1[i] + 1) * (y2[i] - y1[i] + 1) - od;
^
chessboard.cpp:49:49: error: invalid operands of types 'int' and 'double(double) throw ()' to binary 'operator-'
chessboard.cpp: At global scope:
chessboard.cpp:61:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main () {
^
chessboard.cpp: In function 'int main()':
chessboard.cpp:66:20: warning: pointer to a function used in arithmetic [-Wpointer-arith]
x1[i] = a; y1[i] = b; x2[i] = c; y2[i] = d;
^
chessboard.cpp:66:22: error: assignment of read-only location '*(y1 + ((sizetype)i))'
x1[i] = a; y1[i] = b; x2[i] = c; y2[i] = d;
^
chessboard.cpp:66:22: error: cannot convert 'int' to 'double(double) throw ()' in assignment
chessboard.cpp:74:22: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
printf("%I64d", ans);
^
chessboard.cpp:62:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld %d", &n, &k);
^
chessboard.cpp:64:57: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int a, b, c, d; scanf("%d %d %d %d", &a, &b, &c, &d);
^