QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#121173 | #6114. Agriculture | BZJRN | WA | 1ms | 3640kb | C++14 | 308b | 2023-07-07 18:18:56 | 2023-07-07 18:18:59 |
Judging History
answer
#include<stdio.h>
int N,K,l,r,p,k,i,h[100002],s[1000002],t[1000002];
int main(){
for(scanf("%d",&N);i<N;++i)scanf("%d%d",&s[i],&t[i]);
for(scanf("%d",&K),i=0;i<K;++i)scanf("%d",&h[i]);
for(i=0;i<N;++i,k+=(s[i]<=h[l]&&h[l]<=t[i]))for(l=0,r=K-1;l<=r;s[i]>h[p]?l=p+1:r=p-1)p=l+r>>1;
printf("%d",k);
}
详细
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3640kb
input:
4 1 2 3 3 2 4 7 9 2 3 9
output:
2
result:
wrong answer 1st numbers differ - expected: '3', found: '2'