Not sure what's causing it.
#include <iostream>
#include <vector>
#include <string>
using namespace std;
const int show[10][7] =
{
/*0*/ {1,1,1,1,1,1,0,},
/*1*/ {0,1,1,0,0,0,0,},
/*2*/ {1,1,0,1,1,0,1,},
/*3*/ {1,1,1,1,0,0,1,},
/*4*/ {0,1,1,0,0,1,1,},
/*5*/ {1,0,1,1,0,1,1,},
/*6*/ {1,0,1,1,1,1,1 ...
Search found 11 matches
- Mon Jul 21, 2003 4:49 am
- Forum: Volume 7 (700-799)
- Topic: 706 - LCD Display
- Replies: 221
- Views: 65129
- Mon Jul 07, 2003 3:27 am
- Forum: Volume 7 (700-799)
- Topic: 732 - Anagrams by Stack
- Replies: 17
- Views: 16307
- Mon Jul 07, 2003 1:08 am
- Forum: Volume 7 (700-799)
- Topic: 732 - Anagrams by Stack
- Replies: 17
- Views: 16307
- Sun Jul 06, 2003 7:30 am
- Forum: Volume 7 (700-799)
- Topic: 732 - Anagrams by Stack
- Replies: 17
- Views: 16307
I made a few alterations an it is faster but I still get Time Limit Exceeded.
If the lengths of the original and objective word is different it prints nothing, if the words do not contain the same letters it terminates, otherwise it goes through all the combinations of valid pushes and pops until ...
If the lengths of the original and objective word is different it prints nothing, if the words do not contain the same letters it terminates, otherwise it goes through all the combinations of valid pushes and pops until ...
- Mon Jun 30, 2003 3:18 pm
- Forum: Volume 7 (700-799)
- Topic: 732 - Anagrams by Stack
- Replies: 17
- Views: 16307
732 - Anagrams by Stack
I start from "i i ......i" 2n n times where n is the length of the word and increase it one by one, i.e. "i i i i i i i" "i i i i i i o" "i i i i i o i" "i i i i i o o" to check to see if they are valid. Is there a faster way?
#include <iostream>
#include <vector>
#include <string>
using namespace ...
#include <iostream>
#include <vector>
#include <string>
using namespace ...
- Wed May 28, 2003 9:45 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10042 - Smith Numbers
- Replies: 75
- Views: 33534
- Sun May 25, 2003 11:38 pm
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 64400
488 WA , no idea
I'm getting a wrong answer and I have no idea why. I know it's multiple output and my answers look fine when I try them. Any ideas?
#include <iostream>
using namespace std;
void line(int number)
{
int times = 0;
do {
cout << number;
times++;
} while (times<number);
}
int main()
{
int amp ...
#include <iostream>
using namespace std;
void line(int number)
{
int times = 0;
do {
cout << number;
times++;
} while (times<number);
}
int main()
{
int amp ...
- Sun May 25, 2003 8:58 am
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 54957
- Sun May 25, 2003 8:44 am
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 54957
107 WA, I've tried it all
I've tried all the sample tests I could find and every one of them produce the correct answer but I'm still getting a WA. Any suggestions? Here is my code:
#include <iostream>
#include <cmath>
using namespace std;
void main()
{
int i, w, n, h, hc;
int height = 1, workers=1;
cin >> i >> w ...
#include <iostream>
#include <cmath>
using namespace std;
void main()
{
int i, w, n, h, hc;
int height = 1, workers=1;
cin >> i >> w ...
- Sun May 25, 2003 8:03 am
- Forum: Volume 2 (200-299)
- Topic: 267 - Of(f) Course!
- Replies: 16
- Views: 4436
- Thu May 22, 2003 9:46 pm
- Forum: Volume 2 (200-299)
- Topic: 267 - Of(f) Course!
- Replies: 16
- Views: 4436
267
I solved this problem and it was accepted except I had to make it output what I think is the wrong answer.
WIND SPEED 15.00
WIND DIRECTION 290.00
DESIRED COURSE 260.00
TRUE AIRSPEED 100.00
AIRCRAFT HEADING 264.30
GROUND SPEED 86.73
Looking at that example, it says the wind is moving at 290 degrees ...
WIND SPEED 15.00
WIND DIRECTION 290.00
DESIRED COURSE 260.00
TRUE AIRSPEED 100.00
AIRCRAFT HEADING 264.30
GROUND SPEED 86.73
Looking at that example, it says the wind is moving at 290 degrees ...