Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main(){
- int TC; cin>>TC;
- for(int tc = 1; tc <= TC; tc++){
- //first 80 days put in from 1 to 16
- //then inspect the 4 from 17 to 20. find the min
- //put in all the others for the rest of the day
- int pntr = 0;
- for(int d = 1; d <= 80; d++){
- int dayno; cin>>dayno;
- // /assert(d == dayno);
- cout<<(pntr+1)<<" "<<1<<endl;
- pntr = (pntr + 1)%15;
- }
- int best = 1000, indx = -1;
- for(int j = 16; j <= 20; j++){
- int dayno; cin>>dayno;
- cout<<j<<" "<<0<<endl;
- int sz; cin>>sz;
- for(int k = 0; k < sz; k++){
- int temp; cin>>temp;
- }
- if(best >= sz){
- best = sz; indx = j;
- }
- }
- pntr = 0;
- vector<int> order = {16, 17, 18, 19, 20};
- order.erase(indx-16+order.begin());
- for(int d = 86; d <= 99; d++){
- int dayno; cin>>dayno;
- assert(dayno == d);
- cout<<(order[pntr])<<" "<<1<<endl;
- pntr = (pntr + 1)%order.size();
- }
- int temp2; cin>>temp2;
- cout<<indx<<" "<<100<<endl;
- }
- }
Add Comment
Please, Sign In to add comment