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

Обсуждение задачи 1048. Сверхдлинные суммы

Can anyone help me or at least give me a hint?
Послано Simeon Kostenski 17 апр 2001 03:20
I've submitted this problem thousands of times but in
vain.... Always "MEMORY LIMIT EXCEEDED". And how then? I
just have an array [1..1000000]of 0..19 and almost that's
all but- "memory limit exceeded". I just can't imagine how
you can not exceed it- at least, it is obvious that you
must keep the numbers beacuse they are in reversed order-
from the first to the last. So, I tried different
sollutions but none of them was accepteed. Help please....
Re: Can anyone help me or at least give me a hint?
Послано Krzysztof Kapuscik 20 апр 2001 18:42
I use -> unsigned char cell[(1000000+1)/2];
in pascal -> array [1..(1000000+1)/2] of byte and store two
digits in one byte.
Re: Can anyone help me or at least give me a hint?
Послано Donny Riyadi 7 июн 2001 10:40
> I use -> unsigned char cell[(1000000+1)/2];
> in pascal -> array [1..(1000000+1)/2] of byte and store
two
> digits in one byte.
what do u mean by (1000000+1/2) its not valid, its must be
rounded. and do u have any idea how to make the array
possible to store up to 1000000 data ? I mean array
[1..1000000] ?
Re: Can anyone help me or at least give me a hint?
Послано Mih 31 июл 2001 21:12
you don't have to STORE theese numbers in any array
Re: Can anyone help me or at least give me a hint?
Послано liufeng 7 сен 2001 09:10
> I've submitted this problem thousands of times but in
> vain.... Always "MEMORY LIMIT EXCEEDED". And how then? I
> just have an array [1..1000000]of 0..19 and almost that's
> all but- "memory limit exceeded". I just can't imagine
how
> you can not exceed it- at least, it is obvious that you
> must keep the numbers beacuse they are in reversed order-
> from the first to the last. So, I tried different
> sollutions but none of them was accepteed. Help please....
the problem is so easy that i don't know why the difficulty
of it is so high! my program only use 65k memory:)
you needn't record all the sum numbers,just write some
numbers while reading some numbers,but there are some
skills in it to compute the sum! you should analyze every
case your program read. i don't want to tell the methods.
it's your task!