# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
887491 | islam998 | Table Tennis (info1cup20_tabletennis) | C++17 | 45 ms | 11284 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>
#include <ext/pb_ds/assoc_container.hpp>
#define ll long long
#define endl "\n"
#define nots0fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define vl vector<ll>
#define vi vector<int>
#define pll pair<ll,ll>
#define fi first
#define se second
#define pb push_back
#define in insert
#define size(y) (int)y.size()
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(),v.rend()
#define INF 1e9+31
#define MAX 151000
#define MOD 1000000007
using namespace std;
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,
tree_order_statistics_node_update> indexed_set;
vl v(MAX),pre(MAX);
void solve(){
ll n, k, l, r, sum = 0, dnt = 0;
cin >> n >> k;
multiset<ll>ms;
for(int i = 1; i <= n + k; i++){
cin >> v[i];
sum += v[i];
}
for(int i = 1; i <= n + k; i++){
sum-=v[i];
if(sum % (n / 2) == 0){
dnt = i;
break;
}
sum += v[i];
}
for(int i = 1; i <= n + k; i++){
if(i != dnt){
ms.in(v[i]);
}
}
for(auto &i : ms){
cout << i << " ";
}
}
int main(){
nots0fast
ll test = 1;
///cin >> test;
for(int tst = 0; tst < test; tst++){
solve();
cout << "\n";
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |