/ Vijos / 讨论 / 过河 /

今天第一次来,很多不懂,不知道这个题怎么错的

后面直接就是内存溢出,我在本机上试了好像没啥问题啊.(用的VS2008)

还有请问错误号哪里可以查询??

#include

using namespace std;

class CForg

{

public:

int m_nMin;

int m_nMax;

public:

CForg(int nMin,int nMax);

};

class CBridge

{

public:

CBridge(long nLimit,long nNumber);

~CBridge();

int Compute(const CForg& iTheForg);

private:

long m_nLimit;

long m_nNumber;

bool* m_nPosition;

};

CForg::CForg(int nMin,int nMax):m_nMin(nMin),m_nMax(nMax){}

CBridge::CBridge(long nLimit,long nNumber):m_nLimit(nLimit),m_nNumber(nNumber),m_nPosition(new bool [m_nLimit + 1])

{

int *nTemp = new int [m_nNumber];

for(int nCount = 0;nCount < m_nNumber;nCount++)

cin >> nTemp[nCount];

for(int nCount = 0,nCountStone = 0;nCount nLenth;

cin >> nMin >> nMax >> nStone;

CForg iTheForg(nMin,nMax);

CBridge iTheBridge(nLenth,nStone);

cout

3 条评论

  • @ 2009-10-06 21:31:09

    LZ不应该出现在这里。。。

  • @ 2009-10-06 11:06:20

    lz职业程序员?

    orz!标准的mfc风格变量名+细致的模块化

    不过说实话,这种题真的不用连青蛙(应该是frog吧)和桥都写成类,特性太少,程序太小,不值得.还有在空间和容错方面,vc都过强了一些,有一些错误可能找不到

  • @ 2009-10-06 00:09:09

    ...

    VS2008不适合OI

    建议用Dev-C++或GUIDE

    内存限制几十兆吧.....

    通常写OI题目不用这么模块化的..

  • 1

信息

ID
1002
难度
7
分类
动态规划 点击显示
标签
递交数
25194
已通过
4368
通过率
17%
被复制
64
上传者