# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
365811 | 2021-02-12T12:17:33 Z | fadi57 | Table Tennis (info1cup20_tabletennis) | C++14 | 121 ms | 10092 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mx=100005; const int mod= 1e9+7 ; const ll inf=1e12+4; //***while there is life there is hope int n,k; int main() { //ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); cin>>n>>k; int nteams=n/2; map<int,int>mp;ll sum=0; ll a[n+k+5]; for(int i=0;i<n+k;i++){ cin>>a[i];sum+=a[i]; mp[a[i]]++; } int ans=0; /* 4 1 1 2 5 6 100 1 2 5 6 100 */ int can=-1; for(int i=4;i<n+k;i++){ int sum2=sum-a[i]; mp[a[i]]=0; int target=sum2/nteams;int ok=1; if(sum2%nteams!=0){continue;}else{ int f=0;int en=n+k-1; for(int j=0;j<nteams;j++){ if(f==i){f++;} if(en==i){en--;} // cout<<f<<" "<<en<<" "<<a[f]+a[en]<<endl; if(a[f]+a[en]!=target){ok=0;break;} f++;en--; } if(ok){can=i;}break;; } } for(int i=0;i<n+k;i++){ if(i!=can){cout<<a[i]<<" ";} } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 492 KB | Output does not have symmetry property |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 19 ms | 1644 KB | Output does not have symmetry property |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 121 ms | 10092 KB | Output does not have symmetry property |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 364 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 364 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |