Search found 6 matches

by h_s_potter2002
Wed Dec 22, 2004 4:40 am
Forum: Algorithms
Topic: USACO help again
Replies: 5
Views: 1927

Everything is okay now, I figured out how to solve the problem.
by h_s_potter2002
Tue Dec 21, 2004 10:58 pm
Forum: Algorithms
Topic: USACO help again
Replies: 5
Views: 1927

I found out what was wrong, which I have bolded in the new code. #include <stdio.h> #include <math.h> FILE *input, *output; long long numbits, numones, ith, count, total; long long wrong[2], fact[33], string[33]; long long fac(long long num, long long start) { long long i, f=1; if(fact[num] > 0 && s...
by h_s_potter2002
Tue Dec 21, 2004 5:04 am
Forum: Algorithms
Topic: USACO help again
Replies: 5
Views: 1927

Here's the forumla I've always been taught, where L goes from 1 to L -

N!/(L!*(N-1)!)

which is what I'm using, and I think is the same thing as binomial coefficiants, I'm sure since I'm not that good at math. I'm just implementing this forumla a little differently.
by h_s_potter2002
Mon Dec 20, 2004 7:43 pm
Forum: Algorithms
Topic: USACO help again
Replies: 5
Views: 1927

USACO help again

I'm on problem kimbits, Consider an ordered set S of strings of N (1 <= N <= 31) bits. Bits, of course, are either 0 or 1. This set of strings is interesting because it is ordered and contains all possible strings of length N that have L (1 <= L <= N) or fewer bits that are `1'. Your task is to read...
by h_s_potter2002
Sun Nov 28, 2004 6:51 pm
Forum: Java
Topic: [ Java ] Useful methods to save time.
Replies: 12
Views: 10819

Can someone show me some java code for reading the input file below using the OP's java methods? I don't exactly understand how I would use it. 2 7 3 5 It doesn't matter whether the numbers go into an array, or anything, I just want to see them being read as ints. And btw, this is for a USACO program.
by h_s_potter2002
Fri Nov 12, 2004 2:38 am
Forum: Algorithms
Topic: USACO help
Replies: 7
Views: 3966

USACO help

I need help with one of the test cases with the problem inflate. Here's the problem description if anyone needs it: Score Inflation The more points students score in our contests, the happier we here at the USACO are. We try to design our contests so that people can score as many points as possible,...

Go to advanced search