답안 #950450

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
950450 2024-03-20T10:16:05 Z ALTAKEXE Jelly Flavours (IOI20_jelly) C++14
0 / 100
5 ms 348 KB
#include <bits/stdc++.h>
#define ll long long int
#define f first
#define s second
#define pii pair<int, int>
using namespace std;
int find_maximum_unique(int x, int y, vector<int> a, vector<int> b)
{
    ll n = a.size(), ans = 0;
    vector<pii> v(n);
    for (int i = 0; i < n; i++)
        v.push_back({a[i], b[i]});
    sort(v.begin(), v.end());
    for (int i = 0; i < n; i++)
    {
        for (int j = i + 1; j < n; j++)
        {
            if (v[i].f + v[j].f <= x)
                ans += 2;
        }
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = i + 1; j < n; j++)
        {
            if (v[i].s + v[j].s <= y)
                ans += 2;
        }
    }
    return ans / n / 2;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '7', found: '9'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '7', found: '9'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 344 KB 1st lines differ - on the 1st token, expected: '689', found: '1948'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 348 KB 1st lines differ - on the 1st token, expected: '62', found: '1935'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 348 KB 1st lines differ - on the 1st token, expected: '154', found: '1958'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '7', found: '9'
3 Halted 0 ms 0 KB -