# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
779117 |
2023-07-11T08:04:11 Z |
vjudge1 |
Cipele (COCI18_cipele) |
C++17 |
|
817 ms |
4852 KB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define faster ios_base::sync_with_stdio(false);cin.tie(NULL);
#define OYY 1000000005
#define mod 998244353
vector <int> v,t;
int32_t main(){
faster
int n,m;cin>>n>>m;
int deg;
for(int i=0;i<n;i++){
cin>>deg;
v.push_back(deg);
}
for(int i=0;i<m;i++){
cin>>deg;
t.push_back(deg);
}
v.push_back(0),t.push_back(0);
sort(v.begin(),v.end());
sort(t.begin(),t.end());
v.push_back(0),t.push_back(0);
if(m<n){
swap(v,t);
swap(n,m);
}
int maxi=0;
for(int i=0;i<n;i++){
int c=lower_bound(t.begin(),t.end(),v[i])-t.begin();
//cout<<c<<endl;
maxi=max(maxi,abs(v[i]-t[c]));
t.erase(t.begin()+c);
}
cout<<maxi<<'\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
770 ms |
2640 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
817 ms |
4836 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
3 ms |
428 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
3 ms |
980 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
340 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
912 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
479 ms |
4796 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
590 ms |
4780 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
479 ms |
4852 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |