I started solving acm problems 3 months ago, not for contest, just for fun with my friends though; and I solved about 40 of them.
But I still have some thoughts that my solutions are not always good, I searched a lots to find other solutions, codes for my problem but I have no luck so far.
Where do ...
Search found 9 matches
- Mon Nov 22, 2004 8:05 pm
- Forum: Off topic (General chit-chat)
- Topic: Source code for reference?
- Replies: 3
- Views: 2516
- Tue Nov 16, 2004 7:07 am
- Forum: Volume 1 (100-199)
- Topic: 177 - Paper Folding
- Replies: 28
- Views: 11122
- Fri Oct 29, 2004 9:51 pm
- Forum: Volume 3 (300-399)
- Topic: 350 - Pseudo-Random Numbers
- Replies: 56
- Views: 23291
- Thu Oct 28, 2004 3:53 am
- Forum: Volume 3 (300-399)
- Topic: 350 - Pseudo-Random Numbers
- Replies: 56
- Views: 23291
Any suggestion for improvement?
here is my code, any suggestion for improvement is appreciated:
#include <iostream>
#include <stdlib.h>
#include <vector>
using namespace std;
bool Search( vector<int> numProduced, int num);
int main ()
{
int Z,L,I,M;
int caseNum=1;
vector<int> numProduced;
cin>>Z>>I>>M>>L;
while(!(Z ...
#include <iostream>
#include <stdlib.h>
#include <vector>
using namespace std;
bool Search( vector<int> numProduced, int num);
int main ()
{
int Z,L,I,M;
int caseNum=1;
vector<int> numProduced;
cin>>Z>>I>>M>>L;
while(!(Z ...
- Thu Oct 28, 2004 2:32 am
- Forum: Volume 3 (300-399)
- Topic: 350 - Pseudo-Random Numbers
- Replies: 56
- Views: 23291
- Thu Oct 28, 2004 1:05 am
- Forum: Volume 3 (300-399)
- Topic: 350 - Pseudo-Random Numbers
- Replies: 56
- Views: 23291
- Wed Oct 27, 2004 5:42 am
- Forum: Volume 3 (300-399)
- Topic: 350 - Pseudo-Random Numbers
- Replies: 56
- Views: 23291
350 wrong answer-strange!
My first program for #350 assumed that cycle begins with the seed, and it was accepted!
Then I modified it, add in the check funtion, and tested it successfuly on my comp. But i always get the "Wrong answer" when i submit it, please anyone can have a look at my code and tell me wher i did it wrong ...
Then I modified it, add in the check funtion, and tested it successfuly on my comp. But i always get the "Wrong answer" when i submit it, please anyone can have a look at my code and tell me wher i did it wrong ...
- Wed Oct 27, 2004 2:24 am
- Forum: Volume 5 (500-599)
- Topic: 576 - Haiku Review
- Replies: 50
- Views: 22438
- Tue Oct 26, 2004 6:59 am
- Forum: Volume 5 (500-599)
- Topic: 576 - Haiku Review
- Replies: 50
- Views: 22438
I'm confused!
Everything is okie on my VC++, but I get the compile error everytime i submit the code:
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
char line[200];
int numSyl[]={5,7,5}; //array of correct number of syllables (5/7/5)
cin.getline(line,'/n');
while (strcmpi(line,"e/o/i ...
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
char line[200];
int numSyl[]={5,7,5}; //array of correct number of syllables (5/7/5)
cin.getline(line,'/n');
while (strcmpi(line,"e/o/i ...