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 1001. Reverse Root

Тест №6 (1001)
Posted by GaryFreeman 27 Sep 2013 23:10
Всем привет! Помогите плиз, никак не могу пройти тест номер 6. Какие числа не подбираю, у меня все работает. А вот что-то там хитрое в этом тесте, если не составит труда, помогите. Вот код:
[cpp]
#include <cmath>
#include <cstdio>

int main(int argc, char* argv[])
{
    double tmp[32];
    char i = 0;

    while (i < 32 && std::scanf("%lf", &tmp[i]) != EOF) {
        ++i;
    }

    for (--i; i >= 0; --i) {
        std::printf("%.4lf\n", sqrt(tmp[i]));
    }

    return 0;
}
[/cpp]
Re: Тест №6 (1001)
You are probably joking =) Why did you decide that there can be at most 32 numbers in the input???
Re: Тест №6 (1001)
Posted by GaryFreeman 30 Sep 2013 15:39
Wow, it's my mistake. Okey, so I can do working code, but tell my please, how does first place in top work? Only 760Kb of memory and 0.015s of working, it's amazing! My previus version was (0.421s/5244Kb)