99712024-03-22 13:34:12111Xorcpp17Time limit exceeded 0/100199ms4156 KiB
#include <bits/stdc++.h>
using namespace std;

#define int long long

void solve(int l,int r,int&x,int&y,int&z){
	x=0,y=0,z=0;
	int ax,ay,az;
	ax=l;
	for(ay=ax+1;ay<=r;ay++){
		for(az=ay+1;az<=r;az++){
			if((ax^ay^az)>(x^y^z)){
				x=ax,y=ay,z=az;
			}
		}
	}
	az=r;
	for(ay=az-1;ay>=l;ay--){
		for(ax=ay-1;ax>=l;ax--){
			if((ax^ay^az)>(x^y^z)){
				x=ax,y=ay,z=az;
			}
		}
	}
}

signed main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
#ifdef CB
	freopen("be1.txt","r",stdin);
//	freopen("out.txt","w",stdout);
#endif
	int T;
	cin>>T;
	while(T--){
		int L,R;
		cin>>L>>R;
		int x,y,z;
		solve(L,R,x,y,z);
		cout<<x<<' '<<y<<' '<<z<<'\n';
	}
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/100
1Accepted0/03ms1888 KiB
2Time limit exceeded0/0171ms2100 KiB
3Wrong answer0/53ms2324 KiB
4Wrong answer0/53ms2536 KiB
5Wrong answer0/53ms2752 KiB
6Wrong answer0/52ms2840 KiB
7Time limit exceeded0/5199ms2952 KiB
8Time limit exceeded0/5180ms3212 KiB
9Time limit exceeded0/5165ms3344 KiB
10Time limit exceeded0/5157ms3324 KiB
11Time limit exceeded0/5157ms3588 KiB
12Time limit exceeded0/5118ms3692 KiB
13Time limit exceeded0/5174ms3896 KiB
14Time limit exceeded0/6171ms3932 KiB
15Time limit exceeded0/6177ms3784 KiB
16Time limit exceeded0/6155ms3800 KiB
17Time limit exceeded0/6159ms3752 KiB
18Time limit exceeded0/7158ms4108 KiB
19Time limit exceeded0/7162ms4140 KiB
20Time limit exceeded0/7152ms4156 KiB