| Show all threads Hide all threads Show all messages Hide all messages |
| Hint | frochbg | 1034. Queens in Peaceful Positions | 8 Oct 2020 13:15 | 2 |
Hint frochbg 3 Oct 2020 13:37 I have been trying to solve this problem for several days, but suddenly I ran out of ideas. Could you give me some hints on the task? I have tried brute force and some pruning, but it got TLE. I would be really happy! :) I've got AC! The main observation is that no two queens can be in the same row or column. Thus, we make an array perm[i], which stands for queen in the ith row and perm[i]th column. The problem is to find the number of permutations, which differs from the initial by 3 elements and check for each possibility whether we have conflicts on the diagonals. perm[i] is the initial permutation. I hope this hint was helpful! |
| help test19 | marlen200186 | 1208. Legendary Teams Contest | 8 Oct 2020 00:26 | 1 |
|
| Test4 | Nadezhda | 1134. Cards | 7 Oct 2020 20:45 | 5 |
Test4 Nadezhda 9 Nov 2013 17:52 Please, tell me what is in Test4??????? I also got WA for test 4.....so I started to try some self made test cases.....and I came across this one : 5 4 2 0 1 3 My output : NO. Correct Output should be YES. I will have to rethink my approach.....maybe you have the same problem as well. case 3 3 1 2 3 helped me in test 4. But anyway it's better to write your own test case generator. Edited by author 18.04.2020 04:47 |
| It’s a very practical problem. | Sultana Razia | 1638. Bookworm | 6 Oct 2020 07:08 | 1 |
I did not understand this problem firstly .But after 3rd trial i get amused!. |
| Interesting Problem it is...! | ইলহাম আল মুসাব্বির | 1638. Bookworm | 6 Oct 2020 07:04 | 2 |
Read the problem statement carefully. Its a very realistic,practical and easy problem. Draw a picture to help yourself for finding the solution. Keep in mind that the worm will move leftwards or rightwards from its initial position according to input of starting volume and ending volume. It is also possible that the worm started and ended in the same volume... Happy Coding...:) First i did not understand this problem.but your suggestions help me.thanks!!!And it is really very practical, realistic and easy problem!! |
| Runtime error из-за чего эта ошибка? | German | 1293. Eniya | 5 Oct 2020 22:06 | 1 |
a=float(input()) b=float(input()) c=float(input()) k=a*b*c*2 print(k) |
| I can't understand the problem's statement | Bahturin Alexander (SibSUTI) | 1638. Bookworm | 5 Oct 2020 18:46 | 6 |
If the worm starts from the first sheet of the first volume and finishes at the last one of the second volume, how could the answer for the sample input be 2, given that the thikness of the book (not including the cover) is 10? Worm can move both left and right. Stop for a while and think about it. In some languages, the "first page" of a book is on the left side of the book when the book is placed on a shelf. In which case "10 1 1 2" == 22. Just take two books and try - you will find answer immediately I fully agree with you.How could the answer for sample input be 2. |
| The sample output may not be correct. | Rotter Tarmination | 1058. Chocolate | 3 Oct 2020 16:23 | 1 |
I have got AC on this problem. In the description, it says "accuracy to 0.0001". In the code which I submitted, I use printf("%.4lf\n", min_breakage); to match the point. When I use the sample input, my output is 3.0000. But the sample output is 3. So I think the sample output may be wrong. Or both the two outputs are correct? |
| MLE 14 | Levon Oganesyan | 1971. Graphics Settings | 3 Oct 2020 01:35 | 1 |
MLE 14 Levon Oganesyan 3 Oct 2020 01:35 I had MLE because of bug in segment tree. In test 14: n = 0. |
| 1607. Такси. Ошибка на шестом тесте. Помогите ! | Navalnnny | 1607. Taxi | 2 Oct 2020 16:52 | 2 |
#include <iostream> using namespace std; int main() { long long a, b, c, d; int r = 0, g; cin >> a >> b; cin >> c >> d; g = (a + b * (c - a + d) / (b + d)) - ((a + b * (c - a + d) / (b + d)) % b); cout << g << endl; return 0; } Edited by author 02.10.2020 16:52 |
| test 4 fails | anupam | 1014. Product of Digits | 1 Oct 2020 08:04 | 7 |
i dont know why my code is failing test 4.can any body give me a series of test cases where this kind of program may fail. please help try it ACM.Tolstobrov_Anatoliy[Ivanovo SPU] 7 Feb 2006 01:18 but i think if n<10 then least possible number will be n. your solution makes it 2 digit. The task is to find a minimal POSITIVE number, so 0 doesn't work. |
| (C++ VS Go) What are the tests #2 and #6? | grinrag | 1178. Akbardin’s Roads | 29 Sep 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 | Aleksandr Derevyagin | 1643. Attack of the Dark Fortress | 28 Sep 2020 21:56 | 1 |
Try this test 4 4 !### ABAA AABA *##$ The answer is 2 |
| To those who are solving this using hashing/kmp | guilty spark | 1354. Palindrome. Again Palindrome | 28 Sep 2020 21:05 | 1 |
An easy and simple o(n) solution exists. pretty basic |
| getting TLE with python | Yash Sinha | 1167. Bicolored Horses | 28 Sep 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 Sep 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 | D4nick | 1576. Telephone Tariffs | 25 Sep 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. Simple Magic | 24 Sep 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 | Anton Malyuta | 1297. Palindrome | 24 Sep 2020 07:11 | 2 |
WA 4 Anton Malyuta 9 Aug 2013 16:43 Re: WA 4 Avaneendra Alugupalli 24 Sep 2020 07:11 looks like "aaaa" answer should be full string. input: aaaa output : aaaa |
| 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. |