Submission #328430

# Submission time Handle Problem Language Result Execution time Memory
328430 2020-11-16T14:30:29 Z israeladewuyi Poi (IOI09_poi) C++17
0 / 100
331 ms 23840 KB
#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
#define PB push_back
#define pb pop_back
 
 
 
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n, t, p; cin>>n>>t>>p;
	
	int arr[n][t];
	for(int i = 0; i < n; i++){
		for(int j = 0; j < t; j++){
			cin >> arr[i][j];
		}
	}
	vi v,w;
	for(int i = 0; i < t; i++){
		int nu = 0;
		for(int j = 0; j < n; j++){
			if(arr[j][i] == 0) nu++;
		}
		v.PB(nu);
	}
	for(int i = 0; i < n ; i++){
		int tt = 0;
		for(int j = 0; j < t; j++){
			int t;
			t = arr[i][j] * v[j];
			tt += t;
		}
		w.PB(tt);
	}
	int score = w[p - 1];
	cout<<score<<" ";
	sort(w.begin(), w.end());
	for(int i = 0; i < n; i++){
		if(w[i] == score){
			cout<<i + 1;
			exit(0);
		}
	} 
	return 0;
}
 
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Incorrect 1 ms 364 KB Output isn't correct
4 Incorrect 1 ms 364 KB Output isn't correct
5 Incorrect 1 ms 364 KB Output isn't correct
6 Incorrect 1 ms 364 KB Output isn't correct
7 Incorrect 1 ms 364 KB Output isn't correct
8 Incorrect 1 ms 364 KB Output isn't correct
9 Incorrect 2 ms 364 KB Output isn't correct
10 Incorrect 3 ms 492 KB Output isn't correct
11 Incorrect 10 ms 1004 KB Output isn't correct
12 Incorrect 17 ms 1516 KB Output isn't correct
13 Incorrect 47 ms 3820 KB Output isn't correct
14 Incorrect 66 ms 5356 KB Output isn't correct
15 Incorrect 118 ms 9196 KB Output isn't correct
16 Incorrect 128 ms 10092 KB Output isn't correct
17 Incorrect 187 ms 14444 KB Output isn't correct
18 Incorrect 216 ms 16364 KB Output isn't correct
19 Incorrect 289 ms 21612 KB Output isn't correct
20 Incorrect 331 ms 23840 KB Output isn't correct