思路:

  1. 呃呃 暴搜+打表

    暴搜的程序::稳稳的TLE+MLE (但是我们可以用来打表)

    然后我们就可以打表过了 hiahiahia

  2. 可以证明最小的那个数不会超过200(怎么证明的我也不知道),然后就直接判重就好了

    打表:

    打表的程序:

// by SiriusRen
#include <queue>
#include <cstdio>
#include <algorithm>
using namespace std;
queue<pair<int,int> >q;
int mod=100000007,vis[100000070],cnt=0,v[20005];
int gcd(int x,int y){return y?gcd(y,x%y):x;}
int main()
{
freopen("data.txt","w",stdout);
vis[10008]=1;
q.push(make_pair(1,1));
while(!q.empty())
{
pair<int,int>t=q.front();q.pop();
int rec=vis[(t.first*10007+t.second)%mod];
if(!v[t.first])v[t.first]=rec,cnt++;
if(!v[t.second])v[t.second]=rec,cnt++;
if(cnt==20000)goto e;
//first+second & first
if(t.first+t.second<=20000&&!vis[((t.first+t.second)*10007+t.first)%mod])
{
vis[((t.first+t.second)*10007+t.first)%mod]=rec+1;
q.push(make_pair(t.first+t.second,t.first));
} //first+second & second
if(t.first+t.second<=20000&&!vis[((t.first+t.second)*10007+t.second)%mod])
{
vis[((t.first+t.second)*10007+t.second)%mod]=rec+1;
q.push(make_pair(t.first+t.second,t.second));
} //fisrt-second & first
if(t.first-t.second>t.first&&!vis[((t.first-t.second)*10007+t.first)%mod])
{
vis[((t.first-t.second)*10007+t.first)%mod]=rec+1;
q.push(make_pair(t.first-t.second,t.first));
}
if(t.first-t.second<t.first&&t.first-t.second>0&&!vis[(t.first*10007+t.first-t.second)%mod])
{
vis[(t.first*10007+t.first-t.second)%mod]=rec+1;
q.push(make_pair(t.first,t.first-t.second));
} //first-second & second
if(t.first-t.second>t.second&&!vis[((t.first-t.second)*10007+t.second)%mod])
{
vis[((t.first-t.second)*10007+t.second)%mod]=rec+1;
q.push(make_pair(t.first-t.second,t.second));
}
if(t.first-t.second<t.second&&t.first-t.second>0&&!vis[(t.second*10007+t.first-t.second)%mod])
{
vis[(t.second*10007+t.first-t.second)%mod]=rec+1;
q.push(make_pair(t.second,t.first-t.second));
} //first+first & first
if((t.first*2)<=20000&&!vis[(t.first*2*10007+t.first)%mod])
{
vis[(t.first*2*10007+t.first)%mod]=rec+1;
q.push(make_pair(t.first+t.first,t.first));
} //first+first & second
if((t.first*2)<=20000&&!vis[(t.first*2*10007+t.second)%mod])
{
vis[(t.first*2*10007+t.second)%mod]=rec+1;
q.push(make_pair(t.first+t.first,t.second));
} //second+second & first
if((t.second*2)<=20000&&t.second*2>=t.first&&!vis[(t.second*2*10007+t.first)%mod])
{
vis[(t.second*2*10007+t.first)%mod]=rec+1;
q.push(make_pair(t.second<<1,t.first));
}
if((t.second*2)<=20000&&t.second*2<t.first&&!vis[(t.first*10007+t.second*2)%mod])
{
vis[(t.first*10007+t.second*2)%mod]=rec+1;
q.push(make_pair(t.first,t.second*2));
}
}
e:for(int i=0;i<=20000;i++)
{
printf("%c",v[i]+'A');
}
}

大概十几秒打完了表。

// by SiriusRen
#include <cstdio>
int p;
char ans[]={"ABCDDEEFEFFGFGGGFGGHGHHHGHHHHIHHGHHIHIIIHIIIIIIIHIIIIJIJIJJJIJIIHIIJIJJJIJJJJJJJIJJJJJJKJKJKJJJJIJJJJKJKJKKKJKKKJKKKKKKKJKKKJKJJIJJKJKKKJKKKKKKKJKKKKKKLKKKKKKKKJKKKKKKLKLKLKLLLKLLLKLLLKLKLKKKKJKKKKLKLKLLLKLLLKLLLLLLLKLLLLLLLKLLLLLLLLLLLLLLLKLLLLLLLKLLLKLKKJKKLKLLLKLLMLMLLKLLMLMLLLLLLLLLLKLLLLLLMLLLMLMMMLMLMLMLMLMLLLLLLKLLLLLLMLMLMLMMMLMMMLMMMLMMMMMMMLMMMMMMMLMMMMMMMLMMMLMMMLMLMLLLLKLLLLMLMLMMMLMMMLMMMMMMMLMMMMMMMLMMMMMMMMMMMMMMMLMMMMMMMMMMMMMMMLMMMMMMMMMMMMNMNMMMNMNMMMMMMMMMMLMMMMMMMMMMNMNMMLMMNMNMMLMMMLMLLKLLMLMMMLMMNMNMMLMMNMNNMMNNNMNMMLMMNMNNNMMNNMNMNMMMNMNMMMNMMMMMMLMMMMMMNMMMNMNNNMNMNMNNNMNNNNNNNMNNNMNNNMNNNMNNNMNNNMNMNMNMMMMMMLMMMMMMNMNMNMNNNMNNNMNNNMNNNNNNNMNNNNNNNMNNNNNNNMNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNMNNNNNNNMNNNNNNNMNNNMNNNMNMNMMMMLMMMMNMNMNNNMNNNMNNNNNNNMNNNNNNNMNNNNNNNNNNONNNNMNNNNONNNNNNNNNNMNNNNNNNNNNNNNNONNNONONNNONNNNNNMNNNNNNONNNONONNNONONONNNNNNNNNNMNNNNNNNNNNONONONONONONONOOONOOONONONOOONOOONONONNNONONNNNNNNNNNMNNNNNNNNNNONONNNNNONOOONOOONONNMNNONOOONOOONONNMNNONONNMNNNMNMMLMMNMNNNMNNONONNMNNONOOONOOONONNMNNONOOONOOOOONNNNOOOOONNOOONONNMNNONOOONNOOOOOONNNOOOOONOOONOOONONONOOONOOONONONOOONONNNONNNNNNMNNNNNNONNNONOOONONONOOONOOOOOOONOOONOOONOOOOOOONOOOOOOOOOOOOOOONOOOOOOONOOOOOOONOOOOOOONOOOOOOONOOOOOOONOOONOOONOOONONONONNNNNNMNNNNNNONONONOOONOOONOOONOOOOOOONOOOOOOONOOOOOOONOOOOOOOOOOOOOOONOOOOOOOOOOOOOOONOOOOOOOOOOOOOOPNOOOOPOPOOOOOPOPOOOOOOOOOOOOOOOONOOOOOOOOOOOOOOOOOOPOPOOOOOOOOOONOOOOOOOOOOPOPOOOOOOOOOOOOOOOOOONOOOOOOOOOOOOOOONOOOOPOOOPOPOPOONOOPOOOONOOOOPOONOOONOOONONONNNNMNNNNONONOOONOOONOOPOOOONOOOOPOONOOPOPOOOPOPOOOONOOOOPOOOOOOOOOONOOOOOOPOOOPOOOOOOOPOPPOOOOPOOOONOOOOPOPOOPPOPOOOOOOOPOOOOOOOOOONOOOOO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TSTSSTTSTSSSTSTSTTTSTTTSTSTTSTTSTSTSTSTSTSTSTTTSTSTSSSTSTTSTTSTSSTTSSSSSTSTSSSSSTSSSTSSSSSSSTSSSSSSSSSSRSSSSSSSSSSTSSSSSSSTSSTTSSSSSTSTSSSSSTSSSTSTSSTTSTSSSTSTSTTTSTTTSTSTSTSTSTTSTTSTSTTTSTTTSTSTTTTTSTTSSTSTSSTTSTTTSTSTTTTTSTTTTTTTSTTTSTTTSTSTSTTTSTTTSTSTSTTTSTTTSTTTSTTTSTSTSTTTSTTTSTTTSTTTSTTTSTTTSTSTSTTTSTSTSTSTSTSTSTSTSTSTSTSTSTSSSSSTSSSTSSSSSSSSSSSSSSSSRSSSSSSSSSSSSSSSSTSSSTSSSSSTSTSTSTSTSTSTSTSSSTSSSTSTSTTTSTTTSTTTSTTTSTTTSTSTSSTTSTTSSTTTSTTTSTSTSTTTSSSTSTTTSTSSSTTTSTSSSTSSSSSSRSSSSSSTSSSTSTTTSSSTSTTTSTTSTTTTSTSTSTTTSTSTTSSTSTTSTTSTSTTTSTTTSTSTSTSTSTTTSTTTSSSTSSTSSTSSSTSTSSSTTSSTSTSTSTSTSSTTSTSSTTSSTSTTRTTSSSSTSSSTSTTSSTSTSTTTSSTTTTSSSTSSSSSTSSSSTTSTSTTTSSTTTTTTSTSTSTSTSTSTSTSTSSTTSTSSTTSTSTTTSTTTSSSTSTTTSTTTSTTTSSTTSTSTSTSSSSSSRSSSSSSTSTSTSTTSSTTTSTTTSTSTTTSSSTSTSTTTSTTTSSTTSTSTSTTTSTTTSTSTSTSTSTTTSTSSSSTTSSSTSTSTSSSTSSSTSSSSSSSTSSTSSSSSSSSSSTSSSSSSSSSSRSSSSSSSSSSTSSSSSSSSSSSSSTSSSTSSS"};
int main()
{
scanf("%d",&p);
printf("%d",ans[p]-'A'-1);
}

然后就可以A此题了……

(转换成char类型可以少写无数逗号,省code length) Code length有30000B的限制

正解:

// by SiriusRen
#include <queue>
#include <cstdio>
#include <algorithm>
using namespace std;
queue<pair<int,int> >q;
char vis[20005][205];
int p;
int gcd(int x,int y){return y?gcd(y,x%y):x;}
int main()
{
vis[1][1]=1;
scanf("%d",&p);
q.push(make_pair(1,1));
while(!q.empty())
{
pair<int,int>t=q.front();q.pop();
int rec=vis[t.first][t.second]+1,mul=t.first<<1,mul2=t.second<<1,sum=t.first+t.second,minu=t.first-t.second;
if(p%(gcd(t.first,t.second)))continue;
if(t.first==p||t.second==p){printf("%d\n",rec-2);return 0;}
//first+second & first
if(t.first<=200&&sum<=20000&&!vis[sum][t.first])
{
vis[sum][t.first]=rec;
q.push(make_pair(sum,t.first));
} //first+second & second
if(sum<=20000&&!vis[sum][t.second])
{
vis[sum][t.second]=rec;
q.push(make_pair(sum,t.second));
} //fisrt-second & first
if(t.first<=200&&minu>t.first&&!vis[minu][t.first])
{
vis[minu][t.first]=rec;
q.push(make_pair(minu,t.first));
}
else if(minu<=200&&minu<t.first&&minu>0&&!vis[t.first][minu])
{
vis[t.first][t.first-t.second]=rec;
q.push(make_pair(t.first,t.first-t.second));
} //first-second & second
if(t.first-t.second>t.second&&!vis[t.first-t.second][t.second])
{
vis[t.first-t.second][t.second]=rec;
q.push(make_pair(t.first-t.second,t.second));
}
else if(t.first-t.second<t.second&&t.first-t.second>0&&!vis[t.second][t.first-t.second])
{
vis[t.second][t.first-t.second]=rec;
q.push(make_pair(t.second,t.first-t.second));
} //first+first & first
if(t.first<=200&&(mul)<=20000&&!vis[mul][t.first])
{
vis[mul][t.first]=rec;
q.push(make_pair(mul,t.first));
} //first+first & second
if((mul)<=20000&&!vis[mul][t.second])
{
vis[mul][t.second]=rec;
q.push(make_pair(mul,t.second));
} //second+second & first
if(t.first<=200&&(mul2)<=20000&&mul2>=t.first&&!vis[mul2][t.first])
{
vis[mul2][t.first]=rec;
q.push(make_pair(t.second<<1,t.first));
}
else if(mul2<=200&&(mul2)<=20000&&mul2<t.first&&!vis[t.first][mul2])
{
vis[t.first][mul2]=rec;
q.push(make_pair(t.first,mul2));
}
}
}

(STL毁一生… 本地秒出结果 POJ挂得特惨)

改成手写的队列……

// by SiriusRen
#include <cstdio>
#include <algorithm>
using namespace std;
char vis[20005][205];
int p,q1[5000000],q2[5000000],l=0,r=1;
int main()
{
scanf("%d",&p);
vis[1][1]=1;
q1[0]=q2[0]=1;
while(l<r)
{
int t1=q1[l];
int t2=q2[l++];
int rec=vis[t1][t2]+1,mul=t1<<1,mul2=t2<<1,sum=t1+t2,minu=t1-t2;
if(t1==p||t2==p){printf("%d\n",rec-2);return 0;} //first+second & first
if(t1<=200&&sum<=20000&&!vis[sum][t1])
{
vis[sum][t1]=rec;
r++;q1[r]=sum;q2[r]=t1;
} //first+second & second
if(sum<=20000&&!vis[sum][t2])
{
vis[sum][t2]=rec;
r++;q1[r]=sum;q2[r]=t2;
} //first-second & first
if(t1<=200&&minu>t1&&!vis[minu][t1])
{
vis[minu][t1]=rec;
r++;q1[r]=minu;q2[r]=t1;
}
else if(minu<=200&&minu<t1&&minu>0&&!vis[t1][minu])
{
vis[t1][minu]=rec;
r++;q1[r]=t1;q2[r]=minu;
} //first-second & second
if(minu>t2&&!vis[minu][t2])
{
vis[minu][t2]=rec;
r++;q1[r]=minu;q2[r]=t2;
}
else if(minu<t2&&minu>0&&!vis[t2][minu])
{
vis[t2][minu]=rec;
r++;q1[r]=t2;q2[r]=minu;
} //first+first & first
if(t1<=200&&mul<=20000&&!vis[mul][t1])
{
vis[mul][t1]=rec;
r++;q1[r]=mul;q2[r]=t1;
} //first+first & second
if(mul<=20000&&!vis[mul][t2])
{
vis[mul][t2]=rec;
r++;q1[r]=mul;q2[r]=t2;
} //second+second & first
if(t1<=200&&mul2<=20000&&mul2>=t1&&!vis[mul2][t1])
{
vis[mul2][t1]=rec;
r++;q1[r]=mul2;q2[r]=t1;
}
else if(mul2<=200&&mul2<=20000&&mul2<t1&&!vis[t1][mul2])
{
vis[t1][mul2]=rec;
r++;q1[r]=t1;q2[r]=mul2;
}
}
}

坑爹搜索 跪一晚上,,,,,,



POJ 1945 暴搜+打表 (Or 暴搜+判重)的更多相关文章

  1. POJ3087 Shuffle'm Up —— 打表找规律 / map判重

    题目链接:http://poj.org/problem?id=3087 Shuffle'm Up Time Limit: 1000MS   Memory Limit: 65536K Total Sub ...

  2. BZOJ_1224_[HNOI2002]彩票_爆搜+打表

    BZOJ_1224_[HNOI2002]彩票_爆搜+打表 Description 某地发行一套彩票.彩票上写有1到M这M个自然数.彩民可以在这M个数中任意选取N个不同的数打圈.每个彩民只能买一张彩票, ...

  3. HDU--杭电--1195--Open the Lock--深搜--都用双向广搜,弱爆了,看题了没?语文没过关吧?暴力深搜难道我会害羞?

    这个题我看了,都是推荐的神马双向广搜,难道这个深搜你们都木有发现?还是特意留个机会给我装逼? Open the Lock Time Limit: 2000/1000 MS (Java/Others)  ...

  4. poj 1564 Sum It Up | zoj 1711 | hdu 1548 (dfs + 剪枝 or 判重)

    Sum It Up Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Sub ...

  5. 使用spark对hive表中的多列数据判重

    本文处理的场景如下,hive表中的数据,对其中的多列进行判重deduplicate. 1.先解决依赖,spark相关的所有包,pom.xml spark-hive是我们进行hive表spark处理的关 ...

  6. poj 3131 双向搜索+hash判重

    题意: 初始状态固定(朝上的全是W,空格位置输入给出),输入初始状态的空格位置,和最终状态朝上的位置,输出要多少步才能移动到,超过30步输出-1. 简析: 每一个格子有6种状态,分别是 0WRB, 1 ...

  7. POJ 2458 DFS+判重

    题意: 思路: 搜+判重 嗯搞定 (听说有好多人用7个for写得-.) //By SiriusRen #include <bitset> #include <cstdio>0 ...

  8. BFS以及hash表判重的应用~

    主要还是讲下hash判重的问题吧 这道题目用的是除法求余散列方式 前几天看了下算法导论 由于我们用的是线性再寻址的方式来解决冲突问题 所以hash表的大小(余数的范围)要包含我们要求的范围 对mod的 ...

  9. 逆向bfs搜索打表+康拓判重

    HDU 1043八数码问题 八数码,就是1~8加上一个空格的九宫格,这道题以及这个游戏的目标就是把九宫格还原到从左到右从上到下是1~8然后最后是空格. 没了解康托展开之前,这道题怎么想都觉得很棘手,直 ...

随机推荐

  1. 【转】小白级的CocoaPods安装和使用教程

    原文网址:http://www.jianshu.com/p/e2f65848dddc 百度有很多CocoaPods的安装教程.第一次看的时候,确实有点摸不透的感觉.经过思考,一步一步来实践,前后花了三 ...

  2. 杂项-建模:BIM

    ylbtech-杂项-建模:BIM 建筑信息模型是建筑学.工程学及土木工程的新工具.建筑信息模型或建筑资讯模型一词由Autodesk所创的.它是来形容那些以三维图形为主.物件导向.建筑学有关的电脑辅助 ...

  3. 7.gcc的使用

    什么是gcc gcc编译器(GNU C Compiler) 现在我们所说的 gcc 是 GUN Compiler Collection的缩写,可以支持多种语言编译,比如 C,C++,Java, pas ...

  4. POJ 3628 01背包 OR 状压

    思路: 1.01背包 先找到所有奶牛身高和与B的差. 然后做一次01背包即可 01背包的容积和价格就是奶牛们身高. 最后差值一减输出结果就大功告成啦! 2. 搜索 这思路很明了吧... 搜索的确可以过 ...

  5. 在js在添版本号

    为了增加用户访问网站体验,快速打开网页,许多网站都对不常更新的js,css文件在浏览器端设置了缓存.但如果在服务器端做了更新,浏览器使用的仍是缓存在本地的js文件,除非强制清缓存(ctrl+F5).为 ...

  6. git提交不用每次都输入用户名密码

    克隆项目二种方式: 1. 使用https url克隆,   复制https url 然后到 git clone https-url 2.使用 SSH url 克隆却需要在克隆之前先配置和添加好 SSH ...

  7. X Macro

    30年前我念大学时从一个朋友那里学来的一个技巧. 它是汇编语言的一个宏,但很容易转换为C语言宏. 我一直在使用它,但有意思的是我还从没在别人的代码中看到过.现在该我把这个小技巧传递下去了. 让我们举个 ...

  8. iOS9 & Xcode7 下设置LaunchImage启动图片 问题及解决

    最近在学习iOS开发,碰到一个设置启动图片的问题,怎么也搞不定,综合网上种种资料后Done,现在把完整过程写一下. 这里以建立一个空的Single View Application 为演示基础. 1. ...

  9. php版本过低错误导致的laravel 错误:Illuminate\Foundation\helpers.php on line 233; syntax error, unexpected '?'

    今天运行laravel项目发现出现错误: Parse error: syntax error, unexpected '?'  ..\vendor\laravel\framework\src\Illu ...

  10. "随笔"列表 - 按时间先后顺序排列

    这是一个测试 linux采用scp命令拷贝文件到本地,拷贝本地文件到远程服务器 美化博客园 virtual box虚拟机在linux下设置共享文件夹 纯净版linux (debian)挂载Virtua ...