Search found 12 matches

by Aengus
Mon Sep 04, 2006 11:37 am
Forum: Other words
Topic: New language: Python ?
Replies: 10
Views: 8595

Are there any hopes including Python in the number of allowed languages now? Now it becomes to more widespread among the competiotions. For example, it is allowed at Google Code Jam.
by Aengus
Tue Jun 06, 2006 6:59 pm
Forum: C
Topic: Compilation Error: math functions?
Replies: 2
Views: 4059

Thanks a lot. It helped.
by Aengus
Tue Jun 06, 2006 6:32 pm
Forum: C
Topic: Compilation Error: math functions?
Replies: 2
Views: 4059

Compilation Error: math functions?

I submitted the following code and got the compilation error (jeez... the second one in two days): #include <math.h> #include <stdio.h> int main() { int i, n; scanf("%d", &n); for (i = 0; i < n; i++) { double b, h, r0, tau, m, res; scanf("%lf %lf", &b, &h); b /= 2; r0 = 2*b*h / (b + sqrt(b*b + h*h))...
by Aengus
Mon Jun 05, 2006 10:57 pm
Forum: Volume 3 (300-399)
Topic: 355 - The Bases Are Loaded
Replies: 74
Views: 22824

Oh, thanks! So, it just needs

Code: Select all

#include <algorithm>
It's curious that my compiler was quite satisfied with this code without that include.[/code]
by Aengus
Mon Jun 05, 2006 5:36 pm
Forum: Volume 3 (300-399)
Topic: 355 - The Bases Are Loaded
Replies: 74
Views: 22824

355: Compile Error

This code is clearly compiled by my gcc 3.3.4, but I get "Compile Error" response from the Online Judge: #include <iostream> #include <string> using namespace std; long long my_a2i(string s, int base) { long long res = 0; int sign = 1; unsigned i = 0; if (s[0] == '-') { sign = -1; i = 1; } for (; i ...
by Aengus
Fri Sep 16, 2005 12:19 pm
Forum: C
Topic: Compilation Error
Replies: 2
Views: 2480

Thanks for your advices!
by Aengus
Fri Sep 16, 2005 11:02 am
Forum: C
Topic: Compilation Error
Replies: 2
Views: 2480

Compilation Error

I've got a compilation error with the following code. Could anybody help me? #include <stdio.h> #include <math.h> int main() { while (1) { int v; scanf("%d", &v); if (v == 0) break; int p = 1; int pp; for (pp = 2; pp < 32; pp++) { int r = exp(log(v)/pp); int rr = 1; int i; for (i = 0; i < pp; i++) r...
by Aengus
Sun Nov 09, 2003 1:47 pm
Forum: Volume 1 (100-199)
Topic: 114 - Simulation Wizardry
Replies: 80
Views: 7624

Continuous troubles with this problem.

I have troubles with this problem for a long time. I've already checked all the things, mentioned at the board. I got Time Limit and when I've made some kind of dynamic programming instead of usual simulation, I've got the runtime error, which ment that the ball returnes to some point with increased...
by Aengus
Sun Nov 09, 2003 1:33 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 28667

AC at llast

Oh, thank you! The trouble was really in that point.
by Aengus
Sat Nov 08, 2003 11:04 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 28667

Re: check this input & output

Osan, Thank you for your answer, but I tried not to swap values if first is greater than the second and nothing changed. Besides, it is not clear from the statement of the problem, what to output in case of L>H. The sequence starting with 1 has length 3 (it is the example in the problem), the sequen...
by Aengus
Thu Oct 30, 2003 5:10 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 28667

It's funny, that everything is exactly the same that I've thought. May be somebody can check the code: [c]#include <stdio.h> unsigned next(unsigned a) { if (a == 1) return 0; if (a % 2 == 0) return a / 2; else return 3*a + 1; } int seq_len(unsigned a) { int steps = 0; if (a == 1) return 3; while (a ...
by Aengus
Thu Oct 30, 2003 1:45 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 28667

Continous problems with this problem

I've already spent plenty of time on this problem and I am really curious where do I have mistakes. I've used the function for calculation that I already succesfully used in the problem 694 together with the long-arithmetic engine that I also used in several other problems. So, my questions: 1. Can ...

Go to advanced search