Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define _test int _TEST; cin>>_TEST; while(_TEST--)
- int main()
- {
- _test
- {
- int n;
- cin>>n;
- vector<int> a(n);
- for(auto &e: a)
- cin>>e;
- if(n%2 == 0)
- {
- cout<<2<<"\n";
- cout<<1<<" "<<n<<"\n";
- cout<<1<<" "<<n<<"\n";
- continue;
- }
- cout<<4<<"\n";
- cout<<2<<" "<<n<<"\n";
- cout<<2<<" "<<n<<"\n";
- cout<<1<<" "<<2<<"\n";
- cout<<1<<" "<<2<<"\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment