C++ 全TLE了QAQ
查看原帖
C++ 全TLE了QAQ
1548084
FuRuoChen楼主2025/8/4 16:01

我就是用了两个函数嘛,怎么就成TLE战神了QAQ

#include<bits/stdc++.h>
using namespace std;
int classic(int x,int y,int z)
//传统 
{
	if((x<60 and y>=60 and z>=60) or (x>=60 and y<60 and z>=60) or (x>=60 and y>=60 and z<60))
		cout<<"PASS"<<endl;
	else
		cout<<"FAIL"<<endl;
}
int unique(int i,int j,int k,int l,int m,int n)
//特色 
{
	if((i*l+j*m+k*n)/(l+m+n)>=60)
		cout<<"PASS"<<endl;
	else
		cout<<"FAIL"<<endl;
}
int main()
{
	int a,b,c,d,e,f;
	//题目需要
	cin>>a>>b>>c>>d>>e>>f;
	classic(a,b,c);
	unique(a,b,c,d,e,f);
	return 0;
}
2025/8/4 16:01
加载中...