/in/foo.cc: In function 'int main()':
/in/foo.cc:15:23: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%d%d",&b,&c);
^
/in/foo.cc:15:23: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
/in/foo.cc:16:5: error: 'cout' was not declared in this scope
cout<<a[(b-1)*b*(2*b-1)/6+c-1];
^~~~
/in/foo.cc:16:5: note: suggested alternative:
In file included from /in/foo.cc:2:0:
/usr/include/c++/6/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~