The first contest of the 2024-2025 USACO season will run from December 13th to December 16th. Good luck to everyone! Please wait until the contest is over for everyone before discussing anything contest-related (including but not limited to your scores or anything about the problems).
There are some new rules regarding the gold division of USACO, please refer to the website regarding the updates, especially if you are trying to promote into platinum.
For those unfamiliar with the USACO contest format, please refer to the contest instructions and rules. We provide a short FAQ but folks should read all the rules carefully.
I have a question about the contest. Where do I ask it?
Email the contest director via the instructions above. Do not post anything publicly about the questions (including but not limited to your scores, how you felt about the problems, any content of the problems, etc) until after the contest is over for everyone. Do not DM me or anyone else affiliated with USACO, only the contest director can assist you. The contest director does not monitor Codeforces, this blog post is merely a courtesy to inform other people of the contest.
When can I enter the contest?
For bronze and silver, the contest will open on December 13th. For gold and platinum, the contest opens at 12pm ET on Saturday, and you must start the contest between 12pm and 12:15pm ET on Saturday to get a certified score.
If I submit multiple programs, which one gets evaluated?
Only the last submission will be evaluated for official scoring purposes.
Can I use prewritten code / templates?
No.
Can I use AI tools during the contest including but not limited to ChatGPT and Copilot?
No.
Am I allowed to use outside resources during the contest?
You may only refer to language documentation.
Can I solve problems in Rust?
No, the only languages supported are C, C++, Java, and Python. Consult the instructions for language-specific technical details.
Will Rust support be added?
Probably not. Petition IOI to add Rust support first.
LGM when?
Are prewritten macros allowed?
_"Can I use prewritten code / templates?
No."_
it's clearly mentioned
phlap will ak gold in 15 minutes and take plat! Also, gggg0 and nyctivoe will ak platinum!
phlap will ak gold in 15 minutes and take plat! Also, gggg0 and nyctivoe will ak platinum!
ugh i failed usaco dirt. the first problem, "even cows", was about finding if $$$N$$$ was even and the limits were $$$1 \leq N \leq 10^9$$$ and it was so hard. my first idea was to store an array of all even numbers in the world but it said memory limit exceeded for some unknown reason. then i realized exactly what the problem was. i was using to much memory!! so i reduced the array size to $$$10^5$$$, and it passed the sample test case :). but for the rest of the test cases, it had an exclamation mark for some reason. i must have not added enough for loops and recursion. so then i added infinite recursion and resubmitted, and was sooo disappointed when it time limit exceeded on the first test case :(. but at least the code ran, unlike when it was just a big fat exclamation mark, so it was an improvement i guess. but right as i was about to submit again, the 4 hr time limit passed, and i ran out of time. does anyone know how to solve this problem??
Man, you were so close! The ideia was to add random elements from the even array, so then the memory would be small. Here is my code, it passed after 1048576 submissions.
https://pastebin.com/U3yUCLRU
your code only have $$$\frac{\binom{499999999}{99999}}{\binom{500000000}{100000}} = \frac{1}{5000}$$$ probably to be correct, for 25 test cases, the probably to be pass will be around 3.3554432e-93, man your luck is hard core
Its not a problem for everyone...
alright guys, I just want to share my deterministic solution, with 11*10+3 submission in worst case. firstly, we found N <= 1e9, but the digit of N <= 10, that's nice, so, we can read the N as string, and submit something that, if s[1] == sth(like '0'~'9', or 0 that the N's length may differ), and if so, do a infinite malloc so that you are surely getting MLE verdict, to differ this from others.
now, we get the input testcases. now, we output YES or NO, for output testcases. then we got all of these, then the code will be like: switch(n) {case 12831728: case 2347238: puts("YES"); break; default: puts("NO");}
I hope this will work.
impossible you are
123gjweq2
Does stack overflow count as language documentation or is that not allowed too
nope, stack overflow isn't documentation. documentation is stuff like cppreference.com or the official Python docs
Can we use IntelliSense based IDEs? I couldn't find any information regarding this in the rules.
praying for weak testcases :), it's like one of the best additions to usaco
good luck everyone!
If I don't mind my score being not certified, can I start the Platinum contest not on Saturday?
Yes, you can.
#
does this mean i can never be Plat as I live in +8 time zone and needs to sleep early?
may I ask what actually is this "12:00 ET" in +8 time? I searched it but no answer(I don't need to sleep early bruh)
It would be 1 a.m. here. So if I want to take the contest and try to promote to Plat (I'm gold now), I probably need to stay up to 6 a.m.
I think it's a big problem for many Chinese and people in the whole Asia Pacific region.
Note that you don't need a certified score to promote — the certification system is mostly to ensure contest integrity for participants eligible for the US IOI team. You can take the contest whenever you want.
Edit: Nvm, I'm blind, the usaco website explicitly says "In order to promote from gold to platinum, your score must be certified."
"In order to promote from gold to platinum, your score must be certified." — you can find this on the official usaco website
it doesn't apply for promotion from bronze to silver or silver to gold.
yeah, realized it a minute after posting 😭
I guess I won't promote either ://
or... you could come to the us for a 1 day vacation :)
....
So sad,had you participated in the contest and advanced to Plat successfully?
xiaowuc1 I am having a problem while recovering my old account and creating new account,I am not receiving the confirmation emails.
What should I do now??
Did USACO contest start as of now for bronze?
and for Silver as well
I guess we can start discussing problems.
How I solved ItsMooinTime in Platinum.
You aren't allowed to use pre-written code or templates (or any online resource other than a reference for your language). Read the "Contest Conduct and Academic Integrity" section here: https://usaco.org/index.php?page=instructions
How to solve the 3rd problem in the Platinum division? I got the $$$p_0 = \frac{n}{2}$$$ subtask, but I couldn't extend it.
I didn’t type code this contest, but here’s an outline of a P3 idea. I think it works, but I’m hoping intended is easier to code?
If you wrote a brute force you probably had that when N is even there are two permutations, and the hard case is when N is odd. I had ugly casework on the position of N/2 (first, last, even in the middle, odd in the middle). N/2 has to be adjacent to 0 and/or N. Placing N/2 and 0 and/or N adjacent to it tells us which cells must have low numbers <N/2 and which must have high numbers >N/2. From there, for each case there's a way to place pairs in a certain order such that we have exactly two choices for each pair.
For example, if N/2 appears first and the second number is 0 (the case where the second number is N is symmetric), we know N/2 + 1 can only be adjacent to 0 and 1, so it must either be in the third position or the last, with 1 adjacent to it. But then N/2 + 2 can only be adjacent to 0, 1, and 2, so we have to pick 0 or 1 to put it next to and then place 2 adjacent to it. And we can keep going until we've placed all the numbers.
From here, for each case, each constraint implies two options of the form "once we place the i'th pair, it must be the x'th pair we placed on the left and there must be y pairs on the right", and we can compute the number of ways to satisfy all constraints using an O(N) dp (taking care to avoid inserting a log by sorting). This gives an O(N^2) sol.
The annoying part is translating the constraints on the input into constraints on the way we place the pairs into the arrangement--this looks substantially different for all four cases and while it works, it seems painful to implement.
I think the case where $$$0$$$ follows $$$n/2$$$ and $$$n-1$$$ follows $$$n/2$$$ are symmetric, so we can turn every number from $$$x$$$ to $$$n-x-1$$$ to avoid half of the cases.
Though it's still really hard to implement because if only one number is fixed in a pair, then there will be two cases and the dp has to take care of four kinds of transitions, which is really annoying. I spent 3 hours implementing this and finally managed to get is passed in the last few minutes.
I feel like there should be some more elegant solution, because the way to fill in the pairs is literally "choose the leftmost or rightmost position" every time. Can anyone provide some easier solution?
Agree re: symmetry. I also think that n/2 in the first position and n/2 in the last position should be symmetric via reversing the array of constraints. I don't see an easy way to do fewer than three cases, though (n/2 at beginning/end, odd position, even position other than beginning/end).
$$$n/2$$$ at beginning or end is the same as the case of even position. When $$$n/2$$$ is at the beginning for example, the number of ways to fill in the rest is as if we had a virtual pair of $$$-1$$$ and $$$n/2-1$$$ and put it at the left of $$$n/2$$$.
How to solve the first problem in platinum? (Actually I couldn't solve anything but people already asked the other two) I managed to pass subtasks up to $$$k\leq 18$$$ with some inefficient $$$O(k^32^k)$$$ SOS DP
Can you teach me? I just know the $$$O(3^k)$$$ solution.
Pretty much what Geothermal said but I didn't manage to find a way to count the PIE constants so I ran an SOS for every number of set bits lol
I didn’t type code for this contest, but I think something like this should work?
this is exactly my solution which got AC
Thanks a lot for the sol!! Think I got the general idea now
Well, this is funny, I also only got up to k<=18 but mine is $$$O(k^22^k)$$$ XD
I went from $$$k \leq 19$$$ to ac by adding pragmas.
That's unlucky :( I did add pragmas and did some constant optimisation
Solutions for USACO Bronze-Gold
Videos for USACO Bronze-Gold
Bronze: Problem 1, Problem 2, Problem 3
Silver: Problem 1, Problem 2, Problem 3
Gold: Problem 1, Problem 2, Problem 3
Bronze P1, Silver P2 and P3 as well as Gold P2 were quite nice
As a silver participant, I would like to say Silver P1 was nice, due to how easy it was :)
where can i upsolve ?
Plat P1
Plat P2