Идёт турнир! | В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.
|
|
imesecan | 17.мар.2012 в 14:16:37 | |
0 | If you search the buses all the time, it will give "Time limit error". Because it says that 500.000 restrictions and 10.000 buses.
|
imesecan | 17.мар.2012 в 15:21:38
| 1 | Сообщение скрыто
|
imesecan | 17.мар.2012 в 18:45:24 | |
2 | It's up to your coding. You can read using normal methods. This is just an extra info.
|
imesecan | 17.мар.2012 в 19:46:34 | |
3 | Here in this question, we have buses from 1 to n. Then, putting them in order is easy. Because every number (bus) appears once.
Such sorting is called bucket sort.
When getting bus orders, we can directly assign that bus position to its bucket.
Later, when asking for the position of that bus just go into its bucket and take the position and compare the positions.
if the position of the first bus is smaller than the second one, then this is OK. Otherwise increment the wrong number counter.
|
imesecan | 17.мар.2012 в 19:55:24
| 4 | Сообщение скрыто
|
imesecan | 17.мар.2012 в 20:29:11
| 5 | Сообщение скрыто
|
imesecan | 17.мар.2012 в 20:30:51
| 6 | Сообщение скрыто
|
imesecan | 17.мар.2012 в 21:07:13 | |
7 | Реплика удалена
|
imesecan | 17.мар.2012 в 21:43:56 | |
8 | Реплика удалена
|
imesecan | 19.мар.2012 в 14:54:32 | |
9 | I can send a test but I don't have your email.
|
imesecan | 19.мар.2012 в 15:01:03 | |
10 | Your program doesn't give error on the second and third input sets because their result is 0 (in a way which is easy to be produced).
In this question, you are asked to find out how many of the restrictions are not satisfied. Thus, when checking you need to know the current bus order. Your program reads the bus order while checking.
This is not acceptable. Because you cannot know the which bus is the first and which is last.
You must first read all the input, then start processing.
|
imesecan | 19.мар.2012 в 15:40:20 | |
11 | Реплика удалена
|
imesecan | 19.мар.2012 в 22:01:47 | |
12 | Реплика удалена
|
imesecan | 21.мар.2012 в 08:27:21 | |
13 | Our thanks goes to CLig.
He has found a mistake in the question. Now I fixed and re-evaluated your previous submissions.
And congratulations.
|
|