Submission #962577

#TimeUsernameProblemLanguageResultExecution timeMemory
962577starchanPoi (IOI09_poi)C++17
0 / 100
195 ms31736 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define in array<int, 2> #define f first #define s second #define pb push_back #define pob pop_back #define INF (int)1e17 #define MX (int)3e5+5 #define fast() ios_base::sync_with_stdio(false); cin.tie(NULL) signed main() { fast(); int n, t, p; cin >> n >> t >> p; int pp[n][t]; for(int i = 0; i < n; i++) { for(int j = 0; j < t; j++) cin >> pp[i][j]; } in a[t]; for(int i = 0; i < t; i++) { a[i][0] = 0; a[i][1] = i; for(int j = 0; j < n; j++) { int ppp = pp[j][i]; a[i][0]-=ppp; } } sort(a, a+t); for(int i = 0; i < t; i++) { if(a[i][1] == (p-1)) { cout << (-a[i][0]) << " " << (i+1) << "\n"; return 0; } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...