Search found 48 matches

by lowai
Sun Jun 15, 2003 3:52 pm
Forum: Volume 105 (10500-10599)
Topic: 10512 - A Day in Math-land
Replies: 52
Views: 18162

can you provide me some test data?
by lowai
Sun Jun 15, 2003 2:47 pm
Forum: Volume 105 (10500-10599)
Topic: 10517 - Wind of Change!
Replies: 12
Views: 5418

i still got WA. [pascal] const R = 6378.0; var i, kase : integer; n, m : double; a, t1, t2 : double; begin readln(kase); for i := 1 to kase do begin readln(n, m); write('Case ', i, ': '); if (n >= 1001) or (n >= m) then begin writeln('Invalid or impossible.'); continue; end; t1 := m * cos(n / R); if...
by lowai
Sun Jun 15, 2003 12:49 pm
Forum: Volume 105 (10500-10599)
Topic: 10515 - Powers Et Al.
Replies: 124
Views: 41553

0
1
4
2
7
9
4
5
6
1
4
6
1
1
9
6
by lowai
Sun Jun 15, 2003 8:13 am
Forum: Volume 105 (10500-10599)
Topic: 10512 - A Day in Math-land
Replies: 52
Views: 18162

i use double.
by lowai
Sun Jun 15, 2003 8:06 am
Forum: Volume 105 (10500-10599)
Topic: 10517 - Wind of Change!
Replies: 12
Views: 5418

10517 - Wind of Change!

i use the following formula to calculate the latitude

Code: Select all

        m cos(n/R) - n
tan a = --------------
          m sin(n/R)
can anyone tell me what are the situations that i should output 'invalid or impossible'?
by lowai
Sun Jun 15, 2003 8:03 am
Forum: Volume 105 (10500-10599)
Topic: 10512 - A Day in Math-land
Replies: 52
Views: 18162

i also got WA...
my answer is the exactly the same as yours.
by lowai
Sun Jun 15, 2003 8:01 am
Forum: Volume 105 (10500-10599)
Topic: 10515 - Powers Et Al.
Replies: 124
Views: 41553

i got WA with my Pascal code.
and i could get AC by using scanf("%s%s") in C...
by lowai
Fri Jun 13, 2003 9:21 am
Forum: Volume 103 (10300-10399)
Topic: 10357 - Playball !!!
Replies: 4
Views: 2782

10357 - Playball !!!

can anyone give some data? [pascal] var nplayer, nball, code : integer; player : array[1..20, 1..3]of longint; i : integer; a, b, c, d, e, f, g : double; x, y : double; r, t : double; s : string; function ceiling(x : double) : double; begin if abs(int(x) - x) < 1e-7 then ceiling := x else ceiling :=...
by lowai
Thu Jun 12, 2003 4:42 am
Forum: Volume 8 (800-899)
Topic: 839 - Not so Mobile
Replies: 21
Views: 10914

i got wa with the code following... can anyone help me to check it/ [pascal] var kase : integer; equ : boolean; function balance : double; var w1, d1, w2, d2 : longint; l, r : double; begin readln(w1, d1, w2, d2); if not equ then exit; if w1 > 0 then l := w1 else l := balance; if w2 > 0 then r := w2...
by lowai
Wed Jun 11, 2003 8:38 am
Forum: Volume 101 (10100-10199)
Topic: 10176 - Ocean Deep ! - Make it shallow !!
Replies: 37
Views: 16959

i use that method but got WA. what's wrong with my code? [pascal] var ch : char; x : longint; a : array[-17..10000]of shortint; b : array[0..1, 1..600]of shortint; l, lb, ll, i : longint; p, q : integer; p0, p1 : integer; begin l := 0; while not eof do begin read(ch); x := 0; l := 0; while ch <> '#'...
by lowai
Wed Jun 11, 2003 3:09 am
Forum: Volume 104 (10400-10499)
Topic: 10445 - Make Polygon
Replies: 35
Views: 18480

will the polygon be concave?
by lowai
Mon Jun 09, 2003 3:21 am
Forum: Volume 102 (10200-10299)
Topic: 10238 - Throw the Dice
Replies: 6
Views: 4851

10238 - Throw the Dice

i wonder it. [pascal] const maxlen = 15; type tbignum = record len : integer; dat : array[1..maxlen]of longint; end; var d : array[1..2500]of tbignum; b : tbignum; zero, one : tbignum; i, j, k, f, n, s : integer; procedure multiply(var a : tbignum; n : integer); var i : integer; p, q : longint; begi...
by lowai
Sun Jun 08, 2003 7:05 am
Forum: C++
Topic: why does this code got Compilation Error
Replies: 3
Views: 2866

but i still got 'compile error' after i added 'include <stdlib.h>'
by lowai
Sat Jun 07, 2003 9:02 am
Forum: C++
Topic: why does this code got Compilation Error
Replies: 3
Views: 2866

why does this code got Compilation Error

it works well in VC++ 6.0 [cpp] #include <stdio.h> #include <iostream.h> #include <math.h> #include <string.h> double hypot(double x, double y) { return sqrt(x*x + y*y); } int main() { int mins, p; double x, y, xx, yy; double dist = 0; char line[80], s[80], temp[80], *ss; int kase; cin >> kase; whil...
by lowai
Fri Jun 06, 2003 5:28 am
Forum: Volume 102 (10200-10299)
Topic: 10229 - Modular Fibonacci
Replies: 53
Views: 24012

10229 (fibonacci modular)

why i got wa? any tricky there? i find the repetends for 0<=m<=20 and store them.. [cpp] #include <stdio.h> long data[3145727]; long a[21], sp[21]; int main() { long n, m, q; long f1, f2, f3; long len; a[0] = 1; sp[0] = 0; data[0] = 0; len = 1; for (m = 1; m <= 20; m++) { q = 1 << m; sp[m] = len; da...

Go to advanced search