torus711 のアレ

主に競技プログラミングの問題について書きます.PC 以外だと数式が表示されないかもしれないです

座標圧縮

AtCoder Beginner Contest 168, F: . (Single Dot)

問題文 https://atcoder.jp/contests/abc168/tasks/abc168_f 問題概要 平面上に,$Y$ 軸に平行な線分が $N$ 本,$X$ 軸に平行な線分が $M $ 本引かれている.$i$ 番目の縦線は 2 点 $( A_i, C_i )$ と $( B_i, C_i )$ を結んでいて,$j$ 番目の横線は 2 点 $…

TopCoder, Single Round Match 646, Division 1, Level 2 : TheGridDivOne

問題文 http://community.topcoder.com/stat?c=problem_statement&pm=13627&rd=16278 問題概要 今,無限に広い 2 次元空間の原点にいる.1 回の移動では 4 近傍(いずれかの座標軸に平行な方向)のいずれかの方向に距離 1 移動することができる. 平面上のい…

AtCoder Beginner Contest #008, D : 金塊ゲーム

問題文 http://abc008.contest.atcoder.jp/tasks/abc008_4 問題概要 説明しづらいので本家問題文参照で><

TopCoder SRM 588, Division 1, Level 1 : GUMIAndSongsDiv1

問題文 http://community.topcoder.com/stat?c=problem_statement&pm=12706&rd=15700 概要 ほぼ Divisin 2, level 2 と同一で、N

TopCoder SRM 586, Division 1, Level 1 : PiecewiseLinearFunction

問題文 http://community.topcoder.com/stat?c=problem_statement&pm=12691&rd=15698 概要 関数 f があり、そのうちいくつかの点、( x, f(x) ) の座標は ( i, Y[i] ) である。 関数は ( i, Y[i] ) と( i + 1, Y[ i + 1 ] ) を結んだ線分の集合となる。 関数…

TopCoder SRM 580, Division 1, Level 1 ( Division 2, Level 2 ) : EelAndRabbit

問題文 http://community.topcoder.com/stat?c=problem_statement&pm=12575&rd=15500 概要 座標 0 にうさぎがいて、片側からうなぎが速度 1 で流れてくる。 i 番目のうなぎは時刻 で頭部が座標 0 を通り、 の長さをもつ。 うさぎは二度、うなぎを捕まえる事…

AOJ 0531 : Paint Color

問題文 http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0531 概要 の平面があり、平面上の 個の領域が与えられる。 与えられた領域のいずれにも含まれない領域は、与えられた領域によって分割されている。 分割されている領域の数を求めよ。