Search found 214 matches

by CDiMa
Thu Aug 04, 2005 4:56 pm
Forum: Volume 8 (800-899)
Topic: 866 - Intersecting Line Segments
Replies: 9
Views: 6755

Re: 866

Or are these invalid test cases? Thanks. First I must say I didn't try to solve this problem. It is assumed, as a simplification, that no coincidences may occur between coordinates of singular points (intersections or end points). I think this implies your test cases are invalid since the intersect...
by CDiMa
Thu Aug 04, 2005 10:56 am
Forum: Volume 5 (500-599)
Topic: 585 - Triangles
Replies: 16
Views: 7709

Re: 585 Triangles.. WA..

probably i didn't get the problem correctly ######### #---### #-### ### # i checked some articles here.. but i still don't know why the answer for that case is not 4 but 1.. I'm not experienced in ASCII art but this should show why the answer is 1... ------------------- \#/#\#/#\#/#\#/#\#/ --------...
by CDiMa
Fri Jul 29, 2005 11:36 am
Forum: C
Topic: Passing variable number of arguments to functions..
Replies: 6
Views: 7844

Krzysztof Duleba wrote:man va_arg
You are right, but stdarg macros permit to implement functions that work like printf(...).
Actually main doesn't have a variable number of arguments so the original post has a question not well defined ;)

Ciao!!!

Claudio
by CDiMa
Thu Jul 28, 2005 8:49 am
Forum: C++
Topic: Watch this simple program, what's wrong?
Replies: 3
Views: 2947

Re: Watch this simple program, what's wrong?

the output is 0000000000. but when I change the code to "int value=1;", the output is 16843009 16843009 16843009 16843009 16843009 16843009 16843009 16843009 16843009 16843009. Why??!! (I use Visual C++ 6.0) 16843009 expressed in binary is 00000001000000010000000100000001 since you're mem...
by CDiMa
Wed Jul 27, 2005 2:37 pm
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 56342

I've understand what's wrong with my code Thank u,MDima but here's another problem,my code always get TLE now i even change my graph data structure from adj matrix to adj list,but still got TLE,can u tell me why? is there any wired input data in test case?like a node presented by a string? I don't ...
by CDiMa
Wed Jul 27, 2005 1:20 pm
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 56342

Morning wrote::oops: yeah,it's dfs,actually.
but it isnt why i got WA,is it?
It is:

Code: Select all

4
1 2 2 3 3 4 1 3
1 2 0 0
0
Your program gives 1 nodes not reachable while it should be 0.

Ciao!!!

Claudio
by CDiMa
Wed Jul 27, 2005 10:21 am
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 56342

Morning wrote:

Code: Select all

void bfs(int begin,int ttl)
{
	visited[begin] = 1;
	if(ttl == 0) return;
	int i;
	for(i = 0;i < MAX_NODE;i++)
	{
		if(graph[begin][i] == 1 && visited[i] == 0)
		{
			cnt++;
			bfs(i,ttl - 1);
		}
	}
}
If I understand it correctly your bfs isn't a real bfs...

Ciao!!!

Claudio
by CDiMa
Wed Jul 27, 2005 10:07 am
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 56342

CDiMa,i'm afraid ur code is wrong just look at this group of input and output u apply to us 5 1 2 2 3 3 1 4 5 6 2147483647 1 1 ur program's output is 5 which should be 4 isn't it? Hmmm, I applied this sample to my program and it replied 4... Then I rerun my program on the big sample and it replied ...
by CDiMa
Tue Jul 05, 2005 5:23 pm
Forum: Volume 107 (10700-10799)
Topic: 10763 - Foreign Exchange
Replies: 45
Views: 23542

I use some sort of hashing which is logically wrong, I know that :) Even on a simple test case like this one: 4 1 3 2 4 5 7 14 8 0 my ACC program says "YES" while it should say "NO". That's why I think the test cases of the Judge are pretty weak. Probably you don't handle hash c...
by CDiMa
Tue Jul 05, 2005 4:58 pm
Forum: Volume 107 (10700-10799)
Topic: 10763 - Foreign Exchange
Replies: 45
Views: 23542

I can see there are about 600 accepted programs for problem 10763. These about 600 accepted programs are coming just from 200-250 people. Well, I am wondering how many people have solved this problem with a really ( with a logically ) correct solution . I am pretty sure the Judge's test data is ver...
by CDiMa
Mon Jul 04, 2005 12:28 pm
Forum: Off topic (General chit-chat)
Topic: I win !!
Replies: 361
Views: 151031

A1 wrote:Your algo does not work, I think....:)
I see...
I believe that either fnpc fixed the message in question or the reinstallation of the board fixed the bug...
The overall strategy may work anyway... find a way to break the board...

Ciao!!!

Claudio
by CDiMa
Tue Jun 28, 2005 5:54 pm
Forum: Off topic (General chit-chat)
Topic: I win !!
Replies: 361
Views: 151031

misof wrote:Did anyone notice that an admin may win simply by posting here and locking the thread? 8)
There is a way to win without being an admin and then being banned from the board by an admin :wink:

Look at this thead and be gentle with the board!!!

Ciao!!!

Claudio
by CDiMa
Tue Jun 28, 2005 5:35 pm
Forum: Off topic (General chit-chat)
Topic: I win !! (the proper way!!!)
Replies: 2
Views: 2836

I win !! (the proper way!!!)

This is a game!
The rule of this game is :
The first poster of this thread will be winner.

Look, I win!!! :D :wink:

Ciao!!!

Claudio
by CDiMa
Thu Jun 23, 2005 9:54 am
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 163
Views: 40145

Re: prototype.

scanf( const char *format, ... ); must be pointer variables like int* , char *, double*, in the "..." so, scanf("%lf", &p); abhijit correctly used the address of integer variables in his scanf. His problem was exactly answered by his followup. In C undeclared functions are a...
by CDiMa
Wed Jun 22, 2005 9:43 am
Forum: Volume 103 (10300-10399)
Topic: 10397 - Connect the Campus
Replies: 75
Views: 36466

Unfortunately my program does not fail on that test you've given. It prints 3.00 as it should. Well, I know this was a problem with the particular algorithm I used. I mentioned it just in case... Why should sets containing colinear points be of any problem. It is simply an MST problem in which we a...

Go to advanced search