foo.cc:5:1: error: expected initializer before 'unsigned'
unsigned gcd_it(unsigned a, unsigned b) {
^~~~~~~~
foo.cc: In function 'int main()':
foo.cc:20:14: error: 'a' was not declared in this scope
cin>>a[i];
^
foo.cc:27:28: error: 'a' was not declared in this scope
ans+=(gcd_it(k,a[j])^i^j);
^
foo.cc:27:19: error: 'gcd_it' was not declared in this scope
ans+=(gcd_it(k,a[j])^i^j);
^~~~~~
foo.cc:27:19: note: suggested alternative: 'gid_t'
ans+=(gcd_it(k,a[j])^i^j);
^~~~~~
gid_t
[Hydro](https://hydro.ac)提供评测服务