Search found 5 matches

by Thanatos
Thu Apr 01, 2004 4:38 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 37296

583 Output limit exceeded ... how?

Hey guys. I don't know why I'm getting OLE from my code. I don't seem to encounter any infinite loops whatsoever... Also what happens if you put in '1' ? Is it just 1 = 1? Help appreciated :) [cpp]#include <stdio.h> #include <math.h> bool *primes; long c=46341; long nextprime(long i) { for (i++;i<=c...
by Thanatos
Thu Mar 11, 2004 10:35 am
Forum: Volume 4 (400-499)
Topic: 489 - Hangman Judge
Replies: 52
Views: 14654

What? They got all lose :o ? Hrm...changed my code but i still get WA. And I'm pretty sure I got correct answers...at least on my compiler...(GCC) [cpp]#include <iostream> #include <string> #include <stdio.h> using namespace std; int search(const char &a,const string &s) { for (int i=0;i<s.length();...
by Thanatos
Wed Mar 10, 2004 2:58 pm
Forum: Volume 4 (400-499)
Topic: 489 - Hangman Judge
Replies: 52
Views: 14654

Actually guys, nvm I found my problem. But now i get WA?

Can somebody explain please?

I tried inputs some Dominic guy gave me and they worked...

1
aaa
bcdbcdbcdbcdefgjt

gave me 'chickened out'

1
aaa
bcdbcdbcdbcdawer
gave me 'win'

1
aaa
bcdbcdbcdbcdqwertypl
gave me 'lost'
by Thanatos
Wed Mar 10, 2004 2:39 pm
Forum: Volume 4 (400-499)
Topic: 489 - Hangman Judge
Replies: 52
Views: 14654

489 Compile Error??!

[cpp]#include <iostream> #include <string> using namespace std; int search(const char &a,const string &s) { for (int i=0;i<s.length();i++) if (s ==a) return i; return -1; } inline int process(const string &s) { string temp; temp+=s[0]; for (int i=1;i<s.length();i++) if (s[i-1]!=s && search(s ,temp)=...
by Thanatos
Tue Mar 09, 2004 11:22 am
Forum: Volume 104 (10400-10499)
Topic: 10450 - World Cup Noise
Replies: 42
Views: 20092

10450 WA - why?

Hey guys, I did the World Cup problem and did figure out why the answer was a Fibonacci number. So i coded this... [cpp] #include <iostream> #include <math.h> using namespace std; long long fibo(int x) { return (long long)((pow((1+sqrt(5.))/2,x)-pow((1-sqrt(5.))/2,x))/sqrt(5.)); } int main() { int x...

Go to advanced search