| Show all threads Hide all threads Show all messages Hide all messages |
| give me hint | quick(YarSU) | 1766. Humpty Dumpty | 23 Sep 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. Caravans | 23 Sep 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. Frontier | 23 Sep 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. ACM Poker | 21 Sep 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 | D4nick | 1488. ACM Poker | 19 Sep 2020 23:51 | 1 |
|
| WA1. Is first test different, or it's problem with IO? | Ionkin M [Samara SAU #617] | 1142. Relations | 19 Sep 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 | D4nick | 2148. Insane Shot | 18 Sep 2020 20:56 | 1 |
use double for ALL variables |
| WA 9 hint | D4nick | 2148. Insane Shot | 18 Sep 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. City Blocks | 16 Sep 2020 22:50 | 1 |
|
| test 2 | Arseniy | 2034. Caravans | 16 Sep 2020 21:58 | 3 |
test 2 Arseniy 30 Mar 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 | 1120. Sum of Sequential Numbers | 15 Sep 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. Another Dress Rehearsal | 14 Sep 2020 23:37 | 1 |
WA14 Rodion 14 Sep 2020 23:37 pls help, what is in test №14 |
| Why test # 6 is wrong? | AlexRad | 1607. Taxi | 14 Sep 2020 18:26 | 4 |
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; var tokens = Console.ReadLine().Trim(). Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries); var a = int.Parse(tokens[0]); var b = int.Parse(tokens[1]); var c = int.Parse(tokens[2]); var d = int.Parse(tokens[3]); var min = a + (c - a) / (b + d) * b; var max = c - (c - a) / (b + d) * d; min = Math.Min(min + b, Math.Max(min, max)); max = Math.Max(max - d, min); Console.WriteLine(max); Corrected, see !!! sign Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; var tokens = Console.ReadLine().Trim(). Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries); var a = int.Parse(tokens[0]); var b = int.Parse(tokens[1]); var c = Math.Max(int.Parse(tokens[2]), a); // !!!! var d = int.Parse(tokens[3]); var min = a + (c - a) / (b + d) * b; var max = c - (c - a) / (b + d) * d; min = Math.Min(min + b, max); max = Math.Max(max - d, min); Console.WriteLine(max); } This is strange: "The driver would not ask a sum that is less than that offered by Petr." #include<bits/stdc++.h> using namespace std; int gcd(int a,int b){ if(b==0)return a; return gcd(b,a%b); } int main() { int a,b,c,d; cin>>a>>b>>c>>d; int carry=(c-a)%(b+d); int res=(c-a)/(b+d); if(carry==0){ cout<<a+res*b<<'\n'; } else if(carry>=b){ cout<<a+(res+1)*b<<'\n'; } else if(carry<b){ cout<<c-res*d<<'\n'; } } why wrong ans in test #6? |
| WA22 | Levon Oganesyan | 2146. Quiz Show | 13 Sep 2020 04:34 | 1 |
WA22 Levon Oganesyan 13 Sep 2020 04:34 |
| hint python | Rodion | 2056. Scholarship | 12 Sep 2020 22:32 | 1 |
if u wanna break your programm type sys.exit() (don't forget to type import sys in the beginning of the programm) _____________________ если вы хотите полностью прервать вашу программу, то импортируйте библиотеку sys и пропишите sys.exit() |
| TLE8 Python | Manfre | 1196. History Exam | 12 Sep 2020 05:03 | 4 |
Could anyone give a piece of advice if i have a time limit exceeded with binary search? Try sys.stdin.readline() instead of input() It was helpful for me 0. use sys.stdin.readline() (but not readlines! to avoid MLE) 1. do not convert strings to integers 2. use standard set, check x in set using these ideas i got ok in 0.656, but i'm still wonder how to achive 0.093 (as the best one) UPD: 0.328 can be achived via os.read by parts ~500kb + len(list(filter(...))) Edited by author 12.09.2020 06:07 |
| HELP PLEASE WA TEST#8 | Лерник Казарян [RAU] | 1118. Nontrivial Numbers | 11 Sep 2020 21:29 | 2 |
the right border is a Prime number |
| Wrong Answer at Test Case #12 | Zhang Fei | 2142. Magic | 11 Sep 2020 20:41 | 1 |
It's never endless fixing |
| Wrong Answer at Test Case #10 | Zhang Fei | 2142. Magic | 11 Sep 2020 19:32 | 1 |
Ok I understand now...It means in blue-red land you can either grab mana from blue or red. Edited by author 11.09.2020 20:18 Edited by author 12.09.2020 17:07 Edited by author 12.09.2020 17:08 |
| New tests | lilipottter | 1810. Antiequations | 11 Sep 2020 17:34 | 1 |
Hm. Seems there are no tests with small number of linear independent rows. I have two solutions with different answers to such tests, but both got OK. Admins, please, add some. 30 30 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 ... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 30 30 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 x20 30 30 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 x10 |