QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#121172#2616. Attack OrderBZJRNWA 1ms3624kbC++14308b2023-07-07 18:18:232023-07-07 18:18:25

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:25]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3624kb
  • [2023-07-07 18:18:23]
  • 提交

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: 3624kb

input:

3
2
15 25
10 5
3
7 0
7 3
10 0
3
10 10
20 20
30 30

output:

0

result:

wrong output format YES or NO expected, but 0 found [1st token]