Search found 2 matches

by vellvisher
Sun Jan 27, 2013 11:46 am
Forum: Volume 11 (1100-1199)
Topic: 1197 - The Suspects
Replies: 8
Views: 5033

Re: 1197 - The Suspects

Oops..had forgot one case...saw it in the link..thanks a lot! :-)

V
by vellvisher
Fri Jan 25, 2013 1:34 pm
Forum: Volume 11 (1100-1199)
Topic: 1197 - The Suspects
Replies: 8
Views: 5033

1197 - The Suspects

I am getting RE continuously..:-(

#include<iostream>
#include<vector>
using namespace std;
typedef vector<int> vi;
class UnionFind{
private: vi p;

public: UnionFind(int N) { p.assign(N+1,-1);}
void reset(int N) { p.clear(); p.assign(N+1, -1);}
int findSet(int i) {if (p[i] < 0) return i; else ...

Go to advanced search