## Search found 23 matches

Sun Jul 17, 2005 5:07 am
Forum: Volume 102 (10200-10299)
Topic: 10297 - Beavergnaw
Replies: 13
Views: 6798
the volumn of 2 cones can be calculated by this formula..

1/3 * pi * r * r * h

r of the circle of its bottom

h is the height of the cone
Fri Oct 08, 2004 8:17 am
Forum: Volume 107 (10700-10799)
Topic: 10703 - Free spots
Replies: 26
Views: 8878
I can't understand what it wants
Wed Oct 06, 2004 9:26 am
Forum: Volume 107 (10700-10799)
Topic: 10720 - Graph Construction
Replies: 49
Views: 30458
why do i always get wa? i've tried all the test data above and got the same answer.. :( [c]#include <stdio.h> #include <stdlib.h> #define NN 10000 int comp(const void *a, const void *b) { return *(int *)b - *(int *)a; } int main(void) { int not, j, tmp, big; int i, n, sum, v[NN]; while (scanf("%d", ...
Fri Jul 16, 2004 4:13 pm
Forum: Volume 104 (10400-10499)
Topic: 10484 - Divisibility of Factors
Replies: 39
Views: 18408
I consider long long & if d<0 but still got wa, could anyone plz help me? [c]#include <iostream> using namespace std; int main(void) { int primes[25]= { 2,3,5,7,11,13,17,19,23,29,31,37,41,43, 47,53,59,61,67,71,73,79,83,89,97 }; int pnums[25], df[25], n, i, j, fact, out; long long d; while (cin>>n>>d...
Sun Jul 11, 2004 8:24 am
Forum: Volume 102 (10200-10299)
Topic: 10245 - The Closest Pair Problem
Replies: 92
Views: 10001
Would you please give some hint ?
I use sqrt() only once, but I still got TLE ... Q Q"
Sat Jul 10, 2004 2:41 pm
Forum: Volume 104 (10400-10499)
Topic: 10487 - Closest Sums
Replies: 89
Views: 29586
I tested the data above, my answers were the same as yours. But why I still got WA.. :-? Please help.. I just test all a+b when a!=b [c]#include <stdio.h> #include <limits.h> #include <math.h> int main(void) { int n, list[1000], k, max, ans, cases = 0, i, j, m, ques[25]; while (scanf("%d", &n)==1) {...
Sun Jul 04, 2004 6:57 am
Forum: Volume 5 (500-599)
Topic: 530 - Binomial Showdown
Replies: 137
Views: 32962
Thanks a lot ! ^_^
I got AC.
Sat Jul 03, 2004 12:31 pm
Forum: Volume 5 (500-599)
Topic: 530 - Binomial Showdown
Replies: 137
Views: 32962
i try to use recursion to solve this problem..
but it was "runtime error?!"
could anyone please tell me why ?

here's my code ..

[c] Q_Q i was wrong.. [/c]
Sat Jul 03, 2004 12:30 pm
Forum: Volume 5 (500-599)
Topic: 530 - Binomial Showdown
Replies: 137
Views: 32962
i try to use recursion to solve this problem.. but it was "runtime error?!" could anyone please tell me why ? here's my code .. [c]#include <stdio.h> int c(int n, int r) { if (n==r) return 1; if ((r==1)||(!r)) return n; return (c(n-1,r-1)+c(n-1,r)); } int main(void) { int n, r; while (scanf("%d %d",...
Mon Mar 01, 2004 12:29 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 25431

### Why #195 is WA :~~~

Plz help :~~~ [c]#include <stdio.h> #include <string.h> #include <stdlib.h> #define NN 1000 int len, x; char ans[NN]; struct set { char ch; int fre; }data[NN]; void visit(int n) { int i; if (n<len) { for (i=0;i<x;i++) if (data .fre) { ans[n] = data .ch; data .fre--; visit(n+1); data .fre++; } } else...
Thu Feb 05, 2004 5:25 am
Forum: Volume 105 (10500-10599)
Topic: 10530 - Guessing Game
Replies: 57
Views: 27420
I try all the test datas but my code is still wrong plz help.. [c]#include <stdio.h> int main(void) { int n, ans, high = 10, low = 0; char dir[20]; while (scanf("%d",&n)==1) { if (!n) break; scanf(" %[^\n]", dir); if (!strcmp(dir,"too high")) if (n<high) high = n; if (!strcmp(dir,"too low")) if (n>l...
Tue Feb 03, 2004 6:53 am
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 39749
Input:

Code: Select all

``````13245 4678746
100032 00018678
123 787951
``````
Output:

Code: Select all

``````5992356
10011978
801061
``````
Tue Feb 03, 2004 6:37 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 23883
why it gets wa ? plz.. [c]#include <stdio.h> #include <math.h> int prime[40]; int is_prime(int n) { int i; for (i=0;prime *prime <=n;i++) if (!(n%prime )) return 0; return 1; } void make_table(void) { int i, index = 1; prime[0] = 2; for (i=3;i<=150;i+=2) if (is_prime(i)) prime[index++] = i; } int ma...
Tue Feb 03, 2004 5:07 am
Forum: Volume 2 (200-299)
Topic: 263 - Number Chains
Replies: 45
Views: 7597

### #263 .. plz help :~~~

Why it's output limit exceed :~~~ if n=0, it'll break..>< help me, plz... [c]#include <stdio.h> #include <stdlib.h> int comp(const void *a, const void *b) { return *(int *)a - *(int *)b; } int rev(int n) { int m; for (m=0;n;n/=10) { m*=10; m+=n%10; } return m; } int sort(int n) { int d[10], i, m; fo...
Sun Feb 01, 2004 8:57 am
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 42980

### 623

Sorry, I'm so stupid......||||

0! = 1 ...>"<