답안 #832378

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
832378 2023-08-21T09:50:24 Z Liudas 십자가 놓기 (FXCUP4_cross) C++17
8 / 100
51 ms 10352 KB
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
struct cross{
    int i, o;
    long long s;
};
long long SelectCross(int K, vector<int> I, vector<int> O){
    int N = I.size();
    vector<cross> arr(N);
    for(int i = 0; i < N;  i++){
        arr[i] = {I[i], O[i], 1ll * I[i] * O[i] * 2 - 1ll * I[i] * I[i]};
    }
    sort(arr.begin(), arr.end(), [](cross a, cross b){return a.s < b.s;});
    return arr.back().s;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 3 ms 952 KB Output is correct
6 Correct 49 ms 10352 KB Output is correct
7 Correct 50 ms 10344 KB Output is correct
8 Correct 51 ms 10328 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 3 ms 952 KB Output is correct
6 Correct 49 ms 10352 KB Output is correct
7 Correct 50 ms 10344 KB Output is correct
8 Correct 51 ms 10328 KB Output is correct
9 Incorrect 0 ms 296 KB Output isn't correct
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 3 ms 952 KB Output is correct
6 Correct 49 ms 10352 KB Output is correct
7 Correct 50 ms 10344 KB Output is correct
8 Correct 51 ms 10328 KB Output is correct
9 Incorrect 0 ms 296 KB Output isn't correct
10 Halted 0 ms 0 KB -