1 #include <iostream>
2 using namespace std;
3
4 int bitManipulation1(int n, int m, int i) {
5 // 在此处补充你的代码
6 return ((m>>i)&1)==1 ? (n|(1<<i)) : (n&(~(1<<i)));
7 }
8
9 int main() {
10 int n, m, i, t;
11 freopen("in (4).txt","r",stdin);
12 cin >> t;
13 while (t--) {
14 cin >> n >> m >> i;
15 cout << bitManipulation1(n, m, i) << endl;
16 }
17 return 0;
18 }