제출 #1247035

#제출 시각아이디문제언어결과실행 시간메모리
1247035PlayVoltzMed (COCI22_med)C++20
50 / 50
1 ms328 KiB
#include <cstdio> #include <stdio.h> #include <stdbool.h> #include <iostream> #include <map> #include <vector> #include <climits> #include <stack> #include <string> #include <queue> #include <algorithm> #include <set> #include <unordered_set> #include <unordered_map> #include <cmath> #include <cctype> #include <bitset> #include <iomanip> #include <cstring> #include <numeric> #include <cassert> #include <random> #include <chrono> #include <fstream> using namespace std; #define int long long #define pii pair<int, int> #define mp make_pair #define pb push_back #define fi first #define se second int32_t main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin>>n; vector<pair<string, int> > vect(n); for (int i=0, a, b, c, d, e; i<n; ++i)cin>>vect[i].fi>>a>>b>>c>>d>>e, vect[i].se=a+b+c+d+e; for (int i=0; i<n; ++i){ int low=0, high=0; for (int j=0; j<n; ++j){ if (vect[i].se>vect[j].se+500)++low; else if (vect[i].se==vect[j].se+500&&vect[i].fi<vect[j].fi)++low; if (vect[i].se+500>vect[j].se)++high; else if (vect[i].se+500==vect[j].se&&vect[i].fi<vect[j].fi)++high; } cout<<n-high+1<<" "<<n-low<<"\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...