8+8+8+8=24不会做这道题怎么做、题

最难的8道智力题,难倒了多少学霸!
移动火柴棒的题目,被作为小学数学的必考题目,其实也是一款老少皆宜的游戏。在我们的数学题中,也常常会拿火柴来做文章。移动火柴智力题,玩转各个年龄阶段的大脑。尤其对于孩子来说,这种智力题不仅可以锻炼孩子的思维,而且还可以帮助孩子找到学习数学的乐趣,从而提高孩子的数学成绩。这八道题,移动一根火柴让等式成立,本是小学生都能做的题目,但我们许多的成年大人们做起来也是头昏脑胀,感觉力不从心哦!其实智商并无年龄之分,不管大人还是小孩,平时多动动脑也不是坏事,我们一起来做做如下这8道题吧,倘若你能做对6道,那是众人眼中的大神哦...
↓↓ 注意:以下题目全为 移动一根火柴,使等式成立!
1、小试牛刀,这一题难度不算大哦。(14-1+1=3)
2、再看看这一题,应该是最简单的哦(9+5=9)
3、这一题呢,似乎难度更上了一个档次!(11-111=11)
4、据说此题小学生能很容易的做出来?不太相信吧?(1 -701=2)
5、再看看这一题,数字看着很多,但难度其实也不小哦。(528+926+1911)
6、这题感觉超难,你觉得呢?(16=246)
7、这个应该简单(3+6=3)
8、再看看这一题,数字虽简单,但难度却不小哦!(111+1=1)
留下你的答案吧!看看是否8道题你都答对了呢?简单8道智力火柴题您答对了几道呢?不知道大家是否喜欢小编分享的这篇文章呢,如果喜欢的话可以复制口令mDzXo717VL在支付宝中打开领取红包,只要大家在线下消费了之后,小编也可以从中得到你所给的赏金哦,希望大家给点饭钱咯,也希望大家多多支持我,因为你的鼓励将会成为我不断创作好内容的动力!最后提前祝愿所有观看这篇文章的朋友元旦快乐,谢谢观看!
责任编辑:
声明:本文由入驻搜狐号的作者撰写,除搜狐官方账号外,观点仅代表作者本人,不代表搜狐立场。
世界上有一种稳赚不赔的生意,那就是学习!
最新活动,有福利!
今日搜狐热点hdu 1034 Eight
传说中的八数码问题。真是一道神题,A*算法+康托展开
时间: 09:29:04
&&&& 阅读:537
&&&& 评论:
&&&& 收藏:0
标签:&&&&&&&&&&&&&&&Eight
Time Limit:
MS (Java/Others)&&&&Memory Limit:
K (Java/Others)
Total Submission(s): 13506&&&&Accepted Submission(s): 3855
Special Judge
Problem Description
The 15-puzzle has been around for over 100 even if you don‘t know it by that name, you‘ve seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and all packed into a 4 by 4 frame with one
tile missing. Let‘s call the missing tile ‘x‘; the object of the puzzle is to arrange the tiles so that they are ordered as:
9 10 11 12
where the only legal operation is to exchange ‘x‘ with one of the tiles with which it shares an edge. As an example, the following sequence of moves solves a slightly scrambled puzzle:
9 10 11 12
9 10 11 12
13 14 11 15
13 14 11 15
The letters in the previous row indicate which neighbor of the ‘x‘ tile is swapped with the ‘x‘ legal values are ‘r‘,‘l‘,‘u‘ and ‘d‘, for right, left, up, and down, respectively.
Not all p in 1870, a man named Sam Loyd was famous for distributing an unsolvable version of the puzzle, and
frustrating many people. In fact, all you have to do to make a regular puzzle into an unsolvable one is to swap two tiles (not counting the missing ‘x‘ tile, of course).
In this problem, you will write a program for solving the less well-known 8-puzzle, composed of tiles on a three by three
arrangement.
You will receive, several descriptions of configuration of the 8 puzzle. One description is just a list of the tiles in their initial positions, with the rows listed from top to bottom, and the tiles listed from left to right within
a row, where the tiles are represented by numbers 1 to 8, plus ‘x‘. For example, this puzzle
is described by this list:
1 2 3 x 4 6 7 5 8
You will print to standard output either the word ``unsolvable‘‘, if the puzzle has no solution, or a string consisting entirely of the letters ‘r‘, ‘l‘, ‘u‘ and ‘d‘ that describes a series of moves that produce a solution. The string
should include no spaces and start at the beginning of the line. Do not print a blank line between cases.
Sample Input
不得不说,,人这一生,要不是不刷这题,简直不完整啊。附上大量资料.。要想做这题,,得好好准备啊!!
A*算法入门:http://www.cppblog.com/mythit/archive//80492.aspx
本题详细解析请看:http://blog.csdn.net/acm_cxlove/article/details/7745323
康托展开请看:
八数码八大境界:
哎。做的时候可是相当痛苦啊。
下面是我的代码:
#include &cstdio&
#include &queue&
#include &cstring&
#include&algorithm&
#include &string&
#define MAX 3
struct Node{
int map[MAX][MAX] ,
int f,g,h;
/*bool operator&(const Node &n)const
return f&n.
//下面比上面更快
bool operator&(const Node n1)const{
//优先队列第一关键字为h,第二关键字为g
return h!=n1.h?h&n1.h:g&n1.g;
bool check()
if(x&0||y&0 || x&=MAX||y&=MAX)
const int HASH[9]={1,1,2,6,24,120,720,};
//HASH的权值
const int dir[4][2]={1,0,-1,0,0,-1,0,1} ;
int visited[400000] ;
int pre[400000] ;
int des = 322560 ;
int getHash(Node n)
int oth[MAX*4] , k = 0;
for(int i = 0 ; i & MAX ; ++i)
for(int j = 0 ; j & MAX ; ++j)
oth[k++] = n.map[i][j] ;
int result = 0 ;
for(int i = 0 ; i & 9 ; ++i)
int count = 0 ;
for(int j = 0 ; j & ++j)
if(oth[i]&oth[j])
result += count*HASH[i] ;
int getH(Node n)
int result = 0 ;
for(int i = 0 ; i & MAX ; ++i)
for(int j = 0 ; j & MAX ; ++j)
if(n.map[i][j])
int x = (n.map[i][j]-1)/3 , y = (n.map[i][j]-1)%3 ;
result += abs(x-i)+abs(y-j) ;
bool judge(Node n)
int oth[MAX*4] , k = 0;
for(int i = 0 ; i & MAX ; ++i)
for(int j = 0 ; j & MAX ; ++j)
oth[k++] = n.map[i][j] ;
int result = 0 ;
for(int i = 0 ; i & 9 ; ++i)
for(int j = i+1 ; j & 9 ; ++j)
if(oth[i]&&oth[j]&&oth[i]&oth[j])
return !(result&1) ;
void AStar(Node start)
priority_queue&Node&
p.push(start);
while(!p.empty())
Node n = p.top();
for(int i = 0 ; i & 4 ; ++i)
Node next =
next.x += dir[i][0];
next.y += dir[i][1];
if(!next.check())
swap(next.map[next.x][next.y],next.map[n.x][n.y]) ;
next.hash = getHash(next) ;
if(visited[next.hash] == -1)
next.h = getH(next) ;
next.g++ ;
next.f = next.g+next.h;
pre[next.hash] = n.
p.push(next) ;
visited[next.hash] = //i代表方向
if(next.hash == des)
void print()
int next =
ans.clear() ;
while(pre[next]!=-1)
switch(visited[next])
case 0 : ans += 'd' ;
case 1 : ans += 'u' ;
case 2 : ans += 'l' ;
case 3 : ans += 'r' ;
next = pre[next] ;
int len = ans.size() ;
for(int i = len-1 ; i &=0 ; --i)
putchar(ans[i]) ;
int main()
char str[100] ;
while(gets(str) != NULL)
memset(visited,-1,sizeof(visited)) ;
memset(pre,-1,sizeof(pre)) ;
int k = 0 ,i = 0;
while(str[k] != '\0')
if(str[k]&'0'&&str[k]&='9')
t.map[i/3][i%3] = str[k]-'0' ;
else if(str[k] == 'x')
t.x = i/3 ;
t.y = i%3 ;
t.map[i/3][i%3] = 0 ;
t.hash=getHash(t);
visited[t.hash] = -2 ;
t.h = getH(t);
t.f = t.g+t.h;
if(!judge(t))
printf(&unsolvable\n&);
if(t.hash == des)
AStar(t) ;
标签:&&&&&&&&&&&&&&&原文地址:http://blog.csdn.net/lionel_d/article/details/
&&国之画&&&& &&&&chrome插件&&
版权所有 京ICP备号-2
迷上了代码!10a-8(a+1) 这道题不会做,请大家帮下忙!_百度知道
10a-8(a+1) 这道题不会做,请大家帮下忙!
我有更好的答案
疯狂小子886
来自:作业帮
=10a-8a-8,=2a-8
亲,你忘变号了~加变减
亲!采纳我!
不好意思,没有看到!
不差这一个赞,没关系。
你是几年级?
你是几年级的
初一,有时候初一的人不会做的小学生反而不受思想束缚反而能做出来。
帮下忙,OK?
现在还用吗?如果用我现在就帮你解
其他2条回答
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。(方小宝哥哥)
(早睡早起身体好)
(なつめさん)
第三方登录:}

我要回帖

更多关于 这道题怎么做 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信