There is one space character(' ') at the last of each input line in the sample input.
Should we consider this for every input?
Can anyone clarify this issue?
Search found 31 matches
- Tue Feb 19, 2013 12:13 pm
- Forum: Volume 12 (1200-1299)
- Topic: 1229 - Sub-dictionary
- Replies: 17
- Views: 12237
- Thu Feb 14, 2013 12:29 am
- Forum: Volume 106 (10600-10699)
- Topic: 10681 - Teobaldo's Trip
- Replies: 44
- Views: 18929
Re: 10681 - Teobaldo's Trip
I'm getting WA in this problem.
My algo is : first make adjacency matrix with the given liunks. then journey is possible if [adj matrix]^d is nonzero.
i've implemented this with matrix exponentiation.
Can anybody help me?
my code is here:
My algo is : first make adjacency matrix with the given liunks. then journey is possible if [adj matrix]^d is nonzero.
i've implemented this with matrix exponentiation.
Can anybody help me?
my code is here:
Code: Select all
removed after AC
- Fri Aug 31, 2012 11:11 pm
- Forum: Volume 117 (11700-11799)
- Topic: 11710 - Expensive subway
- Replies: 14
- Views: 7768
Re: 11710 - Expensive subway
The number of connections may be 0.
consider this input:
output is Impossible
consider this input:
Code: Select all
2 0
a
b
a
0 0
- Wed Jul 25, 2012 12:59 am
- Forum: Volume 5 (500-599)
- Topic: 526 - String Distance and Transform Process
- Replies: 34
- Views: 22130
Re: 526 String Editing
empty string will be given as input.
i got AC after handling it.
i got AC after handling it.
- Tue Jul 24, 2012 3:43 pm
- Forum: Volume 5 (500-599)
- Topic: 526 - String Distance and Transform Process
- Replies: 34
- Views: 22130
Re: 526 String Editing
In the output specification it is said that
is this output valid for input-2:
so, are there multiple outputs?Actually many command lists can satisfy the request, but only one of them is required.
is this output valid for input-2:
Code: Select all
4
1 Insert 3,b
2 Insert 5,a
3 Insert 6,a
4 Insert 7,a
- Mon Jul 09, 2012 6:36 pm
- Forum: Volume 7 (700-799)
- Topic: 760 - DNA Sequencing
- Replies: 33
- Views: 16569
Re: 760 - DNA Sequencing
In problem statement it is said that " prints as output the longest common sequence(s) in lexicographical order. ", but i got WA submitting the common Sub-sequences. I changed my dp function to print the continuous sequences and got accepted.
So, don't think "common sequence" as sub-sequence. :)
So, don't think "common sequence" as sub-sequence. :)
- Tue Jul 03, 2012 12:49 am
- Forum: Volume 6 (600-699)
- Topic: 612 - DNA Sorting
- Replies: 122
- Views: 33906
Re: 612 - DNA Sorting
I've also checked my program with this I/O :
input : http://www.csie.nctu.edu.tw/~chchu/acm/ ... t/612i.txt
output : http://www.csie.nctu.edu.tw/~chchu/acm/ ... t/612o.txt
input : http://www.csie.nctu.edu.tw/~chchu/acm/ ... t/612i.txt
output : http://www.csie.nctu.edu.tw/~chchu/acm/ ... t/612o.txt
- Tue Jul 03, 2012 12:47 am
- Forum: Volume 6 (600-699)
- Topic: 612 - DNA Sorting
- Replies: 122
- Views: 33906
Re: 612 - DNA Sorting
I'm getting WA in this problem.
I used divide and conquer algorithm to find the inversion number and then sorted the strings accordingly.
can anyone find any bug in my code?
here is my code:
I used divide and conquer algorithm to find the inversion number and then sorted the strings accordingly.
can anyone find any bug in my code?
here is my code:
Code: Select all
removed
- Sun Jun 17, 2012 1:40 am
- Forum: Volume 100 (10000-10099)
- Topic: 10090 - Marbles
- Replies: 43
- Views: 28283
Re: 10090 - Marbles
getting WA.
actually my code gives incorrect answer when one of the coefficients in Diophantine equation is equal to 0.
can anyone give me a hint how can i handle that case?
it gives correct output for other test cases.(as far as i checked)
here is my code :
removed after ac.
made a silly ...
actually my code gives incorrect answer when one of the coefficients in Diophantine equation is equal to 0.
can anyone give me a hint how can i handle that case?
it gives correct output for other test cases.(as far as i checked)
here is my code :
removed after ac.
made a silly ...
- Mon Jun 11, 2012 2:09 am
- Forum: Volume 113 (11300-11399)
- Topic: 11327 - Enumerating Rational Numbers
- Replies: 4
- Views: 4428
Re: 11327 - Enumerating Rational Numbers
i'm getting WA in this problem.
can anybody find any bug in my code?
my code is here :
can anybody find any bug in my code?
my code is here :
Code: Select all
Removed After AC
- Mon May 28, 2012 11:51 pm
- Forum: Volume 9 (900-999)
- Topic: 990 - Diving for Gold
- Replies: 11
- Views: 8776
Re: 990 - Diving for Gold
i'm getting WA in this problem.
i used 0-1 knapsack algorithm.
can anyone find any bug in my code?
my code is here:
i used 0-1 knapsack algorithm.
can anyone find any bug in my code?
my code is here:
Code: Select all
removed after ac
- Mon May 28, 2012 11:48 pm
- Forum: Volume 9 (900-999)
- Topic: 990 - Diving for Gold
- Replies: 11
- Views: 8776
Re: 990 - Diving for Gold
Can anyone provide me some critical test cases?
- Mon May 28, 2012 5:40 pm
- Forum: Volume 5 (500-599)
- Topic: 562 - Dividing coins
- Replies: 73
- Views: 44444
Re: 562 - Dividing Coins
thanks brianfry!
got AC.
got AC.
- Sat May 26, 2012 12:43 am
- Forum: Volume 106 (10600-10699)
- Topic: 10633 - Rare Easy Problem
- Replies: 37
- Views: 25027
Re: 10633 - Rare Easy Problem
some I/O
Input:
12345678901234567
12445678901245710
12545678901272092
12645678901328952
12745678901446768
12845678901563040
12945678901676224
13045678901783232
13145678901877888
13245678901947840
13345678901968384
13445678902013568
13545678902108032
13645678902177600
13745678902197376 ...
Input:
12345678901234567
12445678901245710
12545678901272092
12645678901328952
12745678901446768
12845678901563040
12945678901676224
13045678901783232
13145678901877888
13245678901947840
13345678901968384
13445678902013568
13545678902108032
13645678902177600
13745678902197376 ...
- Tue May 22, 2012 7:51 pm
- Forum: Volume 5 (500-599)
- Topic: 562 - Dividing coins
- Replies: 73
- Views: 44444
Re: 562 - Dividing Coins
I used 0-1 knapsack to solve this problem.
can anyone find any bug in my code:
can anyone find any bug in my code:
Code: Select all
removed after AC