1597 - Searching the Web

All about problems in Volume 15. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

1597 - Searching the Web

Post by brianfry713 »

Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!

Learning poster
Posts: 76
Joined: Sat Feb 23, 2013 4:16 pm
Location: Taiwan, Taipei

Re: 1597 - Searching the Web

Post by dibery »

Getting several PE but don't know what the problem is.

My idea is pretty simple.
For each query, iterate through all articles and all lines.
Print that line if it contains that query word.

The idea works fine, as I got a PE, not WA.
But the problem is why PE. I didn't find the point where I'm missing or adding any spaces.
Please help me, thanks.

My code is at below:

Code: Select all

Got AC. Thanks, nasher!
My problem was that I didn't remove the \n after the number of articles.
Therefore there's a new line in the article. Caused trouble at NOT operation.
Life shouldn't be null.

Post Reply

Return to “Volume 15 (1500-1599)”