Search found 136 matches
- Tue Oct 07, 2008 8:55 pm
- Forum: Volume 115 (11500-11599)
- Topic: 11503 - Virtual Friends
- Replies: 49
- Views: 25322
Re: 11503-Virtual Friends
I was using the same algorithm (union-find) in C++ and it was run under 1.6 secs. Anyway, in what language do you write your code ?
- Sat Oct 04, 2008 2:16 pm
- Forum: Volume 115 (11500-11599)
- Topic: 11504 - Dominos
- Replies: 55
- Views: 29720
Re: 11504 - Dominos
I wonder what is the answer for the following test case :
Is it 5 ?
EDIT :
I got it now. It must be 6.
Code: Select all
1
10 5
1 2
2 5
3 4
1 3
2 3
EDIT :
![:oops:](./images/smilies/icon_redface.gif)
- Sun Sep 28, 2008 5:38 am
- Forum: Volume 115 (11500-11599)
- Topic: 11504 - Dominos
- Replies: 55
- Views: 29720
Re: 11504 - Dominos
I was using union-find algorithm at the contest. But I got several WA's. I think my program failed in handling reversible connection (i.e. 1->2 and 2->1).
- Tue Sep 23, 2008 7:04 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11492 - Babel
- Replies: 18
- Views: 13306
Re: 11492 - Babel
Try this :
It should return 5 instead of "impossivel".
Code: Select all
4
a b
a c aku
a c ku
c b kc
c b bada
- Sat Sep 06, 2008 4:36 pm
- Forum: Bugs and suggestions
- Topic: Multiple users
- Replies: 2
- Views: 1963
Re: Multiple users
Hi... It's me the one who have 3 accounts. :oops: Actually, I didn't do it purposely. At one time, I had forgotten my ID accounts (2 times). So I had to create the new one. But then, I found my ID account right after I created the third one. But since UVA is migrated to the new server, I'm just usin...
- Wed Jan 09, 2008 7:25 pm
- Forum: Bugs and suggestions
- Topic: No Forum in new UVA site ?
- Replies: 6
- Views: 2366
No Forum in new UVA site ?
Hi, I'm just wondering why there is no forum in the new site ? Why don't the forum here is moved to new site ? Thx ![:D](./images/smilies/icon_biggrin.gif)
![:D](./images/smilies/icon_biggrin.gif)
- Tue Dec 11, 2007 12:56 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 97526
- Mon Dec 10, 2007 9:32 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 97526
- Sun Jul 29, 2007 12:09 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11247 - Income Tax
- Replies: 50
- Views: 26084
What's wrong with my code : #include <iostream> #include <bitset> #include <algorithm> #include <cstdio> #include <cstdlib> #include <string> #include <cstring> #include <vector> #include <map> #include <queue> #include <deque> #include <stack> #include <cctype> #include <set> #include <cmath> #incl...
- Mon Jul 23, 2007 3:25 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10154 - Weights and Measures
- Replies: 60
- Views: 47394
- Sun Jul 15, 2007 8:02 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11240 - Antimonotonicity
- Replies: 33
- Views: 15952
Try this test case :
The answer should be 3.
Code: Select all
1
5 8 9 7 6 10
- Sun Jul 15, 2007 3:32 am
- Forum: Volume 112 (11200-11299)
- Topic: 11240 - Antimonotonicity
- Replies: 33
- Views: 15952
11240 - Antimonotonicity
Got TLE with DP (Top Down). How did you guys solve this problem without getting TLE ?
- Fri Jul 06, 2007 10:31 am
- Forum: C++
- Topic: How to check for blank line?
- Replies: 5
- Views: 4817
This might help :
Code: Select all
int main () {
string s;
while (getline(cin,s)) {
if (s.length() == 0) break;
int n = atoi(s.c_str());
printf("%d\n",n);
}
return 0;
}
- Thu Jul 05, 2007 6:04 pm
- Forum: Volume 9 (900-999)
- Topic: 988 - Many Paths, One Destination
- Replies: 9
- Views: 8750
- Tue Jun 26, 2007 5:43 pm
- Forum: Volume 9 (900-999)
- Topic: 924 - Spreading The News
- Replies: 17
- Views: 12856
Can you give me another sample IOs ? I got WA with this code : #include <iostream> #include <bitset> #include <algorithm> #include <cstdio> #include <cstdlib> #include <string> #include <cstring> #include <vector> #include <map> #include <queue> #include <deque> #include <stack> #include <cctype> #i...