不会真的有人超时了还在用cout吧
by hy233 @ 2022-03-22 16:46:55
@[justurn](/user/683963) `endl` 改成 `\n`。另外 ST 表把两维交换一下会快。
by xyf007 @ 2022-03-22 17:29:26
@[hy233](/user/259300) 超时是 ```std::endl``` 的问题和 `std::cout` 有什么关系
by xyf007 @ 2022-03-22 17:30:00
@[xyf007](/user/68273) 难道你不知道printf比cout快的多吗
by hy233 @ 2022-03-22 19:05:21
@[hy233](/user/259300) 你难道不知道 ```std::cout``` 比 `printf` 快吗?<https://www.luogu.com.cn/paste/t3ve2sxp>
by xyf007 @ 2022-03-22 20:44:14
@[xyf007](/user/68273) 确认是 `endl` 的问题,把 `endl` 改成 `/n` 后就ac了
by justurn @ 2022-03-22 22:27:13
@[justurn](/user/683963) 交换两维跑得更快
by xyf007 @ 2022-03-22 23:20:48
@[xyf007](/user/68273) 邪门,现在我也搞不清楚了(~~会不会有一种可能,是你的CPU太强了~~)
by hy233 @ 2022-03-23 07:42:20
@[hy233](/user/259300) 至始至终都是 **关闭流同步后的** ```std::cout``` 比 `scanf` 快,不关的比较慢,而用 `std::endl` 换行加剧了这种情况
by xyf007 @ 2022-03-23 09:20:08
@[xyf007](/user/68273) lz好像没有关吧
~~但是还是过了~~
by hy233 @ 2022-03-23 15:51:01