|
|
вернуться в форумwhy acess violation crash(if change to 1..65355 then wa on 8) program History_Exam_1196_sub2; {$APPTYPE CONSOLE} var arr:array[0..66000] of boolean; n,c,cou,sov:longint; begin readln(n); for cou:=1 to n do begin readln(c); arr[c]:=true; end; readln(n); for cou:=1 to n do begin readln(c); if arr[c]=true then inc(sov); end; writeln(sov); end. Array of bool is not working here: "Every year in list doesn't exceed 10^9" (-) Re: why acess violation crash(if change to 1..65355 then wa on 8) var arr:array[0..66000] of boolean; but true var arr:array[0..1000000000] of boolean; And you got AC Re: why acess violation crash(if change to 1..65355 then wa on 8) var arr:array[0..66000] of boolean; but true var arr:array[0..1000000000] of boolean; And you got AC Yes, of course he will get AC :) Re: why acess violation crash(if change to 1..65355 then wa on 8) ?? Can you tell me "{$APPTYPE CONSOLE}" mean ?? Because if don't have it, my memory is more than 36000KB, but when I have it in my program, my memory is less than 500KB ?? |
|
|