Leetcode C++提速

static const auto _ = []()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    return nullptr;
}();

關於LeetCode C++提速的方法,在

class Solution

類之前加上 上面那段代碼就能極大的提高速度

同樣的代碼,速度一下體現出來了。
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章