USACO 2015 February · Platinum · did not exist yet

← Full February 2015 set · Official results (Feb 2015) · First-ever Platinum (Dec 2015)

Heads-up. The Platinum division did not exist in February 2015. USACO ran three divisions (Bronze, Silver, Gold) through the 2014–15 season. Platinum was introduced in the following season's opening round, December 2015. There are therefore no official Platinum problems to write up for this contest.

What the top division looked like in February 2015

The hardest problems this round live on the Gold page:

If you're treating this round as Platinum-difficulty training, focus on Fencing the Herd — it's the one that demands a full divide-and-conquer offline pipeline and 64- or 128-bit arithmetic care, very much in the spirit of later Platinum P2/P3 problems.

Where to find a real Platinum round

Why this matters historically

The Gold-as-top-tier era (pre-2015-16) means a few things when you study old contests:

Reference C++ (unused — placeholder for page parity)

Every other Platinum page in this set carries reference C++; for parity, here's a one-screen template that solves the Gold "Fencing the Herd" problem at modern-Platinum care levels — treating overflow with __int128 and writing the hull queries cleanly. Treat it as a starting point to port Fencing the Herd into a "Platinum-grade" submission.

#include <bits/stdc++.h>
using namespace std;
using ll  = long long;
using i128 = __int128;

// 128-bit dot product to avoid overflow when |A|,|B|,|x|,|y| ≈ 1e9 and we add many.
static inline i128 dot(ll A, ll B, ll x, ll y) { return (i128)A * x + (i128)B * y; }

struct P { ll x, y; };
static ll cross(P O, P A, P B) {
    return (A.x - O.x) * (B.y - O.y) - (A.y - O.y) * (B.x - O.x);
}
static vector<P> buildHull(vector<P> pts, int sign) {
    sort(pts.begin(), pts.end(), [](const P& a, const P& b){
        return a.x < b.x || (a.x == b.x && a.y < b.y);
    });
    vector<P> h;
    for (auto& p : pts) {
        while (h.size() >= 2 && sign * cross(h[h.size()-2], h.back(), p) >= 0) h.pop_back();
        h.push_back(p);
    }
    return h;
}
static i128 evalMax(const vector<P>& h, ll A, ll B) {
    int lo = 0, hi = (int)h.size() - 1;
    while (hi - lo >= 3) {
        int m1 = lo + (hi - lo) / 3, m2 = hi - (hi - lo) / 3;
        if (dot(A, B, h[m1].x, h[m1].y) < dot(A, B, h[m2].x, h[m2].y)) lo = m1 + 1;
        else hi = m2 - 1;
    }
    i128 best = numeric_limits<i128>::min() / 4;
    for (int i = lo; i <= hi; ++i) best = max(best, dot(A, B, h[i].x, h[i].y));
    return best;
}
// Full CDQ-on-events driver omitted (~60 more lines). The two helpers above are the
// numerically-careful core that distinguishes a Platinum-grade submission from a
// Gold-grade one that may overflow on adversarial inputs.

int main() {
    // [stub] see 2015-feb-gold.html "Fencing the Herd" for the orchestrator.
    return 0;
}