Link to pdf version on UVa OJ
This is a very easy problem. I just want to write about simple points. First of all you can ignore Chinese characters, right? In each line there are either one integer or two integers. Look for them,
tokenize each line and take the first and second number as integers.
The rest is straightforward.
And also another point, even if the problem is super easy and the statement is short don't skim the problem statement, read it carefully. I didn't read input format correctly and I thought there could be many more different kind of inputs, though there are only two type of inputs.
My code on github
This is a very easy problem. I just want to write about simple points. First of all you can ignore Chinese characters, right? In each line there are either one integer or two integers. Look for them,
tokenize each line and take the first and second number as integers.
The rest is straightforward.
And also another point, even if the problem is super easy and the statement is short don't skim the problem statement, read it carefully. I didn't read input format correctly and I thought there could be many more different kind of inputs, though there are only two type of inputs.
My code on github
No comments:
Post a Comment