首页 > TAG信息列表 > 2965

POJ 2965 The Pilots Brothers' refrigerator

题面 The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator. There are 16 handles on the refrigerator door. Every handle can be in one of two states: open or closed. The refrigerator is open onl

POJ初级 - 基本算法

基本算法: 枚举. (POJ 1753,POJ 2965) 贪心(POJ 1328,POJ 2109,POJ 2586) 递归和分治法. 递推. 构造法.(POJ 3295) 模拟法.(POJ 1068,POJ 2632,POJ 1573,POJ 2993,POJ 2996) 题号 Hint 标签 POJ 1753 DFS, 搜索后还原 枚举 POJ 2965 枚举 POJ 1328 贪心 POJ 2109

[北大机试B][OpenJ_Bailian-2965]:玛雅历

上周末,M.A. Ya教授对古老的玛雅有了一个重大发现。从一个古老的节绳(玛雅人用于记事的工具)中,教授发现玛雅人使用了一个一年有365天的叫做Haab的历法。这个Haab历法拥有19个月,在开始的18个月,一个月有20天,月份的名字分别是pop, no, zip, zotz, tzec, xul, yoxkin, mol, chen, yax, za

The Pilots Brothers' Refrigerator

题目链接 http://poj.org/problem?id=2965 分析 用二进制表示开关状态,暴力枚举每个位置是否操作即可 AC代码 #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; const int maxn = 5; int h[maxn], cnt; char s[maxn]; pair<int, int> ans