111 - History Grading

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

Moderator: Board moderators

lighted
Guru
Posts: 587
Joined: Wed Jun 11, 2014 9:56 pm
Location: Kyrgyzstan, Bishkek

Re: 111 History grading

Post by lighted »

Your program gives wrong output for second sample

Code: Select all

6
4
10
5
5
5
5
5
5
Your program reads n - 1 lines to find lcs. Instead of this it must read until exists lines. Check second sample there are only 4 answers not 9.

Code: Select all

6
5
10
9
You misunderstood problem. Read this thread
Jan wrote:Check the following thread...
http://online-judge.uva.es/board/viewtopic.php?t=7879
And change this

Code: Select all

 cout<<"\n"<<lcs(arr1,arr2,n,n);
It must be

Code: Select all

 cout<<lcs(arr1,arr2,n,n)<<"\n";
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Post Reply

Return to “Volume 1 (100-199)”