Search found 12 matches
- Mon Sep 04, 2006 11:37 am
- Forum: Other words
- Topic: New language: Python ?
- Replies: 10
- Views: 11394
- Tue Jun 06, 2006 6:59 pm
- Forum: C
- Topic: Compilation Error: math functions?
- Replies: 2
- Views: 5194
- Tue Jun 06, 2006 6:32 pm
- Forum: C
- Topic: Compilation Error: math functions?
- Replies: 2
- Views: 5194
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 ...
#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 ...
- Mon Jun 05, 2006 10:57 pm
- Forum: Volume 3 (300-399)
- Topic: 355 - The Bases Are Loaded
- Replies: 74
- Views: 30573
Oh, thanks! So, it just needs
It's curious that my compiler was quite satisfied with this code without that include.[/code]
Code: Select all
#include <algorithm>
- Mon Jun 05, 2006 5:36 pm
- Forum: Volume 3 (300-399)
- Topic: 355 - The Bases Are Loaded
- Replies: 74
- Views: 30573
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 ...
#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 ...
- Fri Sep 16, 2005 12:19 pm
- Forum: C
- Topic: Compilation Error
- Replies: 2
- Views: 2849
- Fri Sep 16, 2005 11:02 am
- Forum: C
- Topic: Compilation Error
- Replies: 2
- Views: 2849
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 ...
#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 ...
- Sun Nov 09, 2003 1:47 pm
- Forum: Volume 1 (100-199)
- Topic: 114 - Simulation Wizardry
- Replies: 80
- Views: 16279
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 ...
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 ...
- Sun Nov 09, 2003 1:33 pm
- Forum: Volume 3 (300-399)
- Topic: 371 - Ackermann Functions
- Replies: 196
- Views: 51118
AC at llast
Oh, thank you! The trouble was really in that point.
- Sat Nov 08, 2003 11:04 pm
- Forum: Volume 3 (300-399)
- Topic: 371 - Ackermann Functions
- Replies: 196
- Views: 51118
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 ...
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 ...
- Thu Oct 30, 2003 5:10 pm
- Forum: Volume 3 (300-399)
- Topic: 371 - Ackermann Functions
- Replies: 196
- Views: 51118
- Thu Oct 30, 2003 1:45 pm
- Forum: Volume 3 (300-399)
- Topic: 371 - Ackermann Functions
- Replies: 196
- Views: 51118
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 ...
So, my questions:
1 ...