답안 #150316

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
150316 2019-09-01T08:07:46 Z distutpia(#3780, cblimmm, wooks1998) 최적의 팀 구성 (FXCUP4_squad) C++17
0 / 100
3000 ms 10872 KB
#include "squad.h"
int siz;
std::vector<int> A1;
std::vector<int> D1;
std::vector<int> P1;
void Init(std::vector<int> A, std::vector<int> D, std::vector<int> P){
	int N = A.size();
	siz=N;
	A1=A;
	D1=D;
	P1=P;
}

long long BestSquad(int X, int Y){
	long long int ans=0;
	for(int i=0; i<siz; i++){
		for(int j=0; j<siz; j++){
			if(i==j){
				continue;
			}
			if(ans<(long long)(A1[i]+D1[j])*(long long)X+(long long)(P1[i]+P1[j])*(long long)Y){
				ans=(long long)(A1[i]+D1[j])*(long long)X+(long long)(P1[i]+P1[j])*(long long)Y;
			}
		}
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 8 ms 384 KB Output is correct
3 Execution timed out 3100 ms 10872 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Execution timed out 3099 ms 504 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 8 ms 384 KB Output is correct
3 Execution timed out 3100 ms 10872 KB Time limit exceeded
4 Halted 0 ms 0 KB -