# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99769 | choikiwon | Gift (IZhO18_nicegift) | C++17 | 1240 ms | 94532 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<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MN = 1000010;
int N, K;
priority_queue<pair<ll, int> > pq;
vector<vector<int> > S;
vector<ll> X;
int main() {
std::ios::sync_with_stdio(false);
cin >> N >> K;
//N = 1000, K = 20;
ll sum = 0;
for(int i = 0; i < N; i++) {
ll t; cin >> t;
//ll t = 100;
pq.push({t, i});
sum += t;
}
if(sum % K) {
cout << -1;
return 0;
}
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... |