fork download
  1. #include <bits/stdc++.h>
  2. #define task "1"
  3. #define ll long long
  4. #define double long double
  5. #define ii pair<int,int>
  6. #define fi first
  7. #define se second
  8. #define c_bit(i) __builtin_popcountll(i)
  9. #define Bit(mask,i) ((mask >> i) & 1)
  10. #define onbit(mask,i) ((mask) | (1LL << i))
  11. #define offbit(mask,i) ((mask) &~ (1LL << i))
  12. using namespace std;
  13. const int maxn = 1e5 + 5;
  14. const ll oo = 1e18;
  15. const int mod = 1e9 + 7;
  16. const int dx[] = {0,1,0,-1} , dy[] = {1,0,-1,0};
  17. int t, n, u;
  18. int main()
  19. {
  20. ios_base::sync_with_stdio(false); cin.tie(nullptr);
  21. if(fopen(task".inp","r")){
  22. freopen(task".inp","r",stdin);
  23. freopen(task".out","w",stdout);
  24. }
  25. cin >> t;
  26. while(t --){
  27. cin >> n >> u;
  28. cout << flush << "ask" << " " ;
  29. for(int i = 1;i <= n;i ++) cout << flush << i << " ";
  30. int s; cin >> s;
  31. cout << flush << "answer" << " ";
  32. for(int i = 1;i <= n;i ++) cout << flush << i << " ";
  33. fflush(stdout);
  34. }
  35. return 0;
  36. }
  37.  
Success #stdin #stdout 0s 5548KB
stdin
Standard input is empty
stdout
Standard output is empty