Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
Язык отправки | DrugovaAleksandraVasilievna | 1275. Knights of the Round Table | 21 апр 2025 22:34 | 1 |
Отсутствует язык отправки C# |
Please help me with a little hint | int2k | 1275. Knights of the Round Table | 5 сен 2024 08:56 | 2 |
I devised that maybe I need to solve many systems of equations. I know the solution if the system has odd equations, but how do I solve the one with even equations? For example: solve for ai, with ki = initial cups at knight i, and F as the final cups to be achieved. a1 + a2 + k2 = F a2 + a3 + k3 = F a3 + a4 + k4 = F a4 + a1 + k1 = F I cannot solve this, even if I could I couldn't image myself programmatically solve it. If the solution is different, please give me some advise. Thanks! For future solver - Basically that's the correct solution despite being optimized or not. For even number of equations, you can solve it directly to save some mem, or you can just bruteforce like me (-1000 -> 1000) for the first value and solve the rest. That will tank the memory alot but it should be fine if you prayed for mercy first before you submit. |
I got WA on test 9 | int2k | 1275. Knights of the Round Table | 5 сен 2024 08:54 | 2 |
can you help me with some tests? I tried every tests in the discussions and they're fine, I also try my own tests with big number too. to clarify, my understanding is that, 0 <= F <= 1000 right? For future solver - This is because while trying to solve system of equations that involves a subset of Knights, I put the "last index + 1" Knight to be 0, which is not true, the system does not always start with Knight 0 |
WA18 | tepamid | 1275. Knights of the Round Table | 1 окт 2021 07:13 | 2 |
WA18 tepamid 18 мар 2021 19:02 Try this if you have WA18: 10 7 3 0 5 9 2 3 7 3 1 4 4 Re: WA18 Nedyalko Borisov 1 окт 2021 07:13 The answer is: 12 1 8 + 1 8 + 4 1 + 9 6 + 2 9 - 2 9 - 3 10 - 6 3 - 6 3 - 6 3 - 6 3 - 6 3 - |
What is the test 29? | Carbon | 1275. Knights of the Round Table | 21 авг 2016 14:52 | 3 |
My solution falls on test 29. I have AC. My calculation of some values was wrong.:( |
TLE27 | kostan3 | 1275. Knights of the Round Table | 8 окт 2013 20:17 | 1 |
TLE27 kostan3 8 окт 2013 20:17 TLE27???????????????? как исправить |
Help! Why do I get WA at test 23??? | SPIRiT | 1275. Knights of the Round Table | 11 июл 2009 00:40 | 5 |
I don't know, what's wrong with my code. Who knows what's the trap? My AC solution gets WA test 29 if I replace `long` with `short int` (short int is 2 bytes, long is 4) P.S. You've got AC, so maybe you'd write what your problem was, to help anyone? Edited by author 04.02.2006 06:51 Okay, I got AC. But I still don't know, what was wrong with test 23. First I tried to solve this problem by solving Hauss equations very accurately. It works very fast, but it didn't pass the 23 test. After that I rewrote the code. Now I solved 'the rings' directly. It's much slower, but it got AC. The hints are: Start with the first knight and put the numbers 1, 1+K,1+2*K,etc. in a buffer, until you reach the first knight again. These knights form a ring, as I call it. They are served by servant in a form of a ring and don't intersect with other knights. So you can check them separately (the problem, therefore, can be separated in few parts). Now, let us denote: X[i] - the number of goblets brought to the i-th and (i+K)-th knight (don't forget, that i+K maybe more that N and use modulus). Therefore we can say that: X[i]+X[i+K]=F-A[i+k], there A[i]- the initial number of goblets near the i-th knight. Also X[i-K]+X[i]=F-A[i], and etc. Therefore you have to solve a system of linear equations, where each equation has two variables (others are zero). This can be optimised very well. If number of knights in the ring is odd, the solving is one. If it's even, you have to minimise it. The result is Sum(|X[i]|). Good luck to you all If you don't understand the solution you can mail me: vdshevch2@mail.ru |
Test this | litaoye | 1275. Knights of the Round Table | 14 апр 2009 22:42 | 1 |
I got AC! At first,My program got WA on #18, My bug is when N is even number,my answer is not minimum value 6 1 2 0 2 2 2 2 0 answer should be: 2 6 1 + 6 1 + |
Be careful | N.M.Hieu ( DHSP ) | 1275. Knights of the Round Table | 26 окт 2008 00:48 | 1 |
I got WA test #21 many times before getting AC. I printed the result without noticing that the servant can take goblets from a knight only if he has at least one goblet near him. So you should print all '+' first and then '-'. |
Please give me some tests. | Khramov Egor(9 class) | 1275. Knights of the Round Table | 17 сен 2007 12:25 | 2 |
4 1 2 1 0 0 1 ans: 3 2 3 + 2 3 + 1 4 + 3 1 0 3 0 0 ans:-1 4 1 8 7 7 9 9 ans: 2 1 2 + 3 4 - 8 3 2 0 0 2 2 2 3 2 1 ans: 8 1 4 + 1 4 + 7 2 + 7 2 + 8 3 + 3 6 - 4 7 - 4 7 - 5 2 4 3 3 2 2 1 ans:-1 |
Was there a rejudge of this problem?(+) | SPIRiT | 1275. Knights of the Round Table | 20 апр 2007 21:58 | 2 |
I remembmer clearly that when I solved it there were 74 accepts (I was 75-th). After that the number of AC grew to 90. And right now there is just 70 AC's. What happened? You are right. There were several bugs in the old validator in this problem. Because of them authors with incorrect solutions could get AC. I fixed the validator about 1 or 2 monthes ago. Tests were not changed. |
test 3 | Trần Quang Chung | 1275. Knights of the Round Table | 29 июн 2006 14:39 | 1 |
test 3 Trần Quang Chung 29 июн 2006 14:39 My prog WA test 3 please post this test or give me somr test!!! |
Who can help me? I got WA on test 5 Who has the test??? Thank you!!! | Dream | 1275. Knights of the Round Table | 21 май 2004 15:18 | 1 |
|