Search found 8 matches

by vhua_no_name
Thu Mar 26, 2015 5:32 pm
Forum: Volume 12 (1200-1299)
Topic: 1252 - Twenty Questions
Replies: 7
Views: 1747

Re: 1252 - Twenty Questions

I solved it using recursive backtracking with DP memoization (table size 1 << 12 by 1 << 12). At each state, you try all remaining bits. *<<Take the bit that results in the least number of additional questions in the worst case>>*. hello brianfry713, please, can u explain why we are considering wor...
by vhua_no_name
Sun Feb 23, 2014 4:02 pm
Forum: Volume 107 (10700-10799)
Topic: 10755 - Garbage Heap
Replies: 20
Views: 10298

Re: 10755 - Garbage Heap

thanks brianfry713 for your help. :wink:
i have found my mistake.
by vhua_no_name
Fri Feb 21, 2014 1:20 pm
Forum: Volume 107 (10700-10799)
Topic: 10755 - Garbage Heap
Replies: 20
Views: 10298

Re: 10755 - Garbage Heap

i am getting WA ans for this problem. But it gives the same output as UVA toolkit for random test cases. Don't know whats wrong with my code. please some one take a look at my code (specially @brianfry713 :) ). thanks in advance #include <iostream> #include<cstdio> #include<cstring> using namespace ...
by vhua_no_name
Thu Feb 20, 2014 3:58 pm
Forum: Volume 109 (10900-10999)
Topic: 10911 - Forming Quiz Teams
Replies: 33
Views: 16139

Re: 10911 - Forming Quiz Teams

hello brianfry713,
just got AC :D .
I don't know how to thank you.
You are just awesome!
can i have your email address? i am new to uva and i need some suggestion from you.
by vhua_no_name
Wed Feb 19, 2014 4:32 pm
Forum: Volume 109 (10900-10999)
Topic: 10911 - Forming Quiz Teams
Replies: 33
Views: 16139

Re: 10911 - Forming Quiz Teams

thanks brianfry713 for your reply. here is my code. its gives the same output for the test cases you have supplied. #include <iostream> #include<cmath> #include<algorithm> #include<cstdio> using namespace std; int n; int flag[20]; double t[150000]; class pr{ public: int x; int y; }; pr a[20]; double...
by vhua_no_name
Sun Feb 16, 2014 10:59 am
Forum: Volume 109 (10900-10999)
Topic: 10911 - Forming Quiz Teams
Replies: 33
Views: 16139

Re:

Ya, my things are right. I was Guest up there, and it turns out I forget to declare hypot (otherwise it returns int on the judge). Whoops. my code gives the same output as yours for the above test cases but still i am getting wrong ans. And i have not declared hypot. i am new to Uva and don't know ...
by vhua_no_name
Thu Feb 13, 2014 7:31 pm
Forum: Volume 109 (10900-10999)
Topic: 10911 - Forming Quiz Teams
Replies: 33
Views: 16139

Re: 10911 - Forming Quiz Teams

Hi,
I want to solve this problem using DP. But could not find the technique how to solve it using DP. please someone describe the algorithm.
thanks in advance.
by vhua_no_name
Sat Dec 21, 2013 8:58 pm
Forum: Volume 5 (500-599)
Topic: 562 - Dividing coins
Replies: 73
Views: 28582

getting WA for 562

hi, I am new to UVa. i am getting WA for 562-Dividing coins problem. it will be very helpful if someone help me. thanks #include<iostream> using namespace std; int main() { int n,i,j,cases,min; long long int s,w; int a[2005]; int m[2005]; cin>>cases; while(cases--) { cin>>n; s=0; for(i=0;i<n;i++){ c...

Go to advanced search