Search found 90 matches

by bery olivier
Wed Apr 16, 2003 2:17 pm
Forum: Volume 104 (10400-10499)
Topic: 10479 - The Hendrie Sequence
Replies: 14
Views: 5343

Each test case consists of a single line containing the integer n ( 0 < n < (2^63))
This fits in long long. OJ can handle. As the numbers are positive, you can also use unsigned for more safe.
by bery olivier
Wed Apr 09, 2003 3:49 pm
Forum: Volume 102 (10200-10299)
Topic: 10215 - The Largest/Smallest Box ...
Replies: 55
Views: 29350

These outputs are correct.
input

Code: Select all

0.00001 0.00001
11111.11111 11111.11111
99999.00001 11111.11111
99999.99999 99999.99999
output

Code: Select all

0.000 0.000 0.000
1851.852 0.000 5555.556
2696.289 0.000 5555.556
16666.667 0.000 50000.000
by bery olivier
Tue Apr 08, 2003 1:42 pm
Forum: C
Topic: Problem using floating number in a structure
Replies: 3
Views: 2020

Just use %lf, this works with gcc
[c]#include <stdio.h>
#define MAX 10
struct tag
{
double a;
}x[MAX];

int main ()
{
int i;
for (i = 0; i < MAX; ++i) scanf ("%lf", &x.a);
for (i = 0; i < MAX; ++i) printf ("%lf\n", x.a);
return 0;
}
[/c]
by bery olivier
Sat Apr 05, 2003 3:54 pm
Forum: Other words
Topic: Some statistics scripts!!!
Replies: 24
Views: 4692

I won't say anything more about this subject. You can do whatever you want with our server; you can hack it even if you want. You can overload it as much as you want. what's the matter ? The script for the countries is launch one time per day max. Your server manage to handle easily at least 1 subm...
by bery olivier
Fri Mar 28, 2003 2:26 pm
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 31117

An Emirp (Prime spelt backwards) is a Prime that gives you a different Prime when its digits are reversed.
You should check if the mirror is different before the second prime test.
by bery olivier
Mon Mar 24, 2003 3:25 pm
Forum: Off topic (General chit-chat)
Topic: ***!!! PLEASE STOP IT !!!***
Replies: 12
Views: 5837

agree with kmhasan
by bery olivier
Sun Mar 23, 2003 7:35 pm
Forum: Algorithms
Topic: Irrational Numbers p/q !!!
Replies: 11
Views: 3627

makbet wrote:there is a handy formula which you can use to calculate pi:
pi/4=(1/1)-(1/3)+(1/5)-(1/7)...
the more time your program runs, the more accurate it gets :wink:
Cool, I lost this formula thanks a lot. I'll have a lot of good time with it.
Thanks a lot !
:D
by bery olivier
Sun Mar 23, 2003 2:06 pm
Forum: Algorithms
Topic: Irrational Numbers p/q !!!
Replies: 11
Views: 3627

about rational numbers

Irrational Numbers p/q If a number is a fraction p/q (p,q integers) then it's a rational number, isn't it ? Here is the algorithm I usually use: print or store p/q print or store ( (10*p/q)%q )/q print or store ( (10*( (10*p/q)%q )/q)%q )/q etc... My code is as follow : [c]/* number of decimals req...
by bery olivier
Fri Mar 21, 2003 1:50 pm
Forum: C
Topic: unsigned long long in C
Replies: 7
Views: 3029

about (unsigned) long long

The online judge supports long long int. If your compiler doesn't you can write your code whit long int and test it with small number. Before send your code, you only need to put something like : [c]#define long long long int[/c]
and replace all your %ld or %lu by %lld or %llu
by bery olivier
Thu Mar 20, 2003 12:57 pm
Forum: Volume 102 (10200-10299)
Topic: 10279 - Mine Sweeper
Replies: 102
Views: 28161

grrrrr :-(

I got the same problem, I can't find the inputs that causes that wrong answer. :evil:
by bery olivier
Thu Mar 20, 2003 11:21 am
Forum: Other words
Topic: Broken links to the images..
Replies: 2
Views: 886

images 10402

I had the same problem on windows. But I can see theses images on linux. :-? It's strange :-? . Maybe you should try to open your browser with linux.
by bery olivier
Tue Mar 18, 2003 11:33 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 34846

:-? I cannot find anything wrong in your code. I sent it and got AC. Your code is ok.
by bery olivier
Mon Mar 17, 2003 7:30 pm
Forum: Volume 104 (10400-10499)
Topic: 10426 - Knights' Nightmare
Replies: 17
Views: 7731

ID !!

You shouldn't give your ID on this forum.

:wink:
A+.
Olivier.
by bery olivier
Mon Mar 17, 2003 4:20 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 34846

I cannot see it on the board, but I suppose you put '\n' in your printfs. Your code seems ok, but for display or scan an unsigned long, you should use "%lu".
by bery olivier
Sun Mar 16, 2003 11:05 am
Forum: Volume 101 (10100-10199)
Topic: 10190 - Divide, But Not Quite Conquer!
Replies: 105
Views: 23736

you must do k-1 succesive divisions to reach n = 1 You should print the results only if (n%m)!=0 until the end. try these inputs 999 111 55 11 40 20 8 4 it gives me 999 9 55 5 40 2 8 2 But this gives me better outputs [c] if(!flag || a[i-1]!=1) printf("Boring!\n"); [/c] I just tested it and I got a...

Go to advanced search