ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1252. Sorting the Tombstones

how can i get MLE?
Posted by testing~ 31 Jul 2004 10:16
//  {$I+,Q+,R+,S-}
program Sorting_the_tombstones ;
  const
    maxn = 130000;
    mask : longint = 30000;
  var
    i,j,k,n,kk,t,ss  : longint;
    a  : array[1..maxn]of integer;
    aa : array[1..maxn]of byte;
    b  : array[0..maxn div 8]of byte;
  function gcd(a,b : longint ) : longint ;
    begin
      while b>0 do
        begin
          a:=a mod b;
          if a=0 then break;
          b:=b mod a;
        end;
      gcd:=a+b;
    end;
  begin
   //main;
  end.

look i only use such few various...but the online judge said i used 1009kb!!why?
Re: how can i get MLE?
Posted by Saturn 31 Jul 2004 10:33
You should use smallint instead of integer
In some compiler integer=longint(4 bytes)
Try smallint maybe you can get AC
goodluck!

Edited by author 31.07.2004 20:51
Re: how can i get MLE?
Posted by Kopeliovitch Sergey (1) 31 Jul 2004 13:31
And because compiler uses about 350KB (-)