Search found 136 matches

by jan_holmes
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 ?
by jan_holmes
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 :

Code: Select all

1
10 5
1 2
2 5
3 4
1 3
2 3
Is it 5 ?

EDIT : :oops: I got it now. It must be 6.
by jan_holmes
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).
by jan_holmes
Tue Sep 23, 2008 7:04 pm
Forum: Volume 114 (11400-11499)
Topic: 11492 - Babel
Replies: 18
Views: 13306

Re: 11492 - Babel

Try this :

Code: Select all

4
a b
a c aku
a c ku
c b kc
c b bada
It should return 5 instead of "impossivel".
by jan_holmes
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...
by jan_holmes
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
by jan_holmes
Tue Dec 11, 2007 12:56 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 97526

Runtime Error is happened not because of the unacknowledgement syntaxes in your code... It is happened because of the error on your programming logic source code, like for example you defined an array size of 10, but suddenly you try to access arr[10].
by jan_holmes
Mon Dec 10, 2007 9:32 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 97526

using ">>C++ 4.1.2 - GNU C++ Compiler with options: -lm -lcrypt -O2 -pipe -DONLINE_JUDGE" is better because most functions in C will be available in C++.
by jan_holmes
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...
by jan_holmes
Mon Jul 23, 2007 3:25 pm
Forum: Volume 101 (10100-10199)
Topic: 10154 - Weights and Measures
Replies: 60
Views: 47394

EDIT : ACed... I was just assumed that the stack is not more than 1000.
by jan_holmes
Sun Jul 15, 2007 8:02 pm
Forum: Volume 112 (11200-11299)
Topic: 11240 - Antimonotonicity
Replies: 33
Views: 15952

Try this test case :

Code: Select all

1
5 8 9 7 6 10
The answer should be 3.
by jan_holmes
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 ?
by jan_holmes
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;
}
by jan_holmes
Thu Jul 05, 2007 6:04 pm
Forum: Volume 9 (900-999)
Topic: 988 - Many Paths, One Destination
Replies: 9
Views: 8750

Can anybody tell me what is the limit of n ? And I think it is a dp problem, am I right ?

EDIT : ACC... :) The one for sure is that n < 15000. And yes, it is kind of a dp problem ( at least I solved it that way).
by jan_holmes
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...

Go to advanced search