![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
poj
GrayVictoria
这个作者很懒,什么都没留下…
展开
-
poj 1573 Robot Motion
action_map纪录经过每个点的次数但其实只可能是0,1只要再次经过标记为1的点时就一定是走到圈里了刚开始写的++,不是直接附值为1,就超时了……竟然超时了!!!然后改了又wa……嗯……是没有初始化哇靠其实应该不用也没事啊???只能说c++是一个神奇的语言……#include #include using namespace std;char map[12][1原创 2015-08-22 17:14:19 · 558 阅读 · 0 评论 -
poj 2632 Crashing Robots
卧槽,模拟法到底是什么啊,不会就是根据input一个个往前走,然后碰到符合条件的退出吧??!这道机器人就是这么做啊?!好吧,就是按着它说的一步步写就行,然后判断,没有啥太难的,时间又充裕,放手干吧孩子!!#include using namespace std;int position_1[100][2]; //the position of the e原创 2015-08-21 16:07:11 · 490 阅读 · 0 评论 -
poj 3278 Catch That Cow
据说这是最简单的bfs……然而搞不懂bfs的我只能说我真的不会……空气中弥漫着的,是淡淡的忧伤……先把大神代码照办ac了,明天我再找别人问问吧……这是编程渣的心塞……→_→让你跑去刷水题……明天搞定了再更新……尼玛洗洗衣服睡觉去!!!#include using namespace std;int deep[200002],path[200002],v[200原创 2015-08-21 22:48:40 · 525 阅读 · 0 评论 -
poj 2506 Tiling
原来还可以这样系列……竟然有一个叫模板的东西可以用!!原谅我一个刚入门的小菜鸟!原来大神们给我留下了这样的财富!!超大数的简单加减乘除:版本一:#include using namespace std;const int Base=1000000000; const int Capacity=100; typedef long long huge; struct Big原创 2015-08-18 21:53:56 · 550 阅读 · 0 评论 -
poj 2524 Ubiquitous Religions
并查集然而x_union还不是很懂#include using namespace std;int x_path[50005];int x_root[50005];int answer;int find_set(int x){ if (x!=x_path[x]) { x_path[x]=find_set(x_path[x]); } r原创 2015-08-18 10:57:55 · 476 阅读 · 0 评论 -
poj 2109 Power of Cryptography
#include #include #include using namespace std;int main(int argc, const char * argv[]) { double n,p; while (cin>>n>>p) { double k=pow(p, 1/n); printf("%.0lf\n",k); }原创 2015-08-11 10:14:54 · 346 阅读 · 0 评论 -
poj 2586 Y2K Accounting Bug
对自己的读题能力感到忧伤……即使到现在看到英文题依然感到力不从心,不开心,阅读量太少,以此作为警戒吧,要增加英文阅读量了,烦→_→!!!#include using namespace std;int main(int argc, const char * argv[]) { int s,d; int s_month,d_month; while (cin>>s>原创 2015-08-11 11:04:43 · 532 阅读 · 0 评论 -
poj 3295 Tautology
写一大堆然后一次ac的感觉好爽好爽!!!第一次用stl是的,上大学两年来第一次用stl!!!啊!!!我该鄙视自己还是佩服自己!!!其实差不多就是四则运算那种,pqrst代表五个值,都是0或1,然后把它们代入表达式,akcge代表运算符,或、与、非balabala如果不管pqrst的组合怎样最终结果都为1的话就tautlogy,否则就是not四则运算和表达式运原创 2015-08-22 11:41:00 · 570 阅读 · 0 评论 -
poj 1001 Exponentiation
大数啊大数,神奇的大数最懒的写大数了→_→大神的代码,懒!得!写!了!!#include#include#include#include#include#include#includeusing namespace std;typedef string::size_type size_type;int ans[10024 + 10];void Print(int原创 2015-08-22 21:14:29 · 507 阅读 · 0 评论 -
poj 1068 Parencodings
不难的题啊s是左括号右括号组成的串p串代表右括号在串里的位置w串代表从左往右的括号对里,每个括号对包含几个右括号老师说这是模拟题,其他也说这是模拟题,可是百度半天只有 “模拟退火算法” 一篇非常简洁的 模拟退火算法讲解 ( ̄▽ ̄) 但是完全不符合啊!!!(╯°□°)╯︵ ┻━┻ 虽然可以自己做出来,但是模拟法到底是个什么鬼!!!我想的是先通过p串推s串,0代表左原创 2015-08-21 10:30:35 · 573 阅读 · 0 评论