Skip to content

Instantly share code, notes, and snippets.

@Grabber
Created December 6, 2025 03:39
Show Gist options
  • Select an option

  • Save Grabber/cd2729172c77a6eaf00563b59ca7d5cf to your computer and use it in GitHub Desktop.

Select an option

Save Grabber/cd2729172c77a6eaf00563b59ca7d5cf to your computer and use it in GitHub Desktop.
C/C++: unsync stdio and untie cin/cout.
#include <iostream>
// g++ main.cc -o main; ./main
static const auto fast = [](){
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
return 0;
}();
int main(int argc, char const *argv[])
{
std::cout << "fast" << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment