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

Common Board

How the memory is used?
Posted by Squid 5 Jan 2006 17:31
#include <iostream>
int main () {
  long n, m;
  std::cin >> n >> m;
  std::cout << n * (m + 1);
  return 0;
}

I've sent this solution and have got AC.
But it used 230KB!
Why my program use so much memory?
Re: How the memory is used?
Posted by Squid 7 Jan 2006 03:13
I've sent my solution, which uses array "reports":

typedef struct {
    int begin, end;
} report;
int main {
    report reports[100000];
        ...
}


Why I got MLE?
As far as I can understand, it's only 800KB!

PS.
There were no arrays anymore in a program.
yes you right.....
Posted by ACM.Tolstobrov_Anatoliy[Ivanovo SPU] 7 Jan 2006 05:58

1037137    05:55:31
7 янв 2006    ACM.Tolstobrov_Anatoliy[Ivanovo SPU]    1000    Pascal    Accepted
    0.001    453 КБ


my code

Var y,x:LongInt;
Begin
Read(y,x);
Write(x+y);
End.



To Admins.
What with options of the compiler?
Pascal memory calculation was fixed
Posted by Vladimir Yakovlev (USU) 7 Jan 2006 16:59