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 1306. Sequence Median

Memory in C#
Posted by Lebedev 10 Nov 2011 21:03
I wrote program and got Memory Limit on test #1. It was near 1,3MB. I rewrote it, using array, which contains only half of data. As I counted, it must be 0,5MB-0,7MB, but I got ML#1 again. Using task manager I found, that memory on my program on C# was 1252KB for array of 4 elements (as in example). Can you help me? Code for creating array:
            int n = int.Parse(Console.ReadLine());
            int c = n / 2 + 1;
            uint[] a = new uint[c];

Edited by author 10.11.2011 21:03
Re: Memory in C#
Posted by Anatoly 7 Feb 2012 13:26
The simplest C# program (without data allocation by coder) takes about 2 MB (according to calculations on this site) of memory. So, I doubt that it is possible.