## Search found 6 matches

Tue Dec 30, 2008 9:00 am
Forum: Volume 1 (100-199)
Topic: 193 - Graph Coloring
Replies: 93
Views: 19525

### Re: How can i solve the problem 193

why would not this work?
color a vertex black.
and go down the tree coloring the vertices till all are colored according to the coloring scheme.
count the number of black vertex and number of white ones,maximum of which should be the answer.
Wed Jun 11, 2008 12:55 pm
Forum: Volume 3 (300-399)
Topic: 352 - The Seasonal War
Replies: 54
Views: 11910

### Re: 352 The Seasonal War

Can anyone please tell me whats wrong in this code because iam always getting a wrong answer. #include<iostream> #include<vector> #include<string> using namespace std; void func( vector < vector<char> > &arr,int i,int j,int num); int main() { int num; int xcase=0; while(cin>>num) { xcase++; const in...
Fri May 30, 2008 5:53 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 43027

### Re: 673 - Parentheses Balance

dear all I have been troubled for the past few weeks solving this problem and have applied all tricks that have been given in the forum. Yet I have been unable to get an AC. My code is as follows #include<iostream> #include<stack> #include<cstdio> using namespace std; int main() { int n; cin>>n; ffl...
Mon Jan 28, 2008 7:30 pm
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 23579

### how tot take the input

Can we take the input 1 at a time i.e. one case as a time ???( if thats possible we just consider to input the first line ie. the number of friends and then move accordingly.) from what codes that have been written here that is what the case seems to me... Awaiting your reply in anticipation thanks ...
Sat Sep 01, 2007 5:21 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 29332

### WA 102

hi all well iam new to acm. here is the code. (the implementation of my code is ltl different than others). #include<iostream> using namespace std; int main() { unsigned long array[9]; int index[3];//store the indices int block1,posblock1;//stores information about the block. these are the repititio...
Sat Aug 25, 2007 4:53 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 29332

### WA 102

hi all well iam new to uva. i have read the forum rules and waited for a day to post this in some old thread reagrding the above but my implementation of the problem is different. here is the code #include<iostream> using namespace std; int main() { unsigned long array[9]; int index[3];//store the i...