NOI openjudge迷惑行为
查看原帖
NOI openjudge迷惑行为
221435
wrtleo楼主2020/12/8 21:25

同时一道校门外的树,为何洛谷测评系统为AC,但NOI openjudge测评却是WA

蒟蒻的代码:

#include<bits/stdc++.h>
using namespace std;
int main(){
	bool tree[10001]={0};
	int tr[10001],n,a,b,m,count;
	scanf("%d",&n);
	for(int i=0;i<=n;i++){
		tr[i]=i;
	}
	scanf("%d",&m);
	for(int i=1;i<=m;i++){
		cin>>a>>b;
		for(int j=a;j<=b;j++){
			if(tree[j]==false) tree[j]=true;
		}
	}
	for(int i=0;i<=n;i++){
		if(tree[i]==false) count++;
	} 
	printf("%d",count);
	return 0;
} 

各位大神高抬贵手帮帮忙

2020/12/8 21:25
加载中...