hdu 4541 Ten Googol】的更多相关文章

http://acm.hdu.edu.cn/showproblem.php?pid=4541 打表找规律 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int t; int n,m; ][]={{, , , , },{, , , , },{, , , , , , },{, , , , , , },{, , , }, {,, ,, , , , , , , , ,…
打表的大水题. /* 4541 */ #include <cstdio> #include <cstdlib> #include <cstring> , , , }; , , , }; , , , , , }; , , , , , }; , , }; , , , , , , , , , , , , }; , , , , , , , , , , , , , , , , , , , , , }; int main() { int t, m, n; int n3, n4, n…
Ten Googol Time Limit: 500/200 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 545    Accepted Submission(s): 267 Problem Description Google的面试题向来以古怪闻名,延续自技术公司用逻辑题测试求职者的古老传统.现在我们来看看下面这题: 面试官在房间的白板上写下6个数字: 10,9,60,90,…
被这道题坑到了,如果单纯的模拟题目所给的步骤,就会出现同一个位置要走两次的情况...所以对于bfs来说会很头痛. 第一个代码是wa掉的代码,经过调试才知道这个wa的有点惨,因为前面的操作有可能会阻止后面的正确操作: #include"iostream" #include"stdio.h" #include"algorithm" #include"cmath" #include"string.h" #incl…
首先,对于一个 '@' 飞上去,飞下来都要耗1点魔力,所以是两点= = 然后站在同一格 魔力可能不同,所以要增加一维. 还有当前搜到的不一定是最小. 别的也没啥. #include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; ; ][]={,,-,,,,,-}; struct node{ int x,y,t,mag; }s,nxt;…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2653 题目大意:迷宫中有普通点和陷阱.其中普通点可以走可以飞,但是陷阱只能飞.走耗时1,飞耗时2.但是飞耗能1.给定一定能量P,问是否能在T秒内走出. 解题思路: 一开始SB似地认为每个点最多访问两次.其实每个点最多可以访问P次. vis[X][Y][P]表示在(x,y)点能量为P的状态. 容易出错的地方在于这个组合: @. ,虽说是飞吧,但是还是会在陷阱上卡1s,尽管下一个点是. ,但是这种情况…
Phone List Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 18217    Accepted Submission(s): 6120 Problem Description Given a list of phone numbers, determine if it is consistent in the sense th…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3555 Bomb Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) 问题描述 The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bo…
Faulty Odometer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4278 Description You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from…
题目: http://acm.hdu.edu.cn/showproblem.php?pid=4312 Meeting point-2 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1231    Accepted Submission(s): 691 Problem Description It has been ten years s…