Search found 5 matches

by oscartheroot
Tue Nov 11, 2008 10:14 am
Forum: Volume 101 (10100-10199)
Topic: 10131 - Is Bigger Smarter?
Replies: 93
Views: 88949

Re: 10131 - Is Bigger Smarter?

1. my program has no difficulty to end, I mean, it's not necessary to put the return 0 ; is it? Well, I'll put it.
2. I obviously take away system ("pause"); before sending it to the judge :D
3. Where does it output extra things? I don't see it.... :-?
6. But it should find a valid solution anyway ...
by oscartheroot
Mon Nov 10, 2008 10:29 pm
Forum: Volume 101 (10100-10199)
Topic: 10131 - Is Bigger Smarter?
Replies: 93
Views: 88949

Re: 10131 - Is Bigger Smarter?

I also get wrong answer, and have no idea of where's the error...



#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int troba (vector <long long> res, long long n){
for (int i=0; i<res.size(); i++) if (res[i]==n) return i;
return -44;
}

int main(){
vector ...
by oscartheroot
Mon Nov 10, 2008 1:28 pm
Forum: Volume 3 (300-399)
Topic: 384 - Slurpys
Replies: 8
Views: 3027

Re: 384 WA !

I just found the error:
i counted AHEFGG as a slurpy, when I souldn't, only AHEFG is a slurpy. I mean, I didn't count if there was more than one G at the end.

Thanks, I got accepted :)
by oscartheroot
Sat Nov 08, 2008 11:54 pm
Forum: Volume 4 (400-499)
Topic: 481 - What Goes Up
Replies: 82
Views: 27912

481 Runtime Error!!

I don't understand what's wrong in my code, I haven't found any test case in which the program gives runtime error, I mean, it works for all the cases I've tested!!

Here's my code:

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
long long n;
vector ...
by oscartheroot
Sat Oct 11, 2008 1:06 pm
Forum: Volume 3 (300-399)
Topic: 384 - Slurpys
Replies: 8
Views: 3027

384 WA !

I don't understand why am I getting worng answer, I can't find any error.
I find recursively through the string: a slimp must always finish by a 'C' or an 'H', so I divise it in two substrings: slimp, and slump; and then check these two parts. I think it's a simple method for a simple problem...but ...

Go to advanced search