# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
949181 | vjudge1 | Best Place (NOI17_bestplace) | C++17 | 32 ms | 2136 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;
#define int long long
#define pb push_back
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define sz(v) (int)v.size()
const int INF = 1e18;
const int mod = 998244353;
const int N = 1e5+5;
void solve(){
int n; cin >> n;
vector<int> x(n), y(n);
for(int i = 0; i < n; i++){
cin >> x[i] >> y[i];
}
int l = 0, r = 1e9;
int xans = 0;
while(l <= r){
int m1 = l + (r - l) / 3;
int m2 = r - (r - l) / 3;
int res1 = 0, res2 = 0;
for(int i = 0; i < n; i++){
res1 += abs(m1 - x[i]);
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... |