Search found 10 matches

by f.eliel
Mon Sep 04, 2006 3:34 pm
Forum: Volume 7 (700-799)
Topic: 793 - Network Connections
Replies: 102
Views: 32286

793 - WA

My code worked fine for every test case i found here, but i still get WA. Can someone help me? Here is my code: #include <stdio.h> #define max 1000 int m[max][max], d[max]; int fila[max], inicio, fim; int suc, unsuc; void adiciona(int a, int b) { int i; for (i = 1; i <= m[a][0]; i++) if (m[a][i] == ...
by f.eliel
Fri Aug 11, 2006 8:56 pm
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 39201

I got WA too, i think its becouse of the '\r' '\n'... but i dont know what to do abaut it. Here is my code. #include <stdio.h> struct freq { int code, tem; } f[1010]; int compara(const *x, const *y) { struct freq *n = (struct freq *)x; struct freq *m = (struct freq *)y; if (n->tem == m->tem) return ...
by f.eliel
Thu Aug 10, 2006 7:57 am
Forum: Volume 110 (11000-11099)
Topic: 11056 - Formula 1
Replies: 34
Views: 16807

case insensitive

how do i make the comparison case insensitive?
i'm using strcmp now, and i saw strcasecmp in some guy's code, but it didn't work. Can you help me?
by f.eliel
Fri Mar 24, 2006 9:09 pm
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 26754

160 - Help!

I have 3 problems with my code: When i test with the sample input 53, it doesn't work (it seems that unsigned long int isn't big enough, but i don't know how to fix it). When i test whit 7 or more numbers it doesn't work and i don't know why. And i don't know how to jump to the next line when the ou...
by f.eliel
Tue Feb 28, 2006 2:54 pm
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 29616

I don
by f.eliel
Mon Feb 27, 2006 5:12 pm
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 29616

105 WA

I don't understand why i got WA...
by f.eliel
Fri Feb 17, 2006 5:27 am
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 29616

I realized tha i was not doing anything wrong, i just didn't the problem...
But now i having trouble in the output. I don't know how to get the space after the last zero of...
by f.eliel
Fri Feb 17, 2006 2:33 am
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 29616

105... Help!

I know these way to read the multiple inputs:

Code: Select all

while (scanf("%d %d %d", &li, &hi, &ri)==3) {
But i don't know how to make it stop reading.
I looked at a lot of topics but i couldn't find it.
Can anyone help me?
Thanks.
by f.eliel
Wed Feb 08, 2006 5:20 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 193264

ahhh
finally...

thanx man...
by f.eliel
Wed Feb 08, 2006 4:43 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 193264

I'm getting WA and i can't find the problem. It works just fine when i test it. #include <stdio.h> int main(void) { long x, a, b, n; int m, w, c; while(scanf("%ld %ld", &a, &b) == 2){ if (a < b) w = 1; else w = -1; m = 0; x = a; while (x != b){ n = x; c = 1; while (n > 1){ if (n%2) n = n*3 + 1; else...

Go to advanced search