Show all threads Hide all threads Show all messages Hide all messages |
WA 23 | Dmitri Belous | 1915. Titan Ruins: Reconstruction of Bygones | 8 Dec 2012 15:58 | 1 |
WA 23 Dmitri Belous 8 Dec 2012 15:58 |
test 3 | Abbath1349 | 1915. Titan Ruins: Reconstruction of Bygones | 2 Dec 2012 15:21 | 5 |
test 3 Abbath1349 22 Oct 2012 20:52 у меня на 3 вылетало примерно из-за такого теста 20 1 0 0 -1 -1 -1 -1 Edited by author 23.10.2012 16:38 1 20 1 20 у меня он его верно проходит ) там,что другое должно быть у меня на 3 вылетало примерно из-за такого теста 20 1 0 0 -1 -1 -1 -1 Edited by author 23.10.2012 16:38 I want to know how can you know the test? > I want to know how can you know the test? If you fail a test, then fix a particular part of the logic of your program, then pass that test, you then know what condition is covered by that particular test. |
always crash | Pegasus | 1915. Titan Ruins: Reconstruction of Bygones | 1 Dec 2012 22:03 | 1 |
|
Maybe an interesting idea to solve this | DR. Zhihua Lai | 1915. Titan Ruins: Reconstruction of Bygones | 14 Nov 2012 15:35 | 3 |
Instead of copying actually data, we might put a marked-number (index to copy) in the array. For example, if (x > 0) { stack[q ++] = x; } else if (x == -1) { int y = stack[q - 1]; if (y > 0) { System.out.println(y); q--; } else { y = -y; System.out.println(stack[y]); stack[q - 1] = -(y - 1); if (y == 0) { q--; } } } else { stack[q] = -(q - 1); // negative numbers mean a copy. q ++; } of course, this doesn't work for multiple continuous copy (e.g. 0, 0, 0 ..). I pursued this idea at first before I noted the easier approach based on the input constraints. The problem with storing markers representing copies in the stream is that it gets complicated when you have many combinations of partially consumed copies which are then copied, over and over again. You basically need a tree to represent the state, and the tree must be walked when popping, which takes longer. There probably is a simplified partial implementation of this, but given the constraints of the problem, it's not necessary. I agree. It gets complicated when there are copies inside copies.. so, this is not necessary because there are simpler and straightforward solutions. |
test 23 | Tiraill | 1915. Titan Ruins: Reconstruction of Bygones | 13 Nov 2012 00:06 | 2 |
problem in the range try to increase it i mean for example like this var a:array[1..1000] and var a:array [1..10000] in second case answer may be right and i 1-st - wrong |
Any hint? | Alexandru Farcasanu | 1915. Titan Ruins: Reconstruction of Bygones | 4 Nov 2012 19:05 | 5 |
Any hint? Alexandru Farcasanu 20 Oct 2012 23:26 Any hint for solving this problem? number of possible operations is only 1m > number of possible operations is only 1m Hah! Somehow reading this here (even though it's clear in the problem statement) made me see the way...thanks. memcpy (for c++) and million.., and not any more ;p |
Can some one explain to me? | enoyps | 1915. Titan Ruins: Reconstruction of Bygones | 25 Oct 2012 11:23 | 2 |
8 -> 8 3 -> 8 3 4 -> 8 3 4 0 -> 8 3 4 8 3 4 -1 -> 8 3 4 8 3 output 4 -1 -> 8 3 4 8 output 3 -1 -> 8 3 4 output 8 -1 -> 8 3 output 4 1 -> 8 3 1 why the answer is 4 3 4 3? 8 -> number of operations 3 -> 3 4 -> 3 4 0 -> 3 4 3 4 etc. |
Give solution plz | sda | 1915. Titan Ruins: Reconstruction of Bygones | 23 Oct 2012 22:56 | 1 |
Give solution plz! TLE 42 |
type of task | Abbath1349 | 1915. Titan Ruins: Reconstruction of Bygones | 22 Oct 2012 10:56 | 3 |
is that task in dynamic programming style? Where you see in this task any optimal substructure (typical fo dp)? but when I use stack I have Time limit exceeded at 42 test |
getting TLE at 24 | Anupam Ghosh, Wipro Technologies | 1915. Titan Ruins: Reconstruction of Bygones | 20 Oct 2012 16:43 | 1 |
is this because I am using java ?? Java is slower compared to c or c++. This program is normal stack operation isn't it? or some other algo is to be followed?? |
Tests don't fit in limitations on 'n' | Yermak | 1915. Titan Ruins: Reconstruction of Bygones | 20 Oct 2012 13:56 | 2 |
Test 4: crash (integer division by zero) int main() { int n; scanf("%d",&n); if (n>1000000 || n<1) return 1/(n-n); return 0; } Test 4 is fixed. Wrong verdicts will be rejudged. |