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

Обсуждение задачи 1118. Нетривиальные числа

2 Judges: TEST ARE WRONG!!! Here is a prove... (+)
Послано Akshin Salimov 20 янв 2006 20:36
Judjes tell me after you read my message, I will delete
an AC program.

Here is th 1st program it got WA#3:

[Program was deleted by author, beacuse it got AC =)]
[Thx Vladimir! Judges if you need it, I can post it.]


Here is 2nd program it got AC:

[Program was deleted by author]
[Judges if you need it, I can post that code for a while]

Here is one test:
318 330

Correct answer is 323 (Triviality(323)=0.114551)
AC programs answer for this tests was :
324 (Triviality(324)=1.619195)

It means that AC program gave incorrect answer, but
program which got WA#3 gave correct answer!!!
It's shameful!!!

Edited by author 20.01.2006 20:49

Edited by author 21.01.2006 02:45
Sometimes wrong programs get AC...
Послано Vladimir Yakovlev (USU) 20 янв 2006 22:18
Re: Sometimes wrong programs get AC...
Послано Akshin Salimov 20 янв 2006 22:50
What can you say about program which got wa?
How can you make it to get AC?
Re: Sometimes wrong programs get AC...
Послано Vladimir Yakovlev (USU) 21 янв 2006 02:21
Your mistake is that you forget to add line
prime:=true;
in the end of prime(x) function
AC!!!
Послано Akshin Salimov 21 янв 2006 02:40
I got AC!!!
Vladimir, Thank you very much! You are genius!
Большое человеческое спасибо!
help me please
Послано Nash 8 июл 2007 00:31
 My code:
[code deleted]

I have Time limit exceeded. I need optimal solution of this task. Help me please!

Edited by moderator 19.11.2019 23:40
Re: help me please
Послано Uros Poznan 8 дек 2016 23:45
go to the sqrt(b), not to b/2
Re: help me please
Послано PO 31 дек 2018 12:32
> go to the sqrt(b), not to b/2

could you help understanding why? for 20 the triviality is `(1+2+4+5+10)/20`, kind of meaning you would need to go to b/2. no?
Re: help me please
Послано PO 31 дек 2018 14:35
gotcha. you can do (i + N/i), so the N/i bit will make sure you would need to go only up to sqrt(N). thanks