请问有人知道为什么下面代码只能拿30吗? 谢谢!!!!!!!!!
#include <iostream>
#include <cstring>
#include <fstream>
using namespace std;
bool _hash[10086];
int _maxi;
int _res = 0;
int _myList[10086];
void CParseIn () {
memset(_hash, false, sizeof(_hash));
cin >> _maxi;
for (int i = 0; i < _maxi; i ++) {
cin >> _myList[i];
_hash[_myList[i]] = true;
}
}
void ParseIn () {
memset(_hash, false, sizeof(_hash));
ifstream inFile ("P2141.in");
inFile >> _maxi;
for (int i = 0; i < _maxi; i ++) {
inFile >> _myList[i];
_hash[_myList[i]] = true;
}
inFile.close();
}
void Core () {
for (int i = 0; i < _maxi; i ++) {
for (int m = i + 1; m < _maxi; m ++) {
if (_hash[_myList[i] + _myList[m]]) {
_res ++;
}
}
}
cout << _res << endl;
}
int main () {
CParseIn();
Core();
return 0;
}