1
- #include < bits/stdc++.h>
2
- using namespace std ;
3
- #define gc getchar_unlocked
4
- #define fo (i,n ) for (i=0 ;i<n;i++)
5
- #define Fo (i,k,n ) for (i=k;k<n?i<n:i>n;k<n?i+=1 :i-=1 )
6
- #define ll long long
7
- #define si (x ) scanf(" %d" ,&x)
8
- #define sl (x ) scanf(" %lld" ,&x)
9
- #define ss (s ) scanf(" %s" ,s)
10
- #define pi (x ) printf(" %d" ,x)
11
- #define pl (x ) printf(" %lld" ,x)
12
- #define ps (s ) printf(" %s" ,s)
13
- #define pnl () printf(" \n " )
14
- #define deb (x ) cout << #x << " =" << x << endl
15
- #define deb2 (x, y ) cout << #x << " =" << x << " ," << #y << " =" << y << endl
16
- #define pb push_back
17
- #define mp make_pair
18
- #define F first
19
- #define S second
20
- #define all (x ) x.begin(), x.end()
21
- #define clr (x ) memset(x, 0 , sizeof (x))
22
- #define sortall (x ) sort(all(x))
23
- #define tr (it, a ) for (auto it = a.begin(); it != a.end(); it++)
24
- #define PI 3.1415926535897932384626
25
- typedef pair<int , int > pii;
26
- typedef pair<ll, ll> pl;
27
- typedef vector<int > vi;
28
- typedef vector<ll> vl;
29
- typedef vector<pii> vpii;
30
- typedef vector<pl> vpl;
31
- typedef vector<vi> vvi;
32
- typedef vector<vl> vvl;
33
- int mpow (int base, int exp);
34
- void ipgraph (int m);
35
- void dfs (int u, int par);
36
- const int mod = 1000000007 ;
37
- const int N = 130 , M = N;
38
- // =======================
39
- template <typename T>
40
- void out (T x) {
41
- cout << x << endl;
42
- cout << flush;
43
- }
44
-
45
- int main () {
46
- // ios_base::sync_with_stdio(0);
47
- int t, i, j, k, p, q, r, x, y, u, v, m, tt, b;
48
- cin >> t >> b;
49
- auto other = [b](int i) {return b-i-1 ;};
50
-
51
- fo (tt, t) {
52
- vector<int > arr (b, -1 );
53
- fo (i, b/2 ) {
54
- int o = other (i);
55
- out (i+1 );
56
- cin >> arr[i];
57
- out (o+1 );
58
- cin >> arr[o];
59
- }
60
- fo (i, b/2 ) {
61
- out (i+1 );
62
- cin >> x;
63
- int o = other (i);
64
- arr[o] = arr[o] ^ (arr[i] ^ x);
65
- arr[i] = x;
66
- }
67
- string ans = " " ;
68
- for (int xx: arr) ans += xx + ' 0' ;
69
- out (ans);
70
-
71
- char c;
72
- cin >> c;
73
- if (c != ' Y' ) exit (0 );
74
- }
75
-
76
- return 0 ;
77
- }
78
-
79
-
80
-
81
1
#include < bits/stdc++.h>
82
2
using namespace std ;
83
3
#define gc getchar_unlocked
@@ -173,4 +93,4 @@ int main() {
173
93
}
174
94
175
95
return 0 ;
176
- }
96
+ }
0 commit comments