|
|
вернуться в форумОбщий форумHow the memory is used? Послано Squid 5 янв 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? Послано Squid 7 янв 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..... 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 |
|
|