玄学代码
查看原帖
玄学代码
916276
b9113fced86a32cad0d8楼主2024/10/23 09:58

这个代码会随机产生WA或者RE(一般RE的概率比较大)有没有大佬看看是怎么个事

#include<iostream>
#include<thread>
using namespace std;

int a,b;

void f(){
    while(true) a++;
}

int main(){
	cin>>a>>b;
	while(true) thread t(f);
	cout<<a + b;
	return 0;
}
2024/10/23 09:58
加载中...