Fighting for Triangles 题目连接: http://codeforces.com/gym/100015/attachments Description Andy and Ralph are playing a two-player game on a triangular board that looks like the following: 1 2 3 4 5 7 8 6 9 10 11 13 14 16 17 12 15 18 At each turn, a playe…
Problem K. Kitchen Robot Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100610 Description Robots are becoming more and more popular. They are used nowadays not only in manufacturing plants, but also at home. One programmer wit…
关 灯 问 题 I I 关灯问题II 关灯问题II 题目描述 现有n盏灯,以及 m m m个按钮.每个按钮可以同时控制这 n n n盏灯--按下了第 i i i个按钮,对于所有的灯都有一个效果.按下i按钮对于第 j j j盏灯,是下面 3 3 3中效果之一:如果 a [ i ] [ j ] a[i][j] a[i][j]为 1 1 1,那么当这盏灯开了的时候,把它关上,否则不管:如果为 − 1 -1 −1的话,如果这盏灯是关的,那么把它打开,否则也不管:如果是 0 0 0,无论这灯是否开,都不管…
车 I I 车II 车II 题目描述 有一个 n ∗ m n*m n∗m的棋盘 ( n . m ≤ 80 , n ∗ m ≤ 80 ) (n.m≤80,n*m≤80) (n.m≤80,n∗m≤80)要在棋盘上放 k ( k ≤ 20 ) k(k≤20) k(k≤20)个棋子,使得任意两个棋子不相邻.求合法的方案总数. 输入 n , m , k n,m,k n,m,k 输出 方案总数 样例输入 3 3 2 样例输出 24 题目解析 又双叒叕是一道状压DP的题.和车相比,这道题的数据就大了许多 n…
2017 JUST Programming Contest 2.0 题目链接:Codeforces gym 101343 J.Husam and the Broken Present 2 J. Husam and the Broken Present 2 time limit per test:1.0 s memory limit per test:256 MB input:standard input output:standard output After you helped Husam…