| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| (C++ VS Go) What are the tests #2 and #6? | grinrag | 1178. Дороги Акбардина | 29 сен 2020 01:02 | 2 |
I am learning Golang and rewriting my solutions from C++ to Golang, changes should no affect the result, but it started failing either on test #2 or test #6. Could you, please, provide me those tests to understand what is the problem? Thanks! Edited by author 29.09.2020 01:07 Ok, looks like in my case the format of input data in tests #2 and #6 is differ from the one in the example. Accepted Go code is: package main import ( "fmt" "sort" ) type city struct { n, x, y int } func main() { var n int fmt.Scan(&n) m := make([]city, n) for i := 0; i < n; i++ { m[i].n = i + 1 fmt.Scan(&m[i].x, &m[i].y) } sort.Slice(m, func(i, j int) bool { if m[i].x < m[j].x { return true } return false }) for i := 0; i < n; i += 2 { fmt.Println(m[i].n, m[i+1].n) } } time: 0.14 memory: 2 044 КB Edited by author 29.09.2020 01:10 |
| If you have WA 76 | Komershan`~ | 1643. Атака Тёмной крепости | 28 сен 2020 21:56 | 1 |
Try this test 4 4 !### ABAA AABA *##$ The answer is 2 |
| To those who are solving this using hashing/kmp | springWaltz | 1354. Палиндром. Он же палиндром | 28 сен 2020 21:05 | 1 |
An easy and simple o(n) solution exists. pretty basic |
| getting TLE with python | Yash Sinha | 1167. Bicolored Horses | 28 сен 2020 14:26 | 1 |
did anyone solve it with python? |
| WA 4. Can anybody give some tests. You can see my code. | Minayev {SESC USU} | 1146. Maximum Sum | 25 сен 2020 19:10 | 3 |
oh i found my mistake Edited by author 03.11.2014 12:28 4 -1 -2 -3 -4 -5 0 -7 -8 -9 -1 -127 -100 -3 -4 -7 -1 I have WA on tc 4 too and am unable to figure it out. Some help? |
| 16 lines | mmd18cury | 1576. Телефонные тарифы | 25 сен 2020 17:04 | 1 |
#include <stdio.h> #include <iostream> #include <algorithm> using namespace std; int main() { int N1, C1, N2, limit, C2, N3, n, time = 0, mins, secs, ans; cin >> N1 >> C1 >> N2 >> limit >> C2 >> N3 >> n; for (int i = 0; i < n; i++) { scanf("%d:%d", &mins, &secs); ans = mins * 60 + secs; time += ans > 6 ? (ans + 59) / 60 : 0; } cout << "Basic: " << N1 + time*C1 << '\n' << "Combined: " << N2 + max(time - limit, 0) * C2 << '\n' << "Unlimited: " << N3; } Edited by author 25.09.2020 23:01 |
| What is mistake? 3 days of hard tries | Dmitriy | 2003. Простая магия | 24 сен 2020 16:28 | 5 |
Hello, as you can see ( http://acm.timus.ru/status.aspx?author=52097 ), my solve cant get AC. For all my test cases it looks like very good. Probably I have a little bug or something else and I cant find this mistake (WA on test #10). After many hours spenting for this problem I dont know where could it be. Please, give me simple hint or fail testcase. My solution at work on those tests: 4 1 1 1 1 0 4 3 1 3 3 inf 4 8 12 4 6 inf 6 4 4 2 4 2 2 inf 3 5 3 7 1 3 8 8 3 2 3 32 64 3 2 3 36 225 1225 2 3 16777216 1594323 5764801 1 3 16777216 1594323 11529602 2 6 2365440 2 3 5 7 11 2 It looks like good for big tests too. Please help. What is the #10 test? Edited by author 03.09.2016 20:56(my solution provide 4 answers at all: infinity, 0, 1, 2) You're welcome~ Edited by author 04.09.2016 18:23 . Edited by author 24.09.2020 17:19 |
| WA 4 | Vladimir Shevchuk | 1297. Палиндромы | 24 сен 2020 07:11 | 2 |
WA 4 Vladimir Shevchuk 9 авг 2013 16:43 Re: WA 4 Avaneendra Alugupalli 24 сен 2020 07:11 looks like "aaaa" answer should be full string. input: aaaa output : aaaa |
| give me hint | quick(YaroslavlSU) | 1766. Шалтай-Болтай | 23 сен 2020 21:34 | 3 |
Search up Markov chains. To solve this problem you have to build a state transition matrix and compute its sufficiently large power. |
| Weak Test cases | sagsango | 2034. Корованы | 23 сен 2020 15:44 | 3 |
For this Test case , AC solution gives output 2 which should be 1. 25 28 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 1 5 19 19 20 20 21 21 22 22 23 23 24 24 25 25 14 15 22 6 22 1 10 22 Edited by author 20.02.2020 05:33 Edited by author 20.02.2020 05:33 is 1 the correct answer ? Nvm Edited by author 23.09.2020 15:53 |
| If you get WA, try this test too | BigPolandBro | 1065. Граница | 23 сен 2020 00:06 | 1 |
6 1 1 0 0 4 0 6 1 10 2 6 2 4 1 5 answer is 8 |
| If you have WA @ 2 | 198808xc | 1488. Покер-АСМ | 21 сен 2020 23:52 | 5 |
Please notice the POINT: If both players have "two of a kind", then the ranks of paired cards are compared first, and if they are equal, then the ranks of the thirds cards are compared. I think this is the one easiest to have been ignored. (Sorry for my poor English) Hi, What about the scenario where both players have flush ? In texas holdem whosoever has higher highest card wins and if they are the same then it's a tie. So what should be the answer for the following test case. 4C 6C 8C 3H 4H 8H AS AD Mine is Artyom because both player's best hand is eight high flush (even though the next best card of sasha (6) is greater than next best card of dima (4)). Ok, the answer for previous test case is Sasha because Sasha's second card is higher than Dima's ( whose best hand is also flush) second highest card (as they both have the same hand). This turned out to be a little different from the normal texas holdem poker as there only the highest card matters which is correct because two players in texas holdem cannot have same high card for flush. But here its a different story. > This turned out to be a little different from the normal texas holdem poker as there only the highest card matters which is correct because two players in texas holdem cannot have same high card for flush. LOLWUT? |
| Remember straight is better than flush, it's not real pocker | mmd18cury | 1488. Покер-АСМ | 19 сен 2020 23:51 | 1 |
|
| WA1. Is first test different, or it's problem with IO? | Ionkin M [Samara SAU #617] | 1142. Отношения | 19 сен 2020 00:49 | 2 |
I have correct answer at least on first test, but I got WA1! Why? Is first test different with a test in a problem's description? I write each line of my answer via Scala println (similar with Java), and read with StdIn.readLine. Edited by author 25.08.2019 19:14 Edited by author 25.08.2019 19:15 |
| WA17 hint | mmd18cury | 2148. Безумный выстрел | 18 сен 2020 20:56 | 1 |
use double for ALL variables |
| WA 9 hint | mmd18cury | 2148. Безумный выстрел | 18 сен 2020 17:44 | 1 |
Test 9 is about the possibility of the shoot. For example I just changed < on <=: if (4 * (pow(x1 - xc, 2) + pow(y1 - yc, 2) - pow(r, 2)) <= pow(x2 - x1, 2) + pow(y2 - y1, 2)) { |
| explanation for solution | lostbrain | 1139. Городские кварталы | 16 сен 2020 22:50 | 1 |
|
| test 2 | Arseniy_Pavlov | 2034. Корованы | 16 сен 2020 21:58 | 3 |
test 2 Arseniy_Pavlov 30 мар 2016 00:22 I figured out that n == 8 in test 2. It may be useful for somebody. I got my problem I erased from multiset in a wrong way what is the whole test case ? . i am getting wrong answer on test case 2 ! |
| What is the answer for 111111113 | Samvel (RAU) | 1120. Сумма последовательных чисел | 15 сен 2020 17:25 | 6 |
My AC solution returns 55555556 2 Hi, Mine is same as Howard Liu i.e. 55555556 2 Varun > My answer is 61313 68558 This is an answer for 6553562057. I also get 55555556 2 for 111111113. |
| WA14 | Rodion | 2035. Очередной пробный тур | 14 сен 2020 23:37 | 1 |
WA14 Rodion 14 сен 2020 23:37 pls help, what is in test №14 |