非本谷题,报错求调
  • 板块题目总版
  • 楼主tongyurui
  • 当前回复13
  • 已保存回复13
  • 发布时间2024/7/22 19:45
  • 上次更新2024/7/22 20:33:17
查看原帖
非本谷题,报错求调
1031659
tongyurui楼主2024/7/22 19:45
#include<bits/stdc++.h>
using namespace std;
int read(){
	int s=0,f=1;
	char ch=getchar();
	while(ch<'0'||ch>'9'){
		if(ch=='-')	f=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9'){
		s=(s<<1)+(s<<3)+(ch^'0');
		ch=getchar();
	}
	return s*f;
}
void write(int s){
	if(s<0)	putchar('-'),s=-s;
	if(s>9)	write(s/10);
	putchar(s%10+'0');
	return ;
}
//快读快写没问题 
const int N=1e5+5;
struct node{
	int a,b;
	bool operator < (const node&x)const{
		return a<x.a;
	}
	bool operator > (const node&x)const{
		return a>x.a;
	}//疑似重载运算符出问题  
}w[N];
int n,l[N],r[N],tot;
int main(){
	//freopen("resource.in","r",stdin);
	//freopen("resource.out","w",stdout);
	n=read();
	for(int i=1;i<=n;i++)	w[i].a=read();
	for(int i=1;i<=n;i++)	w[i].b=read();
	sort(w+1,w+n+1);
	for(int i=2;i<=n;i++) if((w[i].a-w[i-1].a)>1)
		l[++tot]=w[i-1].a,r[tot]=w[i].a;
	sort(l+1,l+tot+1);
	sort(r+1,r+tot+1);
	for(int i=1;i<=1e9;i++){
		priority_queue<int>que;
		int js=0;
		for(int j=lower_bound(w+1,w+n+1,i)-w;;j++){
			if(w[j].a==i)	js++;
			else	break;
		}
	}
	return 0;
}
2024/7/22 19:45
加载中...