Search found 30 matches

by KvaLe
Tue May 10, 2005 9:19 pm
Forum: C++
Topic: Which is the best c++ IDE program?
Replies: 3
Views: 2206

Which is the best c++ IDE program?

I have Dev-C++ 4.9.9.0 but debuger isn't working.
Please prefare me the best c++ IDE program.
by KvaLe
Tue May 10, 2005 9:14 pm
Forum: Other words
Topic: AVATAR.
Replies: 3
Views: 963

AVATAR.

When I'm submiting my new avatar server gives me such error: Warning: copy(./images/avatars/33129606542810756a296b.jpg): failed to open stream: Permission denied in /var/www/htdocs/board/includes/usercp_avatar.php on line 239 Warning: Cannot modify header information - headers already sent by (outpu...
by KvaLe
Tue May 10, 2005 8:25 pm
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 21752

P147 - Why WA?

I'm solving it with DP. In my PC N = 120.00 my code gives negative number, but I don't know why. Here is my code: #include <stdio.h> #include <stdlib.h> #include <string.h> int main (void) { long long I, J, N, A [6001], C [] = {1, 2, 4, 10, 20, 40, 100, 200, 400, 1000, 4000}; double M; N = 6000; mem...
by KvaLe
Mon May 09, 2005 6:25 pm
Forum: Volume 100 (10000-10099)
Topic: 10020 - Minimal coverage
Replies: 57
Views: 20708

10020

I use greed algorithm. Here is my code: #include <stdio.h> #include <stdlib.h> #define MaxN 100000 void Swap (long *A, long *B) { long C = *A; *A = *B; *B = C; } int main (void) { long I, J, T, M, N, K, OK, Sol, L [MaxN], R [MaxN], X [MaxN], Y [MaxN]; scanf ("%d", &T); for (; T > 0; T--) { scanf ("%...
by KvaLe
Sun May 08, 2005 9:42 pm
Forum: Other words
Topic: Bigest type?
Replies: 4
Views: 1212

THX.

THX.
by KvaLe
Thu May 05, 2005 9:28 pm
Forum: Other words
Topic: Bigest type?
Replies: 4
Views: 1212

Bigest type?

Which type is the bigest in C++ (long long, ...)?
I need it in some problems, when I send code with "long long" sometimes it got WA and when I changed it it got AC.

PLZ post here.
by KvaLe
Thu May 05, 2005 4:44 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 28889

Why WA??

Hi. Here is my code, it gets WA. #include <stdio.h> #include <stdlib.h> int main (void) { long long I, K, N, L, H, S, V, TMP; while (scanf ("%d%d", &L, &H) != EOF) { if (! L && ! H) break; if (L > H) TMP = L, L = H, H = TMP; for (I = L; I <= H; I++) { N = I, K = 0; do { if (N%2 == 0) N /= 2; else N ...
by KvaLe
Thu May 05, 2005 11:11 am
Forum: Volume 3 (300-399)
Topic: 332 - Rational Numbers from Repeating Fractions
Replies: 83
Views: 20326

Why WA on P332

My solution gets WA on P332. Here is code: #include <stdio.h> #include <stdlib.h> #include <string.h> long long GCD (long long A, long long B) { if (A == 0) return B; return GCD (B%A, A); } int main (void) { long long N = 0, A, B, J, K, P [10]; double X, Y; char S [15]; P [0] = 1; for (J = 1; J < 10...
by KvaLe
Wed May 04, 2005 4:59 pm
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 18846

I solved it and it didn't got TL.
by KvaLe
Tue May 03, 2005 8:27 pm
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 18846

To solve this problem use DP.
I solved it with this algor.:
Let first K ugly number is U [1] ... U [K].
For all I (1..K) M = Min3 (2*U , 3*U , 5*U )
and U [K+1] = Min (M (I = 1..K)).

GL :wink:.
by KvaLe
Mon May 02, 2005 6:14 pm
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 18846

Post here what this function is doing :wink:.
by KvaLe
Mon May 02, 2005 6:00 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 50398

I don't know what mistake is in your code, but I prefare U to solve this problem with recursion. I wrote it and it's length isn't more then 30 lines.
by KvaLe
Mon May 02, 2005 4:50 pm
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 36620

P116 - Why it gets WA?

Hi. My solution gets WA on P116, but I don't know why. If anyone has input in wich it gets WA, please post. Here is my code: #include <stdio.h> #include <stdlib.h> long I, J, M, N, B [100][100], C [100][100][100]; unsigned long Sol, A [100][100]; bool Check (int K, int X, int L, int Y, int N) { int ...
by KvaLe
Mon May 02, 2005 8:23 am
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 18846

I accepted it. I thought that I must print all ugly numbers with index from 1 to 1500 :) .
by KvaLe
Mon May 02, 2005 8:09 am
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 18846

P136 WA. Why??

Hi. My solution on P136 gets WA. Can anyone help me? Here is my solution: #include <stdio.h> #include <stdlib.h> double K, A [1600]; double Min (double A, double B) { return A < B ? A : B; } int main (void) { /* freopen ("output.txt", "w", stdout); */ long I, J; double M; A [0] = 1; printf ("The 150...

Go to advanced search