#include"iostream.h"
void main()
{
int i,j,m,n,a[7][6];
cin>>m>>n;
int ctp(0,6,0,5);
}
int ctp(int hh,int he,int lh,int le);
int m,n,tw=0,a[7][6];
int ctp(int hh,int he,int lh,int le)
{
int j,i,tw;
cin>>i>>j;
if(i==m&&j==n)
{
cout<<i<<"行"<<j<<"列"<<endl;
//cout<<"提问了"<<tw<<"次"<<endl;
}
else
{
tw+=2;
if(i<=m)
{
if(j<=n)
ctp(hh,(hh+he)/2,lh,(lh+le)/2);
else
ctp(hh,(hh+he)/2,(lh+le)/2,le);
}
else
{
if(j<=n)
ctp((hh+he)/2,he,lh,(lh+le)/2);
else
ctp((hh+he)/2,he,(lh+le)/2,le);
}
}
}
c++ 太多初始化求解,
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答 默认 最新
悬赏问题
- ¥15 求NPF226060磁芯的详细资料
- ¥15 使用R语言marginaleffects包进行边际效应图绘制
- ¥20 usb设备兼容性问题
- ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
- ¥15 安装svn网络有问题怎么办
- ¥15 Python爬取指定微博话题下的内容,保存为txt
- ¥15 vue2登录调用后端接口如何实现
- ¥65 永磁型步进电机PID算法
- ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
- ¥88 找成都本地经验丰富懂小程序开发的技术大咖