# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
171308 | emil_physmath | Gift (IZhO18_nicegift) | C++17 | 1389 ms | 102676 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <cmath>
#include <map>
#include <set>
using namespace std;
typedef double ldouble;
typedef long long llong;
const int maxN = 100001;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n, k;
cin >> n >> k;
vector<llong> arr(n);
priority_queue<pair<llong, int>> a;
llong mx = -1, sum = 0;
for (int i = 0; i < n; ++i)
{
cin >> arr[i];
sum += arr[i];
mx = max(mx, arr[i]);
a.push({arr[i], i});
}
if (sum % k || mx > sum / k)
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |