c++ - HDOJ 一个简单IO题的输出格式
黄舟
黄舟 2017-04-17 13:08:00
0
2
514

为什么第二个反而过了?!这不科学啊,和要求的不一致啊.....!

第二个明明是输入一组数据输出一个结果的
第一个才是输入多组数据后统一输出结果的

可能代码写的不怎么好,希望不要吐槽太厉害啊,我想知道下为什么第二个能过,而第一个不能过呀...这样我才好改进的说...

HDOJ-2005

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
小葫芦
Output:
对于每组输入数据,输出一行,表示该日期是该年的第几天。

Which sentence says that all data should be output together?

大家讲道理

What the person above said is correct, it is output by line.
In fact, the input and output examples you see are redirected to file input and output, which is equivalent to storing all the output in the command line into a buffer and outputting it in one go. So what its example means is that the output you see in the command line situation is interactive output, and in the file it is all output.
Most of the question examples in OJ are examples that use freopen("in.txt", "r", stdin) redirection

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template