QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#577524#9310. Permutation Counting 4zjhhhzjWA 0ms3692kbC++17474b2024-09-20 12:21:032024-09-20 12:21:04

Judging History

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

  • [2024-09-20 12:21:04]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3692kb
  • [2024-09-20 12:21:03]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod (1000000007)
#define PII pair<int,int>
#define F first
#define S second
#define N 200005
ll n,m,a[N];
void solve() {
	cin>>n;
	int l,r,ns=0;
	for(int i=1;i<=n;i++){
		cin>>l>>r;
		if(n>=l&&n<=r)ns++;
	}
	cout<<(ns&1)<<'\n';
}
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	int _ = 1;
	cin >> _;
	while (_--) {
		solve();
	}
	return 0;
}
/*
*/

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3692kb

input:

4
5
1 2
1 5
1 2
1 2
2 2
5
1 1
2 4
2 3
5 5
3 4
5
3 5
1 2
3 4
3 5
3 3
5
1 5
1 4
4 5
5 5
1 2

output:

1
1
0
1

result:

wrong answer 1st words differ - expected: '0', found: '1'