Can anyone post test 5 ?
Послано
Nurbek 29 окт 2006 14:14
Re: Can anyone post test 5 ?
Послано
tester 29 окт 2006 14:16
maybe like this....
5
1 2 3 4 5
or
1
1
or
5
1 1 1 1 1
Re: Can anyone post test 5 ?
Послано
Nurbek 29 окт 2006 14:28
Does each answer in your tests equal to 1 ?
Edited by author 29.10.2006 14:28
Re: Can anyone post test 5 ?
Послано
tester 29 окт 2006 14:31
yes.
paste your code here.later delete.
Re: OK
Послано
Nurbek 29 окт 2006 14:32
Edited by author 29.10.2006 14:50
Re: OK
Послано
tester 29 окт 2006 14:35
ohhhh.your solution incorrect.because
0 ≤ K ≤ 1000000000
check this test
4
10000000 10000001 10000001 100000002
answer:10000001
Re: Can anyone post test 5 ?
Test "5 1 2 3 4 5" is incorrect!
Re: OK
Послано
Nurbek 29 окт 2006 14:41
It gives error, shouldn't longint include all of this data ?
Re: OK
Послано
tester 29 окт 2006 14:44
begin
read(u); here>> 0 ≤ U ≤ 1000000000 and your array z:array[0..500000] of longint;
inc(z[u]);
end;
use quicksort.
Re: OK
Послано
Nurbek 29 окт 2006 14:49
Thanx a lot!!! I picked up a wrong solution way !!!
tests of tester
the answer on test
4
10000000
10000001
10000001
100000002
is 100000002
Re: tests of tester
Are you sure??? Read problem statement more carefuly. You should to output the majority element of this array[it's element which meeting in array more then n/2 times], so the majority element in your sample is 10000001.
Re: Can anyone post test 5 ?
Послано
Logic 13 мар 2007 11:16
hi Nurbek where do you study ?
which ktl ?