自己测试没bug,提交后就显示编译错误,求助
查看原帖
自己测试没bug,提交后就显示编译错误,求助
1453183
hzy0928楼主2024/10/19 09:43
#include <bits/stdc++.h>
using namespace std;
struct a{
	int p;
	int q;
}t[1000000000000000000];
bool cmp(a x , a y){
	return x.p > y.p;
}
int k,n[100005],d[100005],e[100005]; 
int main() {
	cin >> k;
	for(int i = 0;i < k;i++){
		cin >> n[i] >> d[i] >> e[i];
		for(int j = 0;j < n[i];j++){
			for(int k = 0;k < sqrt(e[i] * d[i]);k++){
				if(n[i] == j * k){
					t[i].p = j;
					t[i].q = k;
				}
				if(t[i].p >= t[i].q){
					cout << t[i].q;
					cout << endl << t[i].p;
				}else{
					cout << t[i].p;
					cout << endl << t[i].q;
				}
			}
		}
		if(t[i].p == 0 && t[i].q == 0){
			cout << "NO";
		}
	}

	return 0;
}
2024/10/19 09:43
加载中...