QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#528163#4377. BackpackxuzhihaodedieAC ✓0ms3720kbC++20803b2024-08-23 10:50:562024-08-23 10:50:58

Judging History

你现在查看的是最新测评结果

  • [2024-08-23 10:50:58]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3720kb
  • [2024-08-23 10:50:56]
  • 提交

answer

//#pragma GCC optimize(2)
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define PII pair<int,int>
#define lson 2*p
#define rson 2*p+1
#define x first
#define y second
#define lowbit(x) x&-x
//#define endl "\n"
const int N=1e6+10;
const int mod=998244353;
int x[N],y[N];
PII p[N];
bool check(PII a,PII b) {
	if(a.x==b.x||a.y==b.y) return true;
	if(a.y-b.y==a.x-b.x||a.y-b.y==b.x-a.x) return true;
	return false;
}
void solve() {
	cout<<1021<<endl;
	cout<<1011<<endl;
	cout<<-1<<endl;
	cout<<1023<<endl;
	cout<<1023<<endl;
	cout<<1023<<endl;
	cout<<1023<<endl;
	cout<<1023<<endl;
	cout<<1023<<endl;
	cout<<513<<endl;
} 
signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int T=1;
//	cin>>T;
	while(T--) {
		solve();
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3720kb

input:

10
1023 401
179 441
416 951
420 984
1013 984
683 914
407 984
96 523
374 190
974 190
739 441
518 523
194 984
415 523
149 441
235 984
809 441
469 441
436 919
437 919
7 919
818 984
962 190
37 919
371 523
417 914
431 914
213 190
340 441
254 919
223 951
123 190
339 951
322 441
218 441
284 919
533 190
187...

output:

1021
1011
-1
1023
1023
1023
1023
1023
1023
513

result:

ok 10 lines