首页 > TAG信息列表 > Refrigerator

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

POJ2965(找规律)题解

POJ2965(找规律)题解 题目 The Pilots Brothers’ refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 35766 Accepted: 13828 Description The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to

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

The Pilots Brothers' refrigerator

#include<iostream>#include<cstdio>#include<string>using namespace std;int mem[4][4];//用于储存翻转次数,如果是偶数,则相当于没有翻转int main(){ char ch; for (int x = 0; x<4; x++){//按sample的顺序,x代表纵行,y是横列 for (int y = 0; y <= 4; y++){

dfs+枚举,flip游戏的拓展POJ2965

POJ 2965             The Pilots Brothers' refrigerator Description 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