Re: 111 History grading
Posted: Mon Aug 04, 2014 11:13 am
Your program gives wrong output for second sample
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.
You misunderstood problem. Read this thread
It must be
Code: Select all
6
4
10
5
5
5
5
5
5
Code: Select all
6
5
10
9
And change thisJan wrote:Check the following thread...
http://online-judge.uva.es/board/viewtopic.php?t=7879
Code: Select all
cout<<"\n"<<lcs(arr1,arr2,n,n);
Code: Select all
cout<<lcs(arr1,arr2,n,n)<<"\n";