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 1292. Mars Space Stations

Who has TIME LIMIT (+)
Posted by Виктор Крупко 26 Apr 2005 23:21
1000=1^3+0^3+0^3+0^3=1
1=1^3=1
IF THE DISTANCE BETWEEN TWO POINTS = 1 THAT FOLLOWING TOO WILL BE 1.
USE BREAK
Re: Who has TIME LIMIT (+)
Posted by Homly 8 Jun 2005 08:32
It is wrong.
"Oh, by the way! The value of SMK is always divisible by 3. It’s normal for Martians – all their numbers are divisible by 3."
Re: Who has TIME LIMIT (+)
Posted by Виктор Крупко 9 Jun 2005 00:56
 On another if the previous number is equal to next that break
Re: Who has TIME LIMIT (+)
Posted by vano_B1 15 Jun 2005 15:16
f(153)=1^3+5^3+3^3=1+125+27=153
=))
Re: Who has TIME LIMIT (+)
Posted by AlexF 25 Feb 2006 19:43
That's really so! :) Thank you! I've got AC!
Why I've got TL?
Posted by FrancaiS 21 Jun 2007 01:35
Its my solution:
[code deleted]

Edited by author 21.06.2007 01:35

Edited by moderator 06.12.2019 20:30
Re: Why I've got TL?
Posted by IgorKoval(from Pskov) 2 Dec 2011 18:57
Your prog get AC, but
look at this test:
1
33333 313 1
log of my prog:
  2)   55
  3)  250
  4)  133
  5)   55
  6)  250
  7)  133
  8)   55
  9)  250
 10)  133
 11)   55
 12)  250
 13)  133
 14)   55
 15)  250
 16)  133
 17)   55
 18)  250
 19)  133
 20)   55
 21)  250
 22)  133
 23)   55
 24)  250
 25)  133
 26)   55
 27)  250
-----
there is period! And you never get dist[j]==dist[j-1]
And your prog get TLE on my test:
       ||| 33333
1)     ||| 33333 313 1
2)     ||| 33333 313 1
3)     ||| 33333 313 1
4)     ||| 33333 313 1
5)     ||| 33333 313 1
i)     ||| 33333 313 1
33333) ||| 33333 313 1

But there is no such tests => AC. =)

[code deleted]

Edited by author 02.12.2011 18:57

Edited by moderator 06.12.2019 20:31
Re: Why I've got TL?
Posted by adamant 29 Apr 2014 13:50
313 isn't divisible by 3.