My solution seems easier.. I have only n+m+2 vertices, and the i'th device is connected to the j'th plug with a 1-capacity edge only if we can connect the two, using any kind of adapter.
This should be right too... but it keeps wa-ing.
Search found 6 matches
Search found 6 matches • Page 1 of 1
- Tue Feb 22, 2005 1:09 am
- Forum: Volume 7 (700-799)
- Topic: 753 - A Plug for UNIX
- Replies: 20
- Views: 10751
I can't find out what's wrong... Let's say we have a total of nrrec plugs or receptacles. While reading the input data I always check if the plug has been read before. If not, I increase nrrec and add it. For each of the m devices I have ptr - the number of the plug / receptacle of the i'th device. ...
I read it in a book, I got used to it. And I am a C lover. In order to use nothing more than an array, I usually do something like
And It works just fine I believe.
Code: Select all
typedef int huge[maxlength]; huge H;
in c++ sometimes j use long double but most time you must wrore your implementation big num for example table 0 1 2 3 4 5 4 5 6 7 5 3 can reprezent number 456753 You should represent the numbers in reversed order to keep the calculations simple. And v should be the length of the number... So for...
Thanks about the advice... I thought about something like this but the graph already has 2.500 nodes, and the length of the source is already... big. :D I don't know if I can write the code with your advice... if I do write it I don't know if I can debug it... and if I debug it I don't know if it wi...
IMO max flow kicks ass :lol: so I started to solve this problems. I didn't have any trouble solving Software Allocation, but I haven't solved #563 Crimewave yet. First I thought that there will be a graph with s*a vertices, the source will be connected to the banks and the vertices on the border wil...