Submission #949021

#TimeUsernameProblemLanguageResultExecution timeMemory
949021anotherPROgrammerBest Place (NOI17_bestplace)C++14
3 / 100
54 ms1364 KiB
#include <iostream> #include <vector> #include <cmath> using namespace std; int main() { int n; cin >> n; vector<int> x_coordinates(n); vector<int> y_coordinates(n); // Input coordinates of participants for (int i = 0; i < n; ++i) { cin >> x_coordinates[i] >> y_coordinates[i]; } // Calculate the sum of x and y coordinates separately int sum_x = 0, sum_y = 0; for (int i = 0; i < n; ++i) { sum_x += x_coordinates[i]; sum_y += y_coordinates[i]; } // Find the average coordinates int avg_x = round(static_cast<double>(sum_x) / n); int avg_y = round(static_cast<double>(sum_y) / n); // Output the average coordinates cout << avg_x << " " << avg_y << endl; return 0; }
#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...