QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#121173#6114. AgricultureBZJRNWA 1ms3640kbC++14308b2023-07-07 18:18:562023-07-07 18:18:59

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-07 18:18:59]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3640kb
  • [2023-07-07 18:18:56]
  • 提交

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'