QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#577524 | #9310. Permutation Counting 4 | zjhhhzj | WA | 0ms | 3692kb | C++17 | 474b | 2024-09-20 12:21:03 | 2024-09-20 12:21:04 |
Judging History
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'