Leetcode c++ 加速代码


static int n=[](){

    std::ios::sync_with_stdio(false);

    std::cin.tie(nullptr);

    return 0;

}();

在一位大佬的朋友圈看到的,把这段代码放在开头,试了下真的有用。

原因不知道,好像是异步io减少了阻塞的时间。。。

发布了24 篇原创文章 · 获赞 12 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/Protocols7/article/details/86485393