foo.cpp: In function 'int main()':
foo.cpp:4:4: error: 'ios' has not been declared
ios::sync_with_stdio(false);
^~~
foo.cpp:5:18: error: 'cin' was not declared in this scope
long long n,p;cin>>n>>p;
^~~
foo.cpp:5:18: note: suggested alternative:
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/i686-w64-mingw32/bits/stdc++.h:75:0,
from foo.cpp:1:
C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^~~
foo.cpp:6:4: error: 'cout' was not declared in this scope
cout<<(n-1)%p;
^~~~
foo.cpp:6:4: note: suggested alternative:
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/i686-w64-mingw32/bits/stdc++.h:75:0,
from foo.cpp:1:
C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~