foo.cc:128:1: error: 'cin' does not name a type
cin>>X0>>m;
^~~
foo.cc:129:1: error: expected unqualified-id before 'for'
for(int i=1; i<=n; i++) {
^~~
foo.cc:129:14: error: 'i' does not name a type
for(int i=1; i<=n; i++) {
^
foo.cc:129:20: error: 'i' does not name a type
for(int i=1; i<=n; i++) {
^
foo.cc:136:1: error: 'cout' does not name a type
cout<<ans<<endl;
^~~~
foo.cc:137:1: error: expected unqualified-id before 'while'
while(m--) {
^~~~~
foo.cc:142:1: error: expected unqualified-id before 'return'
return 0;
^~~~~~
foo.cc:143:1: error: expected declaration before '}' token
}
^