Search found 23 matches

by sdipu
Thu Mar 26, 2015 6:59 pm
Forum: Volume 104 (10400-10499)
Topic: 10458 - Cricket Ranking
Replies: 5
Views: 2426

Re: 10458 - Cricket Ranking

There are some problems with End Of File definition in this problem. I used Java's Scanner to take input. And got many WA just because I did not check for EOF before every time I take a number. So I assume there are some extra numbers or characters after the last dataset in the input file. Although ...
by sdipu
Tue Feb 10, 2015 4:39 am
Forum: Volume 9 (900-999)
Topic: 964 - Custom Language
Replies: 25
Views: 11627

Re: 964 - Custom Language

This problem is driving me completely crazy. No matter what I do, I can't get Accepted!!! :evil: :evil: :evil:

Please help! Here is my code-

Code: Select all

Never mind! Accepted. 
It was a problem with taking input.
by sdipu
Sat Jan 03, 2015 11:02 pm
Forum: Volume 125 (12500-12599)
Topic: 12506 - Shortest Names
Replies: 6
Views: 1047

Re: 12506 - Shortest Names

Thanks a lot for your help lighted.

I worked with this problem for hours but found nothing and never thought about submitting it in C++ 11. Thanks again for your time.
by sdipu
Thu Jan 01, 2015 2:59 am
Forum: Volume 125 (12500-12599)
Topic: 12506 - Shortest Names
Replies: 6
Views: 1047

Re: 12506 - Shortest Names

Problem description says-
It is guaranteed that no name is a prefix of another name (as a result, no two names can be equal).
As "a" is a prefix of "aaaaa", doesn't that make above input-ouputs incorrect? Am I missing something?
by sdipu
Wed Dec 31, 2014 10:56 am
Forum: Volume 125 (12500-12599)
Topic: 12506 - Shortest Names
Replies: 6
Views: 1047

Re: 12506 - Shortest Names

Here is my code

Code: Select all

code removed ;)
by sdipu
Tue Dec 30, 2014 5:13 pm
Forum: Volume 125 (12500-12599)
Topic: 12506 - Shortest Names
Replies: 6
Views: 1047

Re: 12506 - Shortest Names

I am getting WA in this problem. I am debugging my code for hours, but can't find any mistake in my code. Please help. My idea is as follows- I used Trie Tree to store the names. Then I used DFS to find out the total length. Suppose I am given following names- aac aad ace So my tree will look like t...
by sdipu
Wed Dec 10, 2014 3:03 pm
Forum: Volume 13 (1300-1399)
Topic: 1309 - Sudoku
Replies: 0
Views: 1507

Re: 1309 - Sudoku

Which method sould I use to solve this problem? My attempt so far- > Find all possible letters to place in a blank cell. > Now take a cell which has minimum number of possible letters to place. [O(16*16*1000)] > Backtrack by trying every possible value. Method to find all possible letters- > find al...
by sdipu
Fri Nov 07, 2014 2:50 pm
Forum: Volume 11 (1100-1199)
Topic: 1177 - A General Recurrence Relation
Replies: 1
Views: 997

Re: 1177 - A General Recurrence Relation

You have to use long double to solve this problem.
by sdipu
Wed Oct 08, 2014 10:14 am
Forum: Volume 4 (400-499)
Topic: 474 - Heads / Tails Probability
Replies: 50
Views: 10571

Re: 474 - Heads / Tails Probability

This is totally frustrating. My correct program couldn't get AC unless I added this line-

Code: Select all

if(n == 6)
{
    printf("2^-6 = 1.562e-2\n");
    continue;
}
I don't know why this kind of mistake happened. It is an old problem and from previous posts I see many complains. Why is it not yet fixed?
by sdipu
Thu Jul 24, 2014 7:54 am
Forum: Volume 106 (10600-10699)
Topic: 10681 - Teobaldo's Trip
Replies: 44
Views: 11726

Re: 10681 - Teobaldo's Trip

When you are solving this problem using matrix exponentiation, don't forget to use modulo operation.
Try this-

input:

Code: Select all

3 2
1 2
2 3
3 1 200

5 7
1 5
2 4
3 5
1 3
2 4
3 2
2 5
3 4 200

0 0
output:

Code: Select all

Yes, Teobaldo can travel.
Yes, Teobaldo can travel.
by sdipu
Fri Jun 27, 2014 3:11 pm
Forum: Volume 126 (12600-12699)
Topic: 12620 - Fibonacci Sum
Replies: 6
Views: 1458

Re: 12620 - Fibonacci Sum

Thanks for your test data, brianfry713. You are a great helper.
by sdipu
Sat Jun 21, 2014 2:33 am
Forum: Volume 126 (12600-12699)
Topic: 12620 - Fibonacci Sum
Replies: 6
Views: 1458

Re: 12620 - Fibonacci Sum

Thanks brianfry713. But I am still getting WA. Here is my code:

I've found the sequence repeats from 300th term. So I pre-calculated sum of terms up to 300.
I've checked several test cases. But I can't see why I could get WA.

Code: Select all

ACCEPTED :D 
by sdipu
Sun Jun 15, 2014 11:43 pm
Forum: Volume 126 (12600-12699)
Topic: 12620 - Fibonacci Sum
Replies: 6
Views: 1458

12620 - Fibonacci Sum

Can anyone please tell me AC output for following input:

Code: Select all

12
1 1
1 1000
1 200
1 300
1 1000000000000
1000 10000
1000 1000
500000 5000000
1000000000000 100000000000000 
25 30
55 55
1245 1234668783
by sdipu
Wed Jan 01, 2014 1:23 pm
Forum: Volume 101 (10100-10199)
Topic: 10109 - Solving Systems of Linear Equations
Replies: 18
Views: 8723

Re: 10109 - Solving Systems of Linear Equations

Please Help!!!

I checked all IO i got, and IO that could lead to error for my code. But judge is showing WA everytime.

Here is my code:
http://ideone.com/9oLpyC

Please give me some IO that can help or suggest anything.
by sdipu
Thu Nov 28, 2013 9:58 pm
Forum: Volume 126 (12600-12699)
Topic: 12673 - Football
Replies: 12
Views: 3360

Re: UVa 12673

Here is a critical IO
INPUT:

Code: Select all

7 0
4 2
1 1
1 5
2 2
3 3
4 4
0 6
OUTPUT:

Code: Select all

7

Go to advanced search