为什么会爆内存???
查看原帖
为什么会爆内存???
1341011
mmnBilibili楼主2024/9/17 09:48

本蒟蒻用另一种方法解题,虽然肯定不能全AC,但是我在任务管理器盯了好久内存也没超过75MB,怎么到了512MB就爆掉了呢???

附MLE记录 Code

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cmath>
#include <cctype>

//#include"BetterMath.h"

using namespace std;

int map[20000][20000];

int main() {
	int a, b;
	cin >> a >> b;
	for (int i = 0; i < 20000; i++) {
		for (int j = 0; j < 20000; j++) {
			map[i][j] = i + j;
		}
	}
	cout << map[a][b];
	return 0; 
}
2024/9/17 09:48
加载中...