以输入x,输出-1为例
cin.tie(0); ios::sync_with_stdio(false); std::cin>>x; std::cout<<-1<<std::endl;
但还是会慢一点,推荐用
scanf("%d",&x); printf("-1");
C++ cout cin加速
原文:https://www.cnblogs.com/chenlinchong/p/15195288.html