Search found 31 matches
- Tue Oct 31, 2006 5:44 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11141 - Sugar Cubes
- Replies: 11
- Views: 5311
- Sat Oct 28, 2006 2:04 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11147 - KuPellaKeS BST
- Replies: 12
- Views: 5864
I don't get it. From the description The difference between sum of all values in the left subtree and sum of all values in the right subtree is minimum.
In your case 4, your answer is 1(-1(-1,1)): sum of left subtree = -1, sum of right subtree = 0, so difference = -1 - 0 = -1.
But for this BST: -1 ...
In your case 4, your answer is 1(-1(-1,1)): sum of left subtree = -1, sum of right subtree = 0, so difference = -1 - 0 = -1.
But for this BST: -1 ...
- Fri Oct 27, 2006 11:22 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11140 - Little Ali's Little Brother!
- Replies: 28
- Views: 16304
- Fri Oct 27, 2006 9:59 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11140 - Little Ali's Little Brother!
- Replies: 28
- Views: 16304
- Fri Oct 27, 2006 8:16 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11141 - Sugar Cubes
- Replies: 11
- Views: 5311
11141 - Sugar Cubes
Could anyone explain why the answer for the last case in the sample I/O is 31? I fail to construct more than one arrangements.
TIA.
TIA.
- Sun Oct 01, 2006 9:44 am
- Forum: Volume 111 (11100-11199)
- Topic: 11107 - Life Forms
- Replies: 21
- Views: 17491
11107 - Life Forms
Does anybody know how to solve this within 16 MB? I'm using a trie, but it uses so much memory, so it exceeds the memory limit (although the actual memory limit used in waterloo is 64MB
). Thanks.

- Thu Dec 15, 2005 12:01 pm
- Forum: Other words
- Topic: ICPC '05 regional in Manila and Coimbatore
- Replies: 9
- Views: 6323
Thx misof. But I was more in the line whether the chief contest director monitor the regional contests, rather than appealing the results. Does he believe whatever the regional director reports or does he crosscheck the result to find anything peculiar? Or does he need to be pointed to a problem ...
- Wed Dec 14, 2005 5:35 am
- Forum: Other words
- Topic: ICPC '05 regional in Manila and Coimbatore
- Replies: 9
- Views: 6323
ICPC '05 regional in Manila and Coimbatore
Hi all,
I participated in Manila and some of my friends participated in Coimbatore ICPC regional. Some (if not all) participants of both regionals suffered from the following things:
1. Poorly written problem set.
2. Lack of experience from the organizers.
3. Strange judging and mysterious ...
I participated in Manila and some of my friends participated in Coimbatore ICPC regional. Some (if not all) participants of both regionals suffered from the following things:
1. Poorly written problem set.
2. Lack of experience from the organizers.
3. Strange judging and mysterious ...
- Mon Aug 09, 2004 4:56 pm
- Forum: C
- Topic: Strange behaviour under GCC 3.3
- Replies: 2
- Views: 2185
- Mon Aug 09, 2004 2:38 pm
- Forum: C
- Topic: Strange behaviour under GCC 3.3
- Replies: 0
- Views: 1638
Strange behaviour under GCC 3.3
Hi,
I wrote the following code, which basically tries to enlist all primes within a certain range.
[c]
#include <string.h>
#include <math.h>
int p[35000];
int li[5000];
int c;
void precalc()
{
int i, j;
memset(&p, 0, sizeof(p));
memset(&li, 0, sizeof(li));
c = 0;
p[1] = 1; p[2] = 0;
for ...
I wrote the following code, which basically tries to enlist all primes within a certain range.
[c]
#include <string.h>
#include <math.h>
int p[35000];
int li[5000];
int c;
void precalc()
{
int i, j;
memset(&p, 0, sizeof(p));
memset(&li, 0, sizeof(li));
c = 0;
p[1] = 1; p[2] = 0;
for ...
- Mon Aug 09, 2004 2:35 pm
- Forum: C
- Topic: Strange behaviour under GCC 3.3
- Replies: 2
- Views: 2185
Strange behaviour under GCC 3.3
Hi,
I wrote the following code, which basically tries to enlist all primes within a certain range.
[c]
#include <string.h>
#include <math.h>
int p[35000];
int li[5000];
int c;
void precalc()
{
int i, j;
memset(&p, 0, sizeof(p));
memset(&li, 0, sizeof(li));
c = 0;
p[1] = 1; p[2] = 0;
for ...
I wrote the following code, which basically tries to enlist all primes within a certain range.
[c]
#include <string.h>
#include <math.h>
int p[35000];
int li[5000];
int c;
void precalc()
{
int i, j;
memset(&p, 0, sizeof(p));
memset(&li, 0, sizeof(li));
c = 0;
p[1] = 1; p[2] = 0;
for ...
- Mon Dec 01, 2003 4:29 am
- Forum: Other words
- Topic: Strange author ranklist
- Replies: 7
- Views: 2653
- Thu Dec 26, 2002 9:47 am
- Forum: Volume 2 (200-299)
- Topic: 254 - Towers of Hanoi
- Replies: 39
- Views: 20556
A hint
Try to think bitwise. (that is, convert m to base 2 and then play with it). Try finding the link between the binary represenatation of m and the number of disks in each peg.
Best wishes and Merry Christmas to those celebrating.
Ilham
Best wishes and Merry Christmas to those celebrating.
Ilham
- Thu Oct 24, 2002 9:29 am
- Forum: Volume 1 (100-199)
- Topic: 108 - Maximum Sum
- Replies: 233
- Views: 51731
108 -- algorithm faster than O(N^3)???
Hi,
I'm wondering is there any algorithm faster than O(N^3) to solve 108??
I've heard rumours that O(N^2) exists, but I can't confirm it.
Cheers,
Ilham
I'm wondering is there any algorithm faster than O(N^3) to solve 108??
I've heard rumours that O(N^2) exists, but I can't confirm it.
Cheers,

Ilham
- Sun Jun 09, 2002 8:23 am
- Forum: Pascal
- Topic: formatting integers
- Replies: 5
- Views: 4092
Re: formatting integers
Can anybody tell me how to properly format integers? I get a lot of PEs and sometimes WAs because my code obviously does something wrong.
I don't use gpp on linux, as advised, but always put the ':1' formatter after a number.
In problem 231 I get PE when outputting with:
[pascal] writeln('Test ...
I don't use gpp on linux, as advised, but always put the ':1' formatter after a number.
In problem 231 I get PE when outputting with:
[pascal] writeln('Test ...