Search found 147 matches

by Shafaet_du
Tue May 31, 2011 6:18 am
Forum: Volume 4 (400-499)
Topic: 437 - The Tower of Babylon
Replies: 14
Views: 8014

Re: 437 - Any good idea for Towers of Babylonia?

My solution was like this: F(R,C,H)=H+max( all other valid combinations that can placed over R,C,H sized block) if no more blocks can be placed it will return just H as max will be 0. At 1st i assumed R,C,H<=200 and used an array dp[200][200][200] but it gave me RTE. Then i changed it to a 3d map li...
by Shafaet_du
Sat May 21, 2011 10:35 pm
Forum: Off topic (General chit-chat)
Topic: What do you like to eat?
Replies: 20
Views: 66587

Re: What do you like to eat?

biriyani :D
by Shafaet_du
Sat May 21, 2011 10:34 pm
Forum: Off topic (General chit-chat)
Topic: How old are you? Statistics.
Replies: 121
Views: 176325

Re: How old are you? Statistics.

21
by Shafaet_du
Sat May 21, 2011 10:31 pm
Forum: Other words
Topic: problems for programming skills
Replies: 4
Views: 5709

Re: problems for programming skills

Solve this horrible problem: uva 400 :D
by Shafaet_du
Sat May 21, 2011 10:26 pm
Forum: Volume 108 (10800-10899)
Topic: 10870 - Recurrences
Replies: 14
Views: 7911

Re: 10870 - Recurrences

Slight mistake in above input. D should be less than 15 but i gave 18. but ac codes should be able to pass it i think,
by Shafaet_du
Sat May 21, 2011 10:23 pm
Forum: Volume 108 (10800-10899)
Topic: 10870 - Recurrences
Replies: 14
Views: 7911

Re: 10870 - Recurrences

Nice problem to learn matrix exponentiation(You should try 10229 first though). Try this: 6 345345 443 999999 12443434 3214234 34535 456456 21424 7676 435 34 78 34 23 10 4468895 231123 9999 122344 321743 3412 12156 223424 23345555 76 222 12213 7676 435 34 78 34 23 456 8979 2323 2345 18 412455 233452...
by Shafaet_du
Fri May 20, 2011 4:52 pm
Forum: Volume 102 (10200-10299)
Topic: 10229 - Modular Fibonacci
Replies: 53
Views: 17214

Re: 10229 - Modular Fibonacci

Its the 1st problem i solved on matrix exponentiation. To learn it,read this fine tutorial: http://zobayer.blogspot.com/search/labe ... nentiation.

Dont forget to use long long as intermediate calculation can cross int limit.
by Shafaet_du
Tue May 17, 2011 5:26 pm
Forum: Volume 117 (11700-11799)
Topic: 11734 - Big Number of Teams will Solve This
Replies: 26
Views: 7544

Re: 11734 - Big Number of Teams will Solve This

be careful about blank spaces
by Shafaet_du
Fri May 13, 2011 10:10 pm
Forum: Volume 110 (11000-11099)
Topic: 11049 - Basic wall maze
Replies: 6
Views: 5212

Re: 11049 - Basic wall maze

Sample:

Code: Select all

1 1
6 6
1 2 2 4
5 6 1 6
1 1 2 2
0 0
output:
SSSSSEEEEE
by Shafaet_du
Fri May 13, 2011 11:55 am
Forum: Volume 4 (400-499)
Topic: 487 - Boggle Blitz
Replies: 10
Views: 6080

Re: WA 487 - Boggle Blitz

Trie may make the code run faster but map is enough to get ac. The condition "increasing chain of characters" ensured that the number of words wont be very large.
by Shafaet_du
Fri May 13, 2011 11:23 am
Forum: Volume 4 (400-499)
Topic: 442 - Matrix Chain Multiplication
Replies: 21
Views: 3414

Re: 442-matrix chain multiplication

You should get AC if you can pass the samples. However the answers can be large,so use long long for safety. Parsing is fairly easy,push matrixes and "(" in stack. if you get ")" pop last 3 elements. Last 2 are matrixes and 3rd is "(". Determine dimension of new matrix and push it. The syntax given ...
by Shafaet_du
Fri May 13, 2011 10:31 am
Forum: Volume 112 (11200-11299)
Topic: 11254 - Consecutive Integers
Replies: 24
Views: 11733

Re: 11254 - Consecutive Integers

Use long long,i got wa for that.
by Shafaet_du
Wed May 11, 2011 6:24 pm
Forum: Volume 117 (11700-11799)
Topic: 11710 - Expensive subway
Replies: 14
Views: 5664

Re: 11710 - Expensive subway

Just find the mst and check if the graph is connected. Data set is quite large i guess(my code surprisingly needs more than 1 sec!),so don't use union find separately to check connectivity. Run kruskal and check if there are n-1 edges in the mst.
by Shafaet_du
Mon May 09, 2011 10:50 pm
Forum: Volume 6 (600-699)
Topic: 604 - The Boggle Game
Replies: 33
Views: 10110

Re: 604 - Boggle Game

input: A E F G M L A E P G T G A P G T Z C D E Z C D E F G R E G R E K # out: AEGC AEGD AEGP AEGT AETD AETG AGDE AGET AGTE APGE CDEE CGAE CGEA CPAE CREE DEEG DEER DEET DETE DGAE DGEA DGEE DREE DTEA DTEE EAGC EAGD EAGP EAGT EAPC EAPG EAPZ EDEG EDER EDET EDGA EDGE EDRE EDTE EEDC EEDG EEDR EEDT EEGD EE...
by Shafaet_du
Mon May 09, 2011 9:29 pm
Forum: Volume 2 (200-299)
Topic: 216 - Getting in Line
Replies: 57
Views: 24684

Re: 216 WA !!Plz Help

Try this cases: 8 100 150 102 23 34 67 32 63 11 25 132 35 54 122 54 23 8 120 15 102 21 34 64 132 16 1 125 13 135 12 162 55 45 0 output: ********************************************************** Network #1 Cable requirement to connect (132,35) to (102,23) is 48.31 feet. Cable requirement to connect ...

Go to advanced search