快读快写为什么会负优化?
查看原帖
快读快写为什么会负优化?
1129982
_unknowner_楼主2024/11/26 19:01

当我用快输快写subtask1 T掉了
当我用scanf.printf时过了
为什么?求教各路神仙
我的快读快写代码如下

inline int in(){
	int num=0,f=1;
	char c=getchar_unlocked();
	while(!isdigit(c)){
		if (c=='-') f=-f;
		c=getchar_unlocked();
	}
	while(isdigit(c)){
		num=num*10+c-'0';
		c=getchar_unlocked();
	}
	return num*f;
}
inline void out(int x) {
  static int sta[35];
  int top = 0;
  if (x<0) putchar('-'),x=-x;
  do {
    sta[top++] = x % 10, x /= 10;
  } while (x);
  while (top) putchar(sta[--top] + 48); 
  puts("");
}
2024/11/26 19:01
加载中...