有常无常 2014-05-23 08:52 采纳率: 0%
浏览 1956

c++ 太多初始化求解,

#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);
}
}
}

  • 写回答

3条回答

  • 普通网友 2014-05-23 09:44
    关注

    你要问什么???。。。

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料