Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
What to do? | bsu.mmf.team | 1890. Деньги из воздуха | 7 сен 2019 22:32 | 2 |
OMG, standart interval tree gives TLE 6. It's terrible! Why?! Use Segment Trees with lazy propagation |
AC | qwertyqwe | 1124. Мозаика | 7 сен 2019 13:54 | 1 |
AC qwertyqwe 7 сен 2019 13:54 Please, could you send your problem(AC code) |
need some test cases please | anupam ghosh | 1960. Палиндромы и сверхспособности | 7 сен 2019 06:29 | 1 |
|
AC | qwertyqwe | 1101. Робот в поле | 6 сен 2019 23:30 | 1 |
AC qwertyqwe 6 сен 2019 23:30 Please, could you send your problem(AC code) |
a | Dan | 1457. Теплотрасса | 6 сен 2019 18:38 | 1 |
Edited by author 09.09.2019 23:30 |
Is the answer of second sample impossible? | Beqa Lomitashvili [Freeuni] | 1549. Японский пазл | 6 сен 2019 00:05 | 2 |
49 3 I mean, FRRR or FLLL or FLFLLF could return us to the base, it also doesn't violate any of two rules: 1. The total number of letters F must not exceed S and 2. the total number of letters L and R must not exceed T are there any more restrictions??? The problem asks: "What is the longest closed path that you can assemble?" Your examples are not closed loops. The first and last squares, although they are neighbours, they don't match their path endings. |
what's wrong??? C++ | inctnce | 1787. Поворот на МЕГУ | 5 сен 2019 23:55 | 1 |
#include <iostream> using namespace std; int main() {
int n, k; cin >> n >> k; int c = n * k; int *arr = new int[k];
for (int i = 0; i < k; i++) { cin >> arr[i]; c = c - arr[i]; }
cout << abs(c);
} |
WA 4 | M@STeR.SoBG | 1303. Минимальное покрытие | 5 сен 2019 14:45 | 9 |
WA 4 M@STeR.SoBG 15 апр 2008 14:24 Could anybody help me? I have WA at 4th test! Re: WA 4 Vladimir Plyashkun [CSU] 3 май 2012 00:53 u may try this test: 2 1 2 0 1 0 0 so output should be: 2 0 1 1 2 when WA is 2 1 2 0 1 Re: WA 4 Smilodon_am [Obninsk INPE] 18 сен 2012 21:54 This test helped me: 4 0 4 -5 0 3 4 -4 4 0 0 Answer is: 1 -4 4 Is the answer : 1 0 4 right? i have wa 4 too,and i am confused about the output principles. Re: WA 4 Marin Shalamanov 30 янв 2013 21:37 This test helped me: 10 -5 1 1 14 -5 2 2 3 3 19 0 0 The answer is: 2 -5 1 1 14 Now, let's fight with WA5 :D why not this: 2 -5 2 1 14 ? Actually, what if there are several possibilites to cover? I think that it does not matter which one you choose, as long as it has a minimum number of intervals. I guess the judge just tests whether the intervals you give cover the large interval. Best regards, Erik Edited by author 25.02.2013 04:56 This test helped me too. At last got AC. My solution is similar to task 1987. Edited by author 05.09.2019 16:47 |
Proof of the result? (+) | Vedernikoff Sergey (HSE: АОП) | 1714. Мнемоника и палиндромы 2 | 5 сен 2019 04:11 | 2 |
Ok, I've found relation between n and maximin palindrome number and several optimal patterns that depend on n mod 12. Only one question has left: how to prove all this stuff? My AC solution is using n mod 6 to determine the optimal solution. The proof is rather complicated and heavily relies on some particular pattern of length 6. Apart from that, it's just analysing lots and lots of cases. |
Cameras on starting and finish line | espr1t | 1990. Гонки на карах | 5 сен 2019 01:27 | 2 |
How to treat cameras, located on the starting and/or finish line? Do racers interact with them? My AC solution treats those cameras as if they interact with the racers. |
Hint For Test Case# 16 | Yuv | 1423. Басня о строке | 4 сен 2019 10:49 | 2 |
Cannot break this case. Any hint? Ok I don't know what was the case# 16. But I have found some test cases: 9 abghxrfab rfabghxrf ans: -1 9 abghxabab ababghxab ans: 2 12 abcghxabcabc cabcghxabcab ans: 1 |
Algo. Hints. | IgorKoval(from Pskov) | 1894. Нелётная погода | 3 сен 2019 16:47 | 4 |
What is algorithm? What formulas, theorems, equations and hints must I use? Thx Really, if we can find A-B then we must understand that [0,0] belong to A-B or not If 'yes' then answer = max{0, dist([0,0], A-B) - 60} If 'no' then answer = 0 |
Getting wrong answer for test case #3 | Aakanksha Sharma | 1146. Maximum Sum | 3 сен 2019 16:44 | 1 |
My code is as following: #include<iostream> #include<vector> using namespace std; long getMaxSumRow(long rowArr[], int n) { long cs = 0; long ms = 0; bool positiveNumberPresent = false; for (int i = 0; i < n; i++) { if (!positiveNumberPresent && (rowArr[i] >= 0)) { positiveNumberPresent = true; } cs += rowArr[i]; if (cs < 0) { cs = 0; continue; } if (cs > ms) { ms = cs; } } if (positiveNumberPresent) { return ms; } ms = rowArr[0]; for (int i = 0; i < n; i++) { if (rowArr[i] > ms) { ms = rowArr[i]; } } return ms; } long maxSumRec(vector<vector<long> > &arr, int n) { if (n == 1) { return arr[0][0]; } /* Take an array for running rows sum */ long runningRowSum[n]; for (int r = 0; r < n; r++) { runningRowSum[r] = 0; } long maxSum = INT_MIN; /* Initialize variables for left-right and top-bottom bounds */ int left, right, top = 0, bottom = n-1; /* Iterate from all possible lefts to all possibe rights ahead of this left */ for (left = 0; left < n; left++) { for (right = 0; right < n; right++) { for (top = 0; top <= bottom; top++) { runningRowSum[top] += arr[top][right]; } /* For this left-right combination, calculate contigeous subarray with maximum sum in runningRowSum */ long currSum = getMaxSumRow(runningRowSum, n); if (currSum > maxSum) { maxSum = currSum; } } /* Reinitialize running row sum to 0 */ for (int r = 0; r < n; r++) { runningRowSum[r] = 0; } } return maxSum; } int main() { int n; cin >> n; vector<vector<long> > arr(n); for (int i = 0; i < n; i++) { arr[i] = vector<long>(n); for (int j = 0; j < n; j++) { cin >> arr[i][j]; } } cout << maxSumRec(arr, n); return 0; } But I am getting wrong answer for test case#3 . Any advice on what it might be failing at ? |
TEST | buyolitsez | 1156. Два тура | 3 сен 2019 09:22 | 1 |
TEST buyolitsez 3 сен 2019 09:22 3 4 1 2 1 3 4 5 4 6 ans: 1 5 6 2 3 4 Edited by author 03.09.2019 09:23 |
no impossible case | sonamon | 1106. Две команды | 28 авг 2019 23:42 | 2 |
There cannot be any impossible case as is suggested by the very first line of the problem statement yes , no impossible cases are present. |
The main task is 10^250 | Михаил | 1180. Игра с камушками | 26 авг 2019 16:18 | 1 |
|
Can anyone translate the statement? | PrankMaN | 1053. Пиноккио | 25 авг 2019 00:22 | 2 |
My Endlish is not that good, could anyone translate it into Russian, pls? Так с гугл-переводчиком понятно |
WA3 | dickbooster | 1881. Длинное условие задачи | 24 авг 2019 22:56 | 11 |
WA3 dickbooster 22 окт 2011 15:17 inputs of the third test? Re: WA3 dickbooster 22 окт 2011 15:38 try this: 3 5 9 aa aa aaa aa aa aa aaa aa aaa i have passed the test you give, but i still got WA3....help //i found a silly mistake and now passed test3... but still WA for the next Edited by author 26.03.2012 11:13 Edited by author 26.03.2012 11:14 //i found a mistake again.....and then i got AC Edited by author 26.03.2012 11:20 Re: WA3 ramon93i7 16 апр 2012 12:30 What was your second mistake? answer: 3 для первого теста для второго 2 Edited by author 21.10.2012 12:43 You can try this test case: 3 2 6 aa a a aa aa a Correct answer: 2 Isn't corect answer 6? aa a a (not a a = 3 symbols) aa aa a Re: WA3 RandyWaterhouse 15 июн 2019 10:41 Deleted Edited by author 24.08.2019 23:00 Re: WA3 Chuk.Charles 25 сен 2015 16:24 Try this test: 1 5 2 to be answer: 1 Edited by author 25.09.2015 16:26 |
Some helpful test !!!!!!!!!! | Noname | 1406. Следующее число | 24 авг 2019 12:19 | 10 |
Try this test inp 901000 ans 910000 And this input: 091 output: 109 and 092 119 0920 1019 Edited by author 22.12.2006 19:08 My program "give AC" on your tests, but give WA#19. Somebody, give me more tests please. Try this 39910000 -> 40000099 99 -> -1 00 -> -1 1 -> -1 011 -> 020 Good Luck!) Edited by author 06.06.2009 23:08 Edited by author 06.06.2009 23:08 Try this and look for the time 010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Should give 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Edited by author 18.07.2007 05:06 My program give AC on your tests, but give WA#4. Please give me tests #4 or more tests. Thank. Test 59 look like: 1000000000000000000000000 Answer: -1 |
WA5, any tests? | motoras | 1050. Подготавливая статью | 23 авг 2019 04:47 | 2 |
I run out of ideas, trying to pass test #5. Does anyone can tell me how this test looks like? Thank you, There seem to be some non-ASCII characters in the test cases. If the input is loaded byte by byte, then the result should be output byte by byte as well. I used Rust and handled the bytes as chars, which were stored as 4-byte unicode, but mistakenly output the result by chars instead of bytes. |