|
|
back to boardfail Posted by Charm 5 Feb 2011 21:26 В чём ошибка не пойму.? не проходит 1 тест var i,j,k,m,s,n:integer; a,b:array[1..100000] of integer; begin read(n); k:=0; for i:=1 to n do read(a[i]); read(m); for i:=1 to m do read(b[i]); for i:=1 to n do begin for j:=1 to m do begin if a[i]+b[j]=10000 then k:=1; end; end; if k=1 then write('yes'); if k=0 then write('no'); end. Edited by author 05.02.2011 21:26 Edited by author 05.02.2011 21:30 Re: fail Try to use capital letters for the answer: YES and NO Re: fail Исправь "yes" и "no" на "YES" and "NO". Однако после этого будет ТЛЕ на 4 тесте. Используй быструю сортировку и бинарный поиск. Удачи! Re: fail Sorting not needed because input given in sorted order. Actually you even not need to binary-search, just line scan of both arrays. Think what way summ changed if you pick next item in array. Re: fail IMHO sortirovka zdes ninado Re: fail Posted by qwe24 15 Nov 2013 12:04 0.0125 |
|
|