1.解决方案 std::ios::sync_with_stdio(false); 2.原因 为保证cin和cout与scanf和printf混合使用,输入流会时刻与输入缓冲保持同步,导致调用缓存,消耗过大,上述语句可解开同步