Search found 12 matches

by taha
Sat Dec 09, 2006 4:17 pm
Forum: Bugs and suggestions
Topic: live archive compilation Problem
Replies: 4
Views: 2430

live archive compilation Problem

Hey,
i tried to submit in the ACM-ICPC live archive, but each time i submit i got a compilation error (i was trying to submit problem E in the 2006 finals).
Even with a file having just scanf and printf i get compilation error, it seems something is not working regarding the C++ compilation.
by taha
Mon Oct 23, 2006 1:36 pm
Forum: Volume 111 (11100-11199)
Topic: 11132 - Dice from pennies
Replies: 10
Views: 5174

if side=0 or dice=0 but not both printf("0\n");
Take care also from the case where the input string size is not multiple of B (where B is the required number of bits to represent each throw)
by taha
Mon Oct 23, 2006 11:33 am
Forum: Volume 111 (11100-11199)
Topic: 11131 - Close Relatives
Replies: 8
Views: 4307

Well i cannot find why this does not work.


FILE *in = stdin;


vector<string> tokenize(string s, string ch) {
vector<string> ret;
for( int i = 0, j; i < s.size(); i = j+1 ) {
j = s.find_first_of(ch, i);
if( j == -1 ) j = s.size();
if( j-i > 0 ) ret.push_back( s.substr(i, j-i ...
by taha
Mon Oct 23, 2006 10:19 am
Forum: Volume 111 (11100-11199)
Topic: 11131 - Close Relatives
Replies: 8
Views: 4307

11131 - Close Relatives

I am getting Wrong Answer, so i want to make sure of some issues:

- Is it only one input set ??
- My splution is as follows:

I buid a tree rooted by the first person that appears in the input and traverse this tree, once right to left and once left to right. If the 2 traversals give the same ...
by taha
Mon Oct 23, 2006 9:07 am
Forum: Volume 111 (11100-11199)
Topic: 11134 - Fabled Rooks
Replies: 12
Views: 7275

I used N^2 and it is accepted. (it runs in time), May be your bug is in the stopping condition of the input.
by taha
Sat Mar 11, 2006 6:17 pm
Forum: C++
Topic: Reading Excel file using visual studio 6.0
Replies: 1
Views: 1826

Reading Excel file using visual studio 6.0

Hey,
i need to know how to read an excel file using C++ or visual studio 6.0,

i appreciate ur help.
by taha
Tue Nov 08, 2005 9:26 am
Forum: C++
Topic: Dev C++ Debugger
Replies: 1
Views: 4289

Dev C++ Debugger

Anyone have solutions to the problem of the Dev-C++ debugger ??
When watching variables it does not update in a reliable way, it update once and don't update many more times.

Is there any patch or any solution for that ??
by taha
Mon Oct 31, 2005 4:39 pm
Forum: Volume 109 (10900-10999)
Topic: 10958 - How Many Solutions?
Replies: 17
Views: 7878

10958 - How Many Solutions?

Actually i have no idea how to solve this one.

i reached that y=(pnx)/(x-pm) so for how many value of x the numerator is divisible by the denominator ?

i m not sure was this the right way to attempt that problem or not.

any hints ??
by taha
Mon Oct 31, 2005 2:09 pm
Forum: Volume 109 (10900-10999)
Topic: 10954 - Add All
Replies: 80
Views: 41557

thanks Emilio

thanks for ur reply.
but one more isssue: implementing it using heap has no more advantage than this one, in speed or whatever ??
by taha
Mon Oct 31, 2005 1:20 pm
Forum: Volume 109 (10900-10999)
Topic: 10954 - Add All
Replies: 80
Views: 41557

to valfiros

there exist priority queue implemented in STL ???
by taha
Mon Oct 31, 2005 11:00 am
Forum: Volume 109 (10900-10999)
Topic: 10956 - Prime Suspect
Replies: 24
Views: 14892

WA in the example

i m not sure if i correctly implemented that suspect function but anyways for the example whose output is:

There are 457 odd non-prime numbers between 4000000000 and 4000001000.

There are no failures in base 2.


I got 500 instead of 457.

here is the suspect function

bool suspect(__int64 ...
by taha
Mon Oct 31, 2005 10:21 am
Forum: Volume 109 (10900-10999)
Topic: 10956 - Prime Suspect
Replies: 24
Views: 14892

sieve

For the same problem of time limit exceed, i tried to turn to the sieve algorithm, but the algorithm i know always start the interval that is checking from 2 which is not suitable in both time and memory for that problem.

Any help !!!

Go to advanced search