Winter training - structure

Each topic has a hyperlink, click to jump to the title screen! ! !

Lin oj 1053 application structure

1. If the input scanf spaces strings can be% [^ \ n].
2.scanf ( "% s% [^ \ n]% lf", stu [i] .a, stu [i] .b, & stu [i] .c) in the transport spaces can swallow, tab key, and spacebar, which can correctly enter your current data without affecting the data is entered correctly later.
After the Enter key input into circulation before the enter key and 3. The cycle will affect the Enter key data, and the Enter key after the loop does not affect (the premise is the inner loop first data entered is not a single character ) for a correct input data cycle.
Here Insert Picture Description

Lin oj 1637 height issue

Sort using structure
Here Insert Picture Description

Lin oj 1638 performance statistics

M1: by using a structure
Here Insert Picture Description
M2: the structure may not use
Here Insert Picture Description
M3:
first cycle of data in a single character is entered, so after the completion of each cycle should swallow Enter.
Here Insert Picture Description

Lin oj 1186 outstanding students

M1:
Here Insert Picture Description
M2:
thinking Diudiu barrels a row

Here Insert Picture Description

Lin oj 1147 who fail?

Diudiu took advantage of the idea of ​​a bucket row
Here Insert Picture Description

Published 11 original articles · won praise 12 · views 563

Guess you like

Origin blog.csdn.net/SSnTi/article/details/104166470