APIO 2011 - Find the Path

Author: Andi Qu

This section is not complete.

Any help would be appreciated! Just submit a Pull Request on Github.

Implementation

#include <bits/stdc++.h>
#define FOR(i, x, y) for (int i = x; i < y; i++)
typedef long long ll;
using namespace std;
struct Rect {
int x1, y1, x2, y2;
Rect(int a = 0, int b = 0, int c = 0, int d = 0): x1(a), y1(b), x2(c), y2(d) {
if (x1 > x2) swap(x1, x2);
if (y1 > y2) swap(y1, y2);

Join the USACO Forum!

Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!