Search found 48 matches
- Sun Jun 15, 2003 3:52 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10512 - A Day in Math-land
- Replies: 52
- Views: 18162
- 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...
- Sun Jun 15, 2003 12:49 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10515 - Powers Et Al.
- Replies: 124
- Views: 41553
- Sun Jun 15, 2003 8:13 am
- Forum: Volume 105 (10500-10599)
- Topic: 10512 - A Day in Math-land
- Replies: 52
- Views: 18162
- 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
can anyone tell me what are the situations that i should output 'invalid or impossible'?
Code: Select all
m cos(n/R) - n
tan a = --------------
m sin(n/R)
- Sun Jun 15, 2003 8:03 am
- Forum: Volume 105 (10500-10599)
- Topic: 10512 - A Day in Math-land
- Replies: 52
- Views: 18162
- Sun Jun 15, 2003 8:01 am
- Forum: Volume 105 (10500-10599)
- Topic: 10515 - Powers Et Al.
- Replies: 124
- Views: 41553
- 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 :=...
- 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...
- 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 <> '#'...
- Wed Jun 11, 2003 3:09 am
- Forum: Volume 104 (10400-10499)
- Topic: 10445 - Make Polygon
- Replies: 35
- Views: 18480
- 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...
- Sun Jun 08, 2003 7:05 am
- Forum: C++
- Topic: why does this code got Compilation Error
- Replies: 3
- Views: 2866
- 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...
- 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...