ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Общий форум

ADMINS....PLEASE HELP ME...
Послано ZiV 12 янв 2006 18:27
How could got MLT on test 3 if i use static structures..
{$APPTYPE CONSOLE}
Var
 a : array[1..1000] of longint;
 b : array[0..100000] of longint;
 c : array[0..100000] of word;
 n,i,x,y,fl : longint;
 st : string;

Edited by author 12.01.2006 18:45
Yes, it is possible (+)
Послано Dmitry 'Diman_YES' Kovalioff 12 янв 2006 21:40
Memory for static structure is not allocated immediately after the program is launched. To force this allcation you should initialize your static variables yourself:

FillChar(a,SizeOf(a),0);
FillChar(b,SizeOf(b),0);
FillChar(c,SizeOf(c),0);
n:=0; i:=0; x:=0; y:=0; fl:=0;
st:='';

And you will get MLE(1) ;)
Re: ADMINS....PLEASE HELP ME...
Послано wwwwww 13 янв 2006 00:00
Also if you think that in this program you use ~600K
you are wrong (you use about 700K-800K).
So if ML=750K you have chance to get MLE.
Yes, more memory will be allocated. Read FAQ about memory allocation (-)
Послано Dmitry 'Diman_YES' Kovalioff 13 янв 2006 00:25


Edited by author 13.01.2006 00:26