Search found 214 matches

by CDiMa
Wed Nov 10, 2004 5:14 pm
Forum: C++
Topic: Long Long doesn't support
Replies: 3
Views: 1940

Hi, u can alsso use type cast like this: a=(long long) 4000000000; printf("%lld",a); This shoudn't be done, since you are casting an integer constant to a long long variable. Depending on the compiler this may or may not work as expected. To be safe it's better to specify with LL that your constant...
by CDiMa
Tue Nov 09, 2004 11:15 am
Forum: Volume 107 (10700-10799)
Topic: 10771 - Barbarian tribes
Replies: 12
Views: 3869

Re: Memory size

In problem 10771 my solution used as much as 388 kb of memory. Other solutions in ranklist use only 64kb. Since I used only 3 int variables in the code, I guess that the problem is related to the input reading method. I simply used scanf(). Could anybody explain why I need 388kb despite I use 3 var...
by CDiMa
Tue Nov 09, 2004 11:06 am
Forum: Algorithms
Topic: how to check efficiently if an edge is a BRIDGE
Replies: 9
Views: 4474

I am clear with the fleury algorithm. But how do I implement the idea of checking whether an edge is a bridge or not in the reduced graph? if I use DFS every time, the order will become n^2. bye abi Indeed, fleury's algorithm is inefficient and I'm not aware of any shortcut that allows to skip (or ...
by CDiMa
Mon Nov 08, 2004 4:25 pm
Forum: Algorithms
Topic: how to check efficiently if an edge is a BRIDGE
Replies: 9
Views: 4474

Never once tried the fleury's algorithm myself. always used to merge disjoint cycles. any body can help? Fleury's algorithm is easy to explain, slow to implement. You start from a vertex and choose an edge that isn't a bridge for the graph. Then you travel the edge and delete it from the graph. Fro...
by CDiMa
Wed Nov 03, 2004 1:13 pm
Forum: Algorithms
Topic: how to check efficiently if an edge is a BRIDGE
Replies: 9
Views: 4474

thank you very much Abishek. but i know about the DFS approach. I also use set union and disjoint set algo for this. but i was looking for something faster ... particularly for implementing Fleury's algorithm. I don't know how you can search for bridges faster than DFS. Maybe you are looking for th...
by CDiMa
Thu Oct 28, 2004 3:46 pm
Forum: Volume 107 (10700-10799)
Topic: 10738 - Riemann vs Mertens
Replies: 16
Views: 4494

Hi Guys, I'm currently in second place, but with a sizable lookup table too. I've just submitted a new method which contains absolutely NO precalculated table, and timed in at .187 with the judge. Well, my precalculated table isn't that big and I've too a nil-precomputed solution that's timed like ...
by CDiMa
Fri Oct 22, 2004 4:34 pm
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27782

Well, it seems I can't quote the last post, so here is my reply: For the last case it seems that your answer is incorrect. I assume that the value is 10^1200 and obviously the correct answer is 10^600. unless you lost some cypher while posting it seems likely that you don't get the entire input line...
by CDiMa
Fri Oct 22, 2004 12:33 pm
Forum: Volume 107 (10700-10799)
Topic: 10738 - Riemann vs Mertens
Replies: 16
Views: 4494

Hi Michael! Just to set the matter straight, I don't use any of the techniques in that paper I mentioned above. In fact, I discovered it after having already reached a final time of 0.020 s. The techniques in the paper didn't help me at all, at this level. However, people with times greater than hal...
by CDiMa
Wed Oct 20, 2004 11:34 am
Forum: Off topic (General chit-chat)
Topic: translation request (ENG -> ITA, ESP, POR)
Replies: 2
Views: 1890

Re: translation request (ENG -> ITA, ESP, POR)

Hi misof,

here is my translation in Italian:

1. Una mattina Govanni compr
by CDiMa
Mon Oct 18, 2004 10:16 am
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 22161

Re: 280 Vertex WA Help!!

any I/O will be usefull, or any hints please help this is some I/O is right?? [...] My AC program gives the same output. Try this input : 7 1 2 0 2 3 4 0 3 1 0 4 5 0 5 4 0 6 7 0 7 6 0 0 7 1 2 3 4 5 6 7 0 output: 2 6 7 2 6 7 2 6 7 5 1 2 3 6 7 5 1 2 3 6 7 5 1 2 3 4 5 5 1 2 3 4 5 Ciao!!! Claudio
by CDiMa
Wed Oct 13, 2004 2:23 pm
Forum: Off topic (General chit-chat)
Topic: Number of submissions
Replies: 10
Views: 3503

Lets take such statistics Numberofsubmit/numberofAC.For such statistics Ivor -->24074/16510=1.45 :D Mine is 5.3 :lol: When for you .. it is 12367/4597=2.7 :P Another pointless statistic is Number of submit/solved! .. 12374/1342= 9.22 ivor 24074/ 219=109.93 scott 29664/ 133=223.04 Amazing, isn't it?...
by CDiMa
Wed Oct 13, 2004 12:57 pm
Forum: Algorithms
Topic: Geometric graphs and constrained MST
Replies: 5
Views: 1852

[...] and you can prove to yourself that MST in the plane is in the Delaunay Triangulation. I knew this fact, but since I didn't get accepted at first although my prog seemed to work on all the test cases I fed it, I started to think that some of the constraining edges could interfere with the MST ...
by CDiMa
Wed Oct 13, 2004 12:38 pm
Forum: Algorithms
Topic: Geometric graphs and constrained MST
Replies: 5
Views: 1852

CDiMa, i am very very interested about your Algorithm. would you please explain it more clearly. i can't recover your hints :oops: i have hardly managed to Accpeted this code within timelimit. My Accepted code run more than 6sec :roll: i have no knowledge how the other people solved this prolbem in...
by CDiMa
Thu Sep 30, 2004 12:10 pm
Forum: C++
Topic: i can't understand,why???
Replies: 10
Views: 3272

sorry standard int type range is -2^15 to 2^15-1 that is -32768 to 32767 But it is possible that your compiler support more range! :) Nope, C++ standards don't impose much on the size of int types. You can only be certain that a char is exactly one byte, short is at least 2 bytes, int is at least 2...
by CDiMa
Thu Sep 23, 2004 3:38 pm
Forum: Volume 107 (10700-10799)
Topic: 10720 - Graph Construction
Replies: 49
Views: 30746

Abishek: From the link you mention Tripathi and Vijay (2003) showed that this inequality need be checked only for as many r as there are distinct terms in the sequence, not for all 1 <= r <= n-1. But I get WA when I use that. Only after checking the full range I get Accepted. But maybe I mis-unders...

Go to advanced search