Submission #507154

#TimeUsernameProblemLanguageResultExecution timeMemory
507154onebit1024Best Place (NOI17_bestplace)C++17
3 / 100
65 ms3772 KiB
#include <bits/stdc++.h> using namespace std; #define int double #define pb push_back #define sz size #define all(c) c.begin(), c.end() int sum() { return 0; } template <typename... Args> int sum(int a, Args... args) { return a + sum(args...); } string bin(long n) { long i; string val = "0"; for (i = 1 << 30; i > 0; i = i / 2) { if ((n & i) != 0) { val += "1"; } else { val += "0"; } } while (val.front() == '0') { val.erase(0, 1); } return val; } void print() { cout << endl; }; template <typename T, typename... Args> void print(T one, Args... rest) { cout << one << " "; print(rest...); } void read(){}; template <typename T, typename... Args> void read(T &one, Args &...rest) { cin >> one; read(rest...); } template <typename T> void output_vec(vector<T> &v) { for (auto x : v) { cout << x << " "; } cout << endl; } template <typename one, typename two> void output_map(map<one, two> &mp) { for (auto itr = mp.begin(); itr != mp.end(); ++itr) { cout << itr->first << " " << itr->second << endl; } } template <typename T> void output_set(set<T> &s) { for (auto x : s) { cout << x << " "; } cout << endl; } void solve() { int n; cin >> n; vector<pair<int,int>> arr(n); int sum = 0; int sum2 = 0; for(int i=0;i<n;++i) {cin >> arr[i].first >> arr[i].second;sum+=arr[i].second;sum2+=arr[i].first;} cout << (int32_t)(sum2/n) << " " <<(int32_t)(sum/n) << endl; } int32_t main() { cout.tie(NULL); ios_base::sync_with_stdio(false); solve(); }
#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...