Submission #482060

#TimeUsernameProblemLanguageResultExecution timeMemory
482060shark25361Best Place (NOI17_bestplace)C++14
20 / 100
86 ms2336 KiB
#include<bits/stdc++.h> using namespace std; #define FIO ios_base::sync_with_stdio(false);cin.tie(0); #define ll long long int #define for_t ll T;cin>>T;while(T--) #define endl "\n" #define rep(n) for(int i=0;i<n;i++) #define F(a,b) for(ll i=a;i<b;i++) #define FR(i,a,b) for(int i=a;i>=b;i--) #define vi vector<int> #define vll vector<ll> #define vvi vector < vi > #define pii pair<int,int> #define pll pair<long long, long long> #define mod 1000000007 #define inf 1000000000000000001 #define all(c) c.begin(),c.end() #define mp(x,y) make_pair(x,y) #define mem(a,val) memset(a,val,sizeof(a)) #define pb push_back #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set tree<pair<int,int>,null_type,less<pair<int,int>>,rb_tree_tag,tree_order_statistics_node_update> ll highestPowerof2(ll n) { ll res = (ll)log2(n); return (ll)pow(2,res); } void sol() { int n; cin >> n; vector<int> x,y; int tempx,tempy; for(int i = 0;i < n;i++) { cin >> tempx >> tempy; x.pb(tempx); y.pb(tempy); } sort(all(x)); sort(all(y)); int ansx = (x[ceil(x.size()/2) - 1] + x[floor(x.size()/2) + 1])/2; int ansy = (y[ceil(y.size()/2) - 1] + y[floor(y.size()/2) + 1])/2; cout << ansx << " " << ansy; } int main() { sol(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...