i used kruskal.
finding all edges and sorting them is o(n^2log(n^2)) task
i used stl library for sorting
can this be done more effeciantely.
Search found 21 matches
- Wed Jul 04, 2007 7:51 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10147 - Highways
- Replies: 67
- Views: 31557
- Thu Jun 28, 2007 7:11 pm
- Forum: Volume 1 (100-199)
- Topic: 122 - Trees on the level
- Replies: 103
- Views: 22039
- Thu Jun 28, 2007 2:33 pm
- Forum: Volume 1 (100-199)
- Topic: 122 - Trees on the level
- Replies: 103
- Views: 22039
- Thu Jun 28, 2007 1:15 pm
- Forum: Volume 1 (100-199)
- Topic: 122 - Trees on the level
- Replies: 103
- Views: 22039
- Thu Jun 28, 2007 1:11 pm
- Forum: Volume 1 (100-199)
- Topic: 122 - Trees on the level
- Replies: 103
- Views: 22039
122....RTE.....PLZZZ HELP
my program give following run time error whn submitted
plzzz help i m in gr8 fix
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../include/g++-3/stl_pair.h: In method `pair<basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >,char[2]>::pair(const string &, const ...
plzzz help i m in gr8 fix
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../include/g++-3/stl_pair.h: In method `pair<basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >,char[2]>::pair(const string &, const ...
- Tue Jun 19, 2007 2:06 am
- Forum: Off topic (General chit-chat)
- Topic: What is your record of solved problems during one day?
- Replies: 18
- Views: 73814
- Sat Jun 16, 2007 9:07 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10822 - Planet of the Rock, Paper and Scissors
- Replies: 10
- Views: 7653
- Fri Jun 15, 2007 8:06 am
- Forum: Volume 105 (10500-10599)
- Topic: 10509 - R U Kidding Mr. Feynman?
- Replies: 41
- Views: 20427
- Thu Jun 14, 2007 11:49 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10822 - Planet of the Rock, Paper and Scissors
- Replies: 10
- Views: 7653
is thr no one..............
plzzzzzzzzzz help i am really frustrated........... 

- Wed Jun 13, 2007 8:09 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10822 - Planet of the Rock, Paper and Scissors
- Replies: 10
- Views: 7653
WRONG ANS IN 10822
i am repetedly getting wrong ans.
algorithm
1.i am using dfs...a is connected to b if a dominates b .
2.all element connected to a will be marked (mark[a]+1)%3(ist element is marked 0
3.if graph is disconnected and no conflicting record appears in any subgraph print notenough data
else
print ...
algorithm
1.i am using dfs...a is connected to b if a dominates b .
2.all element connected to a will be marked (mark[a]+1)%3(ist element is marked 0
3.if graph is disconnected and no conflicting record appears in any subgraph print notenough data
else
print ...
- Tue Jun 12, 2007 9:47 pm
- Forum: Volume 3 (300-399)
- Topic: 352 - The Seasonal War
- Replies: 54
- Views: 23030
wa plzzzzzzzzzz help...
i have passed many test cases it is working fine plzzzzzzzz tell wat the hell went wrong
orPROVIDE ME WITH SOME CRITICL TEST CASES
orPROVIDE ME WITH SOME CRITICL TEST CASES
Code: Select all
code removed after ac
[b] :( [/b]
- Sun Jun 10, 2007 12:45 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 66996
hmmm...got ac
lolzzz

i got ac with same code........but believe i got wrong ans so many times.........
dunno y??????
- Sat Jun 09, 2007 7:06 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 66996
wa now
yes i totally underestimated this problrm.now this time i am sure my algo is right(hope so)
plzzzzzzzz jan telll me y i m getting WA...........
which cases i am missing...................
[/code]
plzzzzzzzz jan telll me y i m getting WA...........
which cases i am missing...................
Code: Select all
/*code removed*/
- Sat Jun 09, 2007 3:23 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 66996
tle...............help plzzzzzzzzz
for god"s sake can anyone tell y the hell i am getting out of time.......
plzzzzzzzzz help
#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
int count=0;
string s;
while(cin>>s)
{
if(s[0]=='\n')
return 0;
if(s[0]==' ')
return 0;
count++;
printf("Case %i:\n ...
plzzzzzzzzz help
#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
int count=0;
string s;
while(cin>>s)
{
if(s[0]=='\n')
return 0;
if(s[0]==' ')
return 0;
count++;
printf("Case %i:\n ...
- Sat Jun 09, 2007 11:29 am
- Forum: Volume 3 (300-399)
- Topic: 371 - Ackermann Functions
- Replies: 196
- Views: 51118