萌新求助
  • 板块灌水区
  • 楼主zjrdmd
  • 当前回复6
  • 已保存回复6
  • 发布时间2021/9/10 19:30
  • 上次更新2023/11/4 07:09:50
查看原帖
萌新求助
174897
zjrdmd楼主2021/9/10 19:30

Rt。下面这份代码巨慢无比,交到oj上是MLE,求助原因,vector也没这么慢啊,有啥好的解决方法吗qwq

#include <iostream>
#include <queue>

inline int read() {
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9') {if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9') {x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
	return x*f;
}
 
using std::min;
using std::max;

const int N=1e6+5;
std::queue<int>deg[N],r[N];

signed main(void){
	return 0;
}

2021/9/10 19:30
加载中...