2014-04-28から1日間の記事一覧

UVa11124 Troubles for Modern Days Problemsetters

UVa

問題 http://uva.onlinejudge.org/external/111/11124.html概要 奇数段目かつ奇数番目のブロックのみの数字が書かれた積み石がある。最下段の数字以外はパスカルの三角形同様の方式で値が決まるので、全ての数字を特定し出力せよ。解法 積み石の一般の位置に…

UVa115533 GRID GAME

UVa

問題 http://uva.onlinejudge.org/external/115/11553.html解法 Bobが最善の手を取ってきた前提でAliceの得点を最大化する。 #include <iostream> #include <algorithm> #include <limits> using namespace std; int main() { int grid[8][8]; int Tc; cin >> Tc; while(Tc--) { int N; ci</limits></algorithm></iostream>…