#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;
}
# |
결과 |
실행 시간 |
메모리 |
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 |
- |
# |
결과 |
실행 시간 |
메모리 |
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 |
- |
# |
결과 |
실행 시간 |
메모리 |
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 |
- |
# |
결과 |
실행 시간 |
메모리 |
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 |
- |
# |
결과 |
실행 시간 |
메모리 |
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 |
- |
# |
결과 |
실행 시간 |
메모리 |
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 |
- |