{"image_url":null,"blog_title":"ICPC log","published":"2014-09-21 18:35:02","type":"rich","provider_url":"https://hatena.blog","height":"190","categories":["POJ"],"provider_name":"Hatena Blog","width":"100%","author_url":"https://blog.hatena.ne.jp/rokugats/","title":"POJ PKU 1828 Monkeys' Pride","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frokugats-pc.hateblo.jp%2Fentry%2F2014%2F09%2F21%2F183502\" title=\"POJ PKU 1828 Monkeys&#39; Pride - ICPC log\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"rokugats","description":"\u5165\u529b\u5217\u3092x\u5ea7\u6a19(x\u5ea7\u6a19\u304c\u540c\u3058\u5834\u5408\u306fy\u5ea7\u6a19)\u3067\u964d\u9806\u306b\u30bd\u30fc\u30c8\u3057\u3066\u304a\u304f\u3002 \u30bd\u30fc\u30c8\u3055\u308c\u305f\u5217\u306ey\u5ea7\u6a19\u3092\u5148\u982d\u304b\u3089\u898b\u3066\u3044\u304d, \u3053\u308c\u307e\u3067\u898b\u305f\u4e2d\u3067\u6700\u5927\u306e\u5024\u306a\u3089\u89e3\u306b1\u52a0\u7b97\u3059\u308b\u3002 #include <cstdio> #include <algorithm> #include <functional> using namespace std; typedef pair<int, int> P; int main() { int N; while (scanf(\"%d\", &N) != EOF && N) { P ps[50000]; for (int i = 0; i < N; i++) scanf(\"%d %d\",\u2026","version":"1.0","blog_url":"https://rokugats-pc.hateblo.jp/","url":"https://rokugats-pc.hateblo.jp/entry/2014/09/21/183502"}