simplex_automaton @ 2024-09-27 10:54:05
RT,莫名其妙MLE了
#include <bits/stdc++.h>
int a, b;
int PLUS(int &a, int b){ a += b; }
int main()
{
scanf("%d %d", &a, &b);
PLUS(a, b);
printf("%d\n", a);
return 0;
}
by ab6666 @ 2024-09-29 07:20:57
你为什么要给函数里的“int a;”加上取地址符(&)?????????????????????????????????????????????????????????????????????
by ab6666 @ 2024-09-29 07:22:35
我用了高精度
by bcbgszyzh @ 2024-10-01 16:04:13
@simplex_automaton int 改为 void
by yzm0325 @ 2024-10-02 14:23:51
@hyh2013 为什么
by simplex_automaton @ 2024-10-02 16:55:43
@hyh2013 这是什么意思啊??????我看好多dalao都这么写
by Florrer_A @ 2024-10-03 20:27:46
@hyh2013 @zym0325 @simplex_automaton 不用加
using namespace std;
因为
by Florrer_A @ 2024-10-03 20:28:33
@ab6666 因为这次函数的调用会是
by complexer @ 2024-10-04 14:42:12
/bx/bx/bx
by 1234567890regis @ 2024-10-04 14:46:23
我也 MLE 了。。。Cu
#include <bits/stdc++.h>
using namespace std;
vector<void*> vec;
int main()
{
while (true) vec.push_back(malloc(10000));
int a, b;
cin >> a >> b;
int cnt = 0;
for(int i=0;i<a+b;i++) cnt++; cout << cnt;
}
by yzm0325 @ 2024-10-04 15:16:03
@simplex_automaton 6,大佬写 A+B 用树剖你也用?得明白原理