CODE THANKS FESTIVAL 2015 H: 穴あきケーキ

問題 code-thanks-festival-2015-open.contest.atcoder.jp 解法 2次元の累積和をとる。こうすると長方形の中の累積和がO(1)で得られる。kenkoooo.hatenablog.com後はしゃくとりする。 コード ライブラリはmamekinさんのコピペです。 #include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <algorithm> #include <cmath> #include </cmath></algorithm></iomanip></fstream></sstream></iostream></cstdio>