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 1040. Airline Company

Show all messages Hide all messages

My AC road prince 21 Jul 2003 17:16
I didn't understand the problem properly at first, i thought the sum
of the flight number at one airport must be prime number. So i worte
a 200 lines prog. which the judge function is so strict that it won't
give an answer in 5s on the last one or two test data. Then i do the
optimization work here and there , but of couse it won't work.
Finally , i got AC!!!!!!!!!!!
Re: My AC road Marcin Mika 21 Jul 2003 21:52
isn't it enough to simply print the first m prime numbers ?
since gcd of any prime numbers is 1.
no, flight numbers are from 1 through M Neal Zane 22 Jul 2003 07:12
> isn't it enough to simply print the first m prime numbers ?
> since gcd of any prime numbers is 1.
>