xorsum.cpp:25:22: error: 'int64_t pow10 [10]' redeclared as different kind of symbol
int64_t a[N],pow10[10];
^
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533,
from /usr/include/c++/7/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
from xorsum.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:122:1: note: previous declaration 'double pow10(double)'
__MATHCALL (pow10,, (_Mdouble_ __x));
^
xorsum.cpp: In function 'int GetDigit(int64_t, int)':
xorsum.cpp:38:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
return (x/pow10[k-1])%10;
^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
xorsum.cpp:38:14: error: invalid operands of types 'int64_t {aka long int}' and 'double(double) throw ()' to binary 'operator/'
return (x/pow10[k-1])%10;
~^~~~~~~~~~~
xorsum.cpp: In function 'void SortByDigit(std::vector<long int>&, int)':
xorsum.cpp:43:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<a.size();++i){
~^~~~~~~~~
xorsum.cpp: In function 'int Check(int)':
xorsum.cpp:83:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<vec[0].size();++i){
~^~~~~~~~~~~~~~
xorsum.cpp:93:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<vec[1].size();++i){
~^~~~~~~~~~~~~~
xorsum.cpp:103:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<vec[0].size();++i){
~^~~~~~~~~~~~~~
xorsum.cpp: In function 'int main()':
xorsum.cpp:145:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
pow10[0]=1;
^
xorsum.cpp:145:11: error: assignment of function 'double pow10(double)'
pow10[0]=1;
^
xorsum.cpp:145:11: error: cannot convert 'int' to 'double(double) throw ()' in assignment
xorsum.cpp:147:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
pow10[i]=pow10[i-1]*10;
^
xorsum.cpp:147:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
pow10[i]=pow10[i-1]*10;
^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
xorsum.cpp:147:28: error: invalid operands of types 'double(double) throw ()' and 'int' to binary 'operator*'
pow10[i]=pow10[i-1]*10;
~~~~~~~~~~^~~
xorsum.cpp: In function 'void Gen()':
xorsum.cpp:125:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("info1cup17_xorsum.inp","w",stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~