没输出-1呀
by xueshengyi @ 2023-08-25 14:08:52
奥看错了,不好意思啊
by xueshengyi @ 2023-08-25 14:10:18
输出错了
by xueshengyi @ 2023-08-25 14:19:07
把cout<<endl改成puts("")就AC了。
by xueshengyi @ 2023-08-25 14:26:13
@[xueshengyi](/user/971543) 谢谢,已AC
by Ryanhao @ 2023-08-25 14:30:28
@[xueshengyi](/user/971543) 不过为什么`cout << endl`不可以,`puts("")`才可以?
by Ryanhao @ 2023-08-25 14:31:27
@[Ryanhao](/user/741633) 不好意思,我不太会,只是刚才调的时候发觉有这种可能,一试就对了。。。
by xueshengyi @ 2023-08-25 14:51:47
@[Ryanhao](/user/741633) 其实原因是解除stdio与iostream的同步后,stdio和iostream的相对输出顺序将不受控制。不建议在解除同步后混用stdio和iostream。
by PhiliaTheCat @ 2023-10-12 23:37:10