Search found 20 matches

by AKJ88
Sat Aug 03, 2013 12:27 pm
Forum: Volume 107 (10700-10799)
Topic: 10747 - Maximum Subsequence
Replies: 15
Views: 8901

Re: 10747 - Maximum Subsequence

I got a lot of WAs on this problem because my program would fail on cases that product of all selected numbers became zero and I hadn't noticed that by excluding negative numbers we would reach a better sum. This testcase my help other people making the same mistake: Input: 6 4 5 -2 -1 0 0 0 4 4 1 2...
by AKJ88
Sat Aug 03, 2013 6:09 am
Forum: Volume 116 (11600-11699)
Topic: 11689 - Soda Surpler
Replies: 11
Views: 5405

Re: 11689 Soda Surpler wrong answer

Input: 25 999 998 44 999 998 7 999 998 14 999 998 9 999 998 6 999 998 3 999 998 113 999 998 13 999 998 17 999 998 123 9 0 3 5 5 2 999 998 222 50 50 6 855 22 32 665 21 4 800 200 14 147 651 21 333 265 8 222 144 28 255 666 34 889 554 1001 362 879 214 999 999 1225 214 689 140 AC Output: 46 332 153 249 3...
by AKJ88
Thu Jul 18, 2013 2:26 pm
Forum: Volume 12 (1200-1299)
Topic: 1235 - Anti Brute Force Lock
Replies: 3
Views: 2184

Re: UVA 1235

Input 50 71 8467 6334 6500 9169 5724 1478 9358 6962 4464 5705 8145 3281 6827 9961 0491 2995 1942 4827 5436 2391 4604 3902 0153 0292 2382 7421 8716 9718 9895 5447 1726 4771 1538 1869 9912 5667 6299 7035 9894 8703 3811 1322 0333 7673 4664 5141 7711 8253 6868 5547 7644 2662 2757 0037 2859 8723 9741 752...
by AKJ88
Thu Apr 25, 2013 2:57 am
Forum: Volume 120 (12000-12099)
Topic: 12050 - Palindrome Numbers
Replies: 0
Views: 721

12050 - Palindrome Numbers

Input: 1 5 12 13 14 15 16 24 48 50 60 70 80 90 100 108 110 120 135 140 152 160 180 185 192 201 210 235 255 280 300 312 400 412 452 483 501 505 550 600 610 2100 2513 5223 7521 9653 12200 15366 25000 36200 36877 39566 75366 96544 123311 225566 422553 755663 966999 1225566 3665533 5258844 6333333 68555...
by AKJ88
Thu Mar 21, 2013 4:16 pm
Forum: Volume 109 (10900-10999)
Topic: 10926 - How Many Dependencies?
Replies: 33
Views: 13971

Re: 10926 - How Many Dependencies?

I guess data set of this program isn't complete enough!!!;-) I used a simple topological sort algorithm and although it wasn't giving the correct answer for some test cases I made it got AC :wink: For example the correct answer for the following input should be 6 as it's produced by my other algorit...
by AKJ88
Thu Mar 14, 2013 1:19 am
Forum: Volume 7 (700-799)
Topic: 711 - Dividing up
Replies: 25
Views: 11605

Re: 711 - Dividing up

Thanks brianfry, I need to work on it.
by AKJ88
Wed Mar 13, 2013 11:48 am
Forum: Volume 7 (700-799)
Topic: 711 - Dividing up
Replies: 25
Views: 11605

Re: 711 - Dividing up

Thanks brianfry, I changed my code and now it produces the correct output but no luck in getting AC.
Here's my code with your input: http://ideone.com/xfOr9v
Thanks.
by AKJ88
Tue Mar 12, 2013 10:40 am
Forum: Volume 103 (10300-10399)
Topic: 10330 - Power Transmission
Replies: 43
Views: 15734

Re: 10330 - Power Transmission

@lbv
Thanks a million for your reply.
Now I understand why it doesn't work.
Thanks.
by AKJ88
Tue Mar 12, 2013 9:20 am
Forum: Volume 7 (700-799)
Topic: 711 - Dividing up
Replies: 25
Views: 11605

Re: 711 - Dividing up

Can anyone tell me what is wrong with my code please? Thanks in advance. #include <cstdio> #include <cstring> #include <algorithm> #include <climits> using namespace std; const int marbValues[] = {1, 2, 3, 4, 5, 6, 10, 100, 200, 1000}; const int MC = 10; void changeMarbleCount(int marblesCount[]){ m...
by AKJ88
Fri Mar 08, 2013 7:19 pm
Forum: Volume 107 (10700-10799)
Topic: 10718 - Bit Mask
Replies: 29
Views: 8941

Re: 10718 - Bit Mask

I used this algorithm for this question: I start with a mask equal to 0. I find the MSB in U then try to set corresponding bit in the mask 1 in the condition that 1) the result is less than U and 2) if this bit is 0 in N or it's 1 but if we don't set this bit, with the remaining bits we can't produc...
by AKJ88
Thu Mar 07, 2013 1:02 pm
Forum: Volume 103 (10300-10399)
Topic: 10330 - Power Transmission
Replies: 43
Views: 15734

Re: 10330 - Power Transmission

Thanks lbv. I'd constructed the graph in a wrong way, after reconstructing it got AC. But can you tell me why constructing the graph in the way I did (like problem stated regulators (nodes) and links have their own capacity and we calculate min flow by getting min(parent , link between u and parent ...
by AKJ88
Wed Mar 06, 2013 10:23 pm
Forum: Volume 103 (10300-10399)
Topic: 10330 - Power Transmission
Replies: 43
Views: 15734

Re: 10330 - Power Transmission

Hi. Can anyone tell me what is wrong with my code, please? I've pass all test cases in the forum and got the correct answer, but still WA. Thanks. #include <cstdio> #include <queue> #include <cstring> #include <vector> #include <algorithm> #include <climits> using namespace std; typedef long long lL...
by AKJ88
Sat Feb 23, 2013 9:30 pm
Forum: Volume 1 (100-199)
Topic: 193 - Graph Coloring
Replies: 93
Views: 20663

Re: 193 Graph Coloring

@problemsolve I don't know why but I used dfs got WA then tried using backtracking and even though I thought I might get TLE got AC!:)

Can anyone explain why? Specially if you've solved it using BFS or DFS and got AC? Thanks.
by AKJ88
Fri Feb 22, 2013 10:53 pm
Forum: Volume 125 (12500-12599)
Topic: 12543 - Longest Word
Replies: 22
Views: 3298

Re: 12543 - Longest Word

raj wrote:thanks sir.......now its accepted........ :D
but i think u was in hurry because.....
the read output should be according to your input... :)

asdfasdfjkl
No, he wasn't in a hurry!!! :D
The correct output is what is written. Numbers like space in this problem are separators!
by AKJ88
Thu Feb 21, 2013 9:35 pm
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 21485

Re: 280 - Vertex

Never mind! I got it!!!
A teeny tiny, but in a way terribly big mistake! :D

Go to advanced search