Submission #950446

# Submission time Handle Problem Language Result Execution time Memory
950446 2024-03-20T10:14:32 Z ALTAKEXE Jelly Flavours (IOI20_jelly) C++14
0 / 100
5 ms 464 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;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '8', found: '144'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '8', found: '144'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 344 KB 1st lines differ - on the 1st token, expected: '689', found: '7593304'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 348 KB 1st lines differ - on the 1st token, expected: '62', found: '7492320'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 464 KB 1st lines differ - on the 1st token, expected: '154', found: '7671444'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '8', found: '144'
2 Halted 0 ms 0 KB -