Search found 380 matches

by Obaida
Thu Oct 13, 2011 6:43 pm
Forum: Volume 117 (11700-11799)
Topic: 11776 - Oh Your Royal Greediness!
Replies: 4
Views: 2715

Re: 11776 - Oh Your Royal Greediness!

@Bella Swan

The output you posted is wrong, correct output is:

Code: Select all

Case 1: 1
Case 2: 4
Case 3: 5
by Obaida
Fri Feb 25, 2011 4:51 am
Forum: Volume 110 (11000-11099)
Topic: 11081 - Strings
Replies: 35
Views: 19513

Re: 11081 - Strings

@kabir_iut
I used 60 x 60 x 60 x 2 Dp state and 6 recursive calls (Without Exclusion)
and my running time is .744sec :wink:
by Obaida
Sat Dec 11, 2010 5:15 pm
Forum: Volume 4 (400-499)
Topic: 429 - Word Transformation
Replies: 82
Views: 17165

Re: 429

Why i am getting TLE? Any one please help me :( #include<iostream> #include<cstdio> #include<cstring> #include<cctype> #include<cstdlib> #include<cmath> #include<sstream> #include<fstream> #include<vector> #include<string> #include<stack> #include<queue> #include<set> #include<map> #include<list> #i...
by Obaida
Sat Dec 11, 2010 2:30 am
Forum: Volume 100 (10000-10099)
Topic: 10047 - The Monocycle
Replies: 20
Views: 6065

Re: 10047 - The Monocycle

I would like to clear a point about this problem. There will be only one S and one T for every test and you need to find out minimum time required to go form S to T. Input 4 7 ##....T ##.###. S..###. ##..... 4 7 ##..... ##.###. S..###. ##....T 0 0 Output Case #1 minimum time = 14 sec Case #2 minimum...
by Obaida
Mon Dec 06, 2010 5:14 pm
Forum: Volume 118 (11800-11899)
Topic: 11825 - Hackers' Crackdown
Replies: 5
Views: 3844

Re: 11825 - Hackers’ Crackdown

@Angeh: I think Dp will reduce your time limit surely :P
by Obaida
Fri May 28, 2010 7:33 am
Forum: Volume 7 (700-799)
Topic: 762 - We Ship Cheap
Replies: 51
Views: 20167

Re: 762 - We Ship Cheap

I think a straight Dijkstra will solve this problem with a faster time. :D
by Obaida
Sun Apr 18, 2010 8:44 am
Forum: Volume 100 (10000-10099)
Topic: 10034 - Freckles
Replies: 101
Views: 32404

Re: 10034 - Freckles

I just coded Kruskal's Algorithm and got Accepted in very good time :D.
by Obaida
Wed Mar 10, 2010 8:59 am
Forum: Volume 7 (700-799)
Topic: 785 - Grid Colouring
Replies: 27
Views: 13665

Re: 785 - Grid Colouring

Every one getting WA please take a look at this line:-

Code: Select all

A zone is marked if it contains identical characters, called marking characters, different than space and the character used to draw the grid contours.
I got wA for this. :wink:
by Obaida
Tue Mar 02, 2010 7:39 am
Forum: Volume 100 (10000-10099)
Topic: 10039 - Railroads
Replies: 20
Views: 8161

Re: 10039 - Railroads

I think BFS should solve this.
But I am very much confused with the problem description. :(
Any one please help me :-?
by Obaida
Wed Feb 24, 2010 7:37 am
Forum: Volume 104 (10400-10499)
Topic: 10452 - Marcus
Replies: 21
Views: 9545

Re: 10452 - Marcus, help!

I think this is an easy problem.
Easy recursive formula works here.
I just searched for the next match until last one.
by Obaida
Tue Feb 23, 2010 7:08 am
Forum: Volume 115 (11500-11599)
Topic: 11504 - Dominos
Replies: 55
Views: 20596

Re: 11504 - Dominos

I got compile error for this problem... code.o: In function `DFS(int)': code.cpp:(.text+0x47): relocation truncated to fit: R_X86_64_32S against symbol `visit' defined in .bss section in code.o code.cpp:(.text+0x50): relocation truncated to fit: R_X86_64_32S against symbol `visit' defined in .bss se...
by Obaida
Tue Feb 23, 2010 6:53 am
Forum: Volume 5 (500-599)
Topic: 530 - Binomial Showdown
Replies: 137
Views: 33356

Re: 530 woes

You are using "long double" as data type.
But you are printing :-

Code: Select all

printf("%.lf\n",d);
I think this should be changed to:-

Code: Select all

printf("%.llf\n",d);
And i think this won't be enough to solve this problem
by Obaida
Tue Jan 12, 2010 5:28 pm
Forum: Volume 101 (10100-10199)
Topic: 10100 - Longest Match
Replies: 95
Views: 20888

Re: 10100 - Longest Match

Some one please help me to get accepted. (I am getting wa constantly!!! :( ) here is my code:- #include<iostream> #include<sstream> #include<vector> #include<cstring> #include<string> using namespace std; int c[503][503]; int lcs(vector<string>x,vector<string>y){ int i,j,max=0; for(i=0;i<x.size();i+...
by Obaida
Sat Jan 09, 2010 7:22 am
Forum: Volume 5 (500-599)
Topic: 574 - Sum It Up
Replies: 46
Views: 14011

Re: 574 - too slow

n will be an integer between 1 and 12 (inclusive), and x1, ....., xn will be positive integers less than 100. So i think there is no such case as:- 999 1 999 I think it should be:- 999 1 99 Some one please help me to get Accepted. I can't find that stupid mistake. #include<iostream> #include<vector...
by Obaida
Tue Dec 29, 2009 5:48 am
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 5772

Re: I need some I/O for 166(making change), plz help

i got accepted taking 10$ as maximum. :D

Go to advanced search