Search found 11 matches

by kate
Mon Jul 21, 2003 4:49 am
Forum: Volume 7 (700-799)
Topic: 706 - LCD Display
Replies: 221
Views: 35118

706 WA

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,}, /...
by kate
Mon Jul 07, 2003 3:27 am
Forum: Volume 7 (700-799)
Topic: 732 - Anagrams by Stack
Replies: 17
Views: 11569

I fixed the problem. AC.
by kate
Mon Jul 07, 2003 1:08 am
Forum: Volume 7 (700-799)
Topic: 732 - Anagrams by Stack
Replies: 17
Views: 11569

Okay I changed it once again using a recursive function. It runs much faster, fast enough I believe but I get a "Runtime Error (SIGSEGV)" for some reason I can't think of.... #include <iostream> #include <vector> #include <string> using namespace std; void print(vector<char> & sequence) { for(int i=...
by kate
Sun Jul 06, 2003 7:30 am
Forum: Volume 7 (700-799)
Topic: 732 - Anagrams by Stack
Replies: 17
Views: 11569

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 th...
by kate
Mon Jun 30, 2003 3:18 pm
Forum: Volume 7 (700-799)
Topic: 732 - Anagrams by Stack
Replies: 17
Views: 11569

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 s...
by kate
Wed May 28, 2003 9:45 pm
Forum: Volume 100 (10000-10099)
Topic: 10042 - Smith Numbers
Replies: 75
Views: 23091

There won't be negative numbers inputted would there? I thought Smith numbers were only positive. So why would that matter?
by kate
Sun May 25, 2003 11:38 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30883

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, freq; int ...
by kate
Sun May 25, 2003 8:58 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20525

I just realized my solutions for "# 1" are incorrect.
by kate
Sun May 25, 2003 8:44 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 20525

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; while ((i!...
by kate
Sun May 25, 2003 8:03 am
Forum: Volume 2 (200-299)
Topic: 267 - Of(f) Course!
Replies: 16
Views: 2381

Hmmm, that would explain it but it still seems strange. If a plane was travelling "south" and the wind direction was "north", I would think the wind was moving in the opposite direction of the plane. :-? Oh well.
by kate
Thu May 22, 2003 9:46 pm
Forum: Volume 2 (200-299)
Topic: 267 - Of(f) Course!
Replies: 16
Views: 2381

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 a...

Go to advanced search