Search found 18 matches

by H_Hima
Thu Oct 23, 2008 10:16 am
Forum: Volume 115 (11500-11599)
Topic: 11531 - Solve the Broken Maze
Replies: 15
Views: 6552

Re: 11531 - Solve the Broken Maze

No.

I can't understand the DP solution.
may you explain more?

thanks.
by H_Hima
Mon Oct 20, 2008 6:40 pm
Forum: Volume 115 (11500-11599)
Topic: 11531 - Solve the Broken Maze
Replies: 15
Views: 6552

Re: 11531 - Solve the Broken Maze

Thanks for your help. the first testcase give an error because of a simple wrong in dimensions of array. but the second one was the Big one. the bfs can't solve this problem. I used DFS but got TLE. and this is the dfs code. it's clear that why it got TLE but what's the solution? may any one help? #...
by H_Hima
Mon Oct 20, 2008 12:48 pm
Forum: Volume 115 (11500-11599)
Topic: 11531 - Solve the Broken Maze
Replies: 15
Views: 6552

11531 - Solve the Broken Maze

Hi. May any one help me in my wrong? this code got WA. I used bfs one board by cosidering 4 different ways to enter each block. this is my code. please help me. thanks. #include<iostream> #include<fstream> #include<algorithm> #include<stdio.h> #include<strstream> using namespace std; char blocks[100...
by H_Hima
Mon Oct 20, 2008 12:41 pm
Forum: Volume 115 (11500-11599)
Topic: 11533 - Special Number
Replies: 8
Views: 3681

Re: 11533 - Special Number

Hi All of the previews bug + some other one had been considered in the contest but I got Run Time Error. may any one help me to solve this problem. thanks a lot. #include<iostream> #include<fstream> #include<string> using namespace std; #define MAXSIZE 40100 class BigInt { public: char *data; int si...
by H_Hima
Fri Sep 26, 2008 9:07 pm
Forum: Volume 5 (500-599)
Topic: 531 - Compromise
Replies: 73
Views: 25567

Re: 531 - Compromise - WA

Hi. please help me. this problem storm my mind. I can't find my mistake. and can't even predict it. I Use DP for solving the problem. this is my code. all the matters seems correct. but!!! #include<string> #include<iostream> #include<fstream> #include<set> using namespace std; string words1[1000],wo...
by H_Hima
Mon Aug 04, 2008 8:48 pm
Forum: Volume 114 (11400-11499)
Topic: 11472 - Beautiful Numbers
Replies: 13
Views: 2941

Re: 11472 - Beautiful Numbers

hamedv wrote:Try these:

input:

Code: Select all

1
5 100
correct output:

Code: Select all

778091614
replace this line

Code: Select all

tabl[i][j]+=fun(i,j,k)
by this:

Code: Select all

tabl[i][j]=(tabl[i][j]+fun(i,j,k))%1000000007;
Special Thanks Hamedv. what a silly bug.
you exactly found the bug and the code got ACC.

again thanks.
by H_Hima
Mon Aug 04, 2008 3:38 pm
Forum: Volume 114 (11400-11499)
Topic: 11472 - Beautiful Numbers
Replies: 13
Views: 2941

Re: 11472 - Beautiful Numbers

hi. the introduced method was useful but I code a O(N^2 * M) method and this is my code. but why I got WA. may anybody send me some testcases in the wrong positions or tell me what is wrong here. fun2(b,len,ld) : count of numbers in base b with length len and with the last digit ld that all of the d...
by H_Hima
Fri Mar 28, 2008 8:34 pm
Forum: Volume 114 (11400-11499)
Topic: 11432 - Busy Programmer
Replies: 12
Views: 4820

Hi. Excelent alright. I used this method in the contest. (backtracking & memorizing and this is my code. but my answer for case: 33 12 is 3658729080464717380 but I got correct answer for case. 33 33 ? the above case can be fetch in part of 33 33 solution. this is my code please help me in my wrong. ...
by H_Hima
Tue Nov 13, 2007 6:09 pm
Forum: Volume 113 (11300-11399)
Topic: 11347 - Multifactorials
Replies: 7
Views: 3741

11347 - Multifactorials

Hi may anyone put some tricky cases for this problem. thanks. this is my code that got WA: #include<iostream> #include<stdio.h> #include<map> using namespace std; long long MAX=1000000000; long long devs[1002][25]; bool nums[1002]; int primes[1000]; int cnt; map<int,int> facts[1001]; int counts[1002...
by H_Hima
Mon Nov 12, 2007 8:54 am
Forum: Volume 113 (11300-11399)
Topic: 11350 - Stern-Brocot Tree
Replies: 6
Views: 4342

why the initializing

H_Hima, you must have to initialize again before all test cases. hi shakil. thanks for your attention. but why initializing. take a look at code. the value of l , r, c were not change in the progress. still thanks for your attention my friend. please delete the code. in this way the problem will sp...
by H_Hima
Sun Nov 11, 2007 5:43 pm
Forum: Volume 113 (11300-11399)
Topic: 11350 - Stern-Brocot Tree
Replies: 6
Views: 4342

11350 - Stern-Brocot Tree

why wrong? I'm surprised after see that in the contest. I consider empty lines. oh what is the meaning of this part in problem statement? "Path is the string if maximum length of 90 characters consisting from characters L or R." this is my code. ohhhhhh what a bad. two problems were not accepted bec...
by H_Hima
Sun Nov 11, 2007 5:33 pm
Forum: Volume 113 (11300-11399)
Topic: 11340 - Newspaper
Replies: 154
Views: 43500

11340 - Newspaper

what the trick in this Problem.

this is my code in the contest?
I'm aware of space char and the final value too.
and got the res in long long.

I'm completely confused...

Code: Select all

woooooowh
what a great trick.
Got acc after that.

Thanks alot
by H_Hima
Mon Sep 03, 2007 10:37 am
Forum: Volume 100 (10000-10099)
Topic: 10037 - Bridge
Replies: 84
Views: 24062

help!!!! I consider all of the above. but my code got WA. please tell me my wrong. #include<iostream> #include<vector> #include<algorithm> #include<cmath> using namespace std; int data[2000]; vector<int> out; int fun(int n) { out.clear(); int i,dif,sum=0;; bool sw=true; if(n==1) { out.push_back(data...
by H_Hima
Wed Jul 18, 2007 1:24 pm
Forum: Volume 112 (11200-11299)
Topic: 11240 - Antimonotonicity
Replies: 33
Views: 12386

Need guide

Ivan wrote: 2. To reduce the complexity we use a common technique to reduce the inner loop. Instead of iterating through every j in order to find the above mentioned maximum we can do a range maximum query (RMQ) - which can be easily done in logarithmic time leading to overall complexity of n * log(...
by H_Hima
Sat Feb 10, 2007 5:17 am
Forum: Volume 110 (11000-11099)
Topic: 11096 - Nails
Replies: 28
Views: 14383

pleeeeeeeease help me (WA)

Hi to everybody there is anybody there to help me?? I use graham's covex skin to finding the convexhull and finding the perimeter from that. But why WA. this is my code Dear H_Hima: You are trying to solve "Nails" (problem 11096). I have received and stored your C++ program. It will be compiled and ...

Go to advanced search