Search found 11 matches

by Cruzer
Sat Feb 26, 2005 7:37 pm
Forum: Volume 104 (10400-10499)
Topic: 10443 - Rock
Replies: 26
Views: 8335

You aren't taking into account sides and corners of the grid. You are accessing outside the array dimensions. For example, if there is a rock in the top left corner, you check up to see if there are scissors, you also check left...
by Cruzer
Sat Feb 26, 2005 12:25 am
Forum: Volume 104 (10400-10499)
Topic: 10400 - Game Show Math
Replies: 32
Views: 23188

10400 TLE with backtracking

I'm using backtracking to solve this problem and still I get TLE. For most inputs I've tried it finishes instantly, but some inputs take over a minute. I prune the search as suggested in the problem (stop at outer limits of -32000 and 32000, stop when division results in non-integer). I even keep ...
by Cruzer
Thu Feb 24, 2005 6:18 am
Forum: Off topic (General chit-chat)
Topic: What is your typing speed...
Replies: 5
Views: 3208

I got 80wpm then 84 wpm. :)
by Cruzer
Sat Feb 19, 2005 10:14 pm
Forum: Volume 4 (400-499)
Topic: 462 - Bridge Hand Evaluator
Replies: 32
Views: 16191

462 weird WA

This one seems so easy, and yet I have WA for some reason. I've checked it over so many times and can't find the problem. Here is my code (sorry it's so long, but it should be straight-forward):


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

main() {
char hand[13][4]; /* 13 cards ...
by Cruzer
Sat Feb 19, 2005 2:48 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 108633

Thanks I found the problem. Apparently fflush() doesn't work on the judge or in Unix or something. Fixed now.
by Cruzer
Fri Feb 18, 2005 9:10 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 108633

This input works.. it produces the following:
0: 0
1: 1 2
2:
3:
4:
5: 5 4 6
6:
7:
8: 8 7 9 3
9:
10: 10 11 12
11:
12:
13: 13
14: 14 17
15: 15
16: 16
17:
18: 18

This is correct is it not?
by Cruzer
Wed Feb 16, 2005 4:00 am
Forum: Other words
Topic: A couple questions from a newcomer
Replies: 2
Views: 1455

A couple questions from a newcomer

Hi I'm fairly new to this scene as I'm trying to get a team together from my University (Wilfrid Laurier in waterloo, ontario). I have been trying to solve problems from this site for about two weeks now, but seem to have some major problems.
My first question is about input and output in the ...
by Cruzer
Sun Feb 13, 2005 9:36 pm
Forum: Volume 4 (400-499)
Topic: 484 - The Department of Redundancy Department
Replies: 103
Views: 20371

Thanks, that worked.
by Cruzer
Sun Feb 13, 2005 5:05 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 108633

101 RE, please help

I've tested many different inputs(including the ones in the other posts on thsi board) and can't find the problem. I've double checked all my loops and they seem to be fine. This error is really stumping me. Here is my code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX ...
by Cruzer
Sat Feb 12, 2005 11:27 pm
Forum: Volume 3 (300-399)
Topic: 355 - The Bases Are Loaded
Replies: 74
Views: 30590

355 OLE

My code works perfectly on my machine for all input that I've tested (big, small, different bases, negatives, zero). I use Dev-C++ so I use __int64 and %I64d on my computer and then before I submit I change to long long int and %lld. If I don't make this change, the OJ gives me compile error. But ...
by Cruzer
Sat Feb 12, 2005 2:33 am
Forum: Volume 4 (400-499)
Topic: 484 - The Department of Redundancy Department
Replies: 103
Views: 20371

484 TLE and MLE problems

I created one solution to this problem that generates TLE, so I worked out another solution, but that one generates MLE. I can't find any way to do this within the time and memory limits.
My first solution uses 2 arrays, the first to store all unique integers in the input order, the other to store ...

Go to advanced search