2016-06-01から1ヶ月間の記事一覧

UVa 11297 Census

問題 : UVa Online Judge二次元のセグメントツリーで値の更新、クエリに対して矩形内の最大値、最小値を求める。 #include<iostream> #include<stdio.h> using namespace std; const int MAX_N=500; const int INF=200000000; struct info{ info(){} info(int mi_,int ma_):mi(m</stdio.h></iostream>…

CF #354(Div2) E - The Last Fight Between Human and AI

問題 : Problem - 676E - Codeforces概要 : n次多項式P(x)の係数を相手(AI?)と交互に決めて行って最終的にそれが(x-k)で割り切れたら人間の勝利。この問題では、その途中の段階での既に決まっている係数が与えられる。解法 : まず、剰余の定理からP(k)=0にな…