0_0_39304414_26912.cpp:3:7: error: expected nested-name-specifier before 'namespacestd'
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ^~~~~~~~~~~~
0_0_39304414_26912.cpp:3:20: error: 'list' does not name a type
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ^~~~
0_0_39304414_26912.cpp:3:31: error: 'list' does not name a type
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ^~~~
0_0_39304414_26912.cpp: In function 'int main()':
0_0_39304414_26912.cpp:3:73: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ^~~
| std::cin
In file included from .\stdc++.h:146:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
0_0_39304414_26912.cpp:3:98: error: 'a' was not declared in this scope
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ^
0_0_39304414_26912.cpp:3:186: error: 'it' was not declared in this scope; did you mean 't'?
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ^~
| t
0_0_39304414_26912.cpp:3:274: error: 'it' was not declared in this scope; did you mean 't'?
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ^~
| t
0_0_39304414_26912.cpp:3:328: error: expected ')' before ';' token
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ~ ^
| )
0_0_39304414_26912.cpp:3:347: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ^~~~
| std::cout
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
0_0_39304414_26912.cpp:3:353: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
3 | using namespacestd;list<int>a;list<int>::iterator it;int main(){int t,n;cin>>t;while(t--){cin>>n;a.clear();int k=2;for(int i=1;i<=n;i++){a.push_back(i);}while(a.size()>3){int cnt=1;for(it=a.begin();it!=a.end();){if(cnt++%k==0){it=a.erase(it);}else it++: }}k=(k==2?3:2);for(it=a.begin;it!=a.end();it++){if(it!=a.begin)printf(" ";printf("%d",*it);}cout<<endl;}return 0;}
| ^~~~
| std::endl
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/unique_ptr.h:42,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/memory:78,
from .\stdc++.h:56:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:735:5: note: 'std::endl' declared here
735 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|