2021-10-01から1ヶ月間の記事一覧
競プロ以前の話ですが、思い出せなかったのでメモを残しておきます。 int x1, y1;// p1 int x2, y2;// p2 int x3, y3;// p3 float s = abs((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)) / 2;
競プロ以前の話ですが、思い出せなかったのでメモを残しておきます。 int x1, y1;// p1 int x2, y2;// p2 int x3, y3;// p3 float s = abs((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)) / 2;