# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
922655 |
2024-02-05T21:52:33 Z |
perohero |
Poi (IOI09_poi) |
C++17 |
|
191 ms |
26828 KB |
#include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#include <queue>
#include <stack>
#include <deque>
#include <random>
using namespace std;
template<typename T1, typename T2> inline void chkmin(T1 &a, T2 b) {if (a > b) a = b;}
template<typename T1, typename T2> inline void chkmax(T1 &a, T2 b) {if (a < b) a = b;}
#define files(FILENAME) read(FILENAME); write(FILENAME)
#define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin)
#define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout)
#define all(c) (c).begin(), (c).end()
#define sz(c) (int)(c).size()
#define left left228
#define right right228
#define y1 y1228
#define mp make_pair
#define pb push_back
#define y2 y2228
#define rank rank228
using ll = long long;
using ld = long double;
const string FILENAME = "input";
const int MAXN = 2228;
int n, t, k;
int a[MAXN][MAXN];
int score[MAXN], b[MAXN], cnt[MAXN];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
//read(FILENAME);
cin >> n >> t >> k;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= t; j++) {
cin >> a[i][j];
score[j] += (a[i][j] == 0);
}
}
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= t; j++) {
if (a[i][j] == 1) {
b[i] += score[j];
cnt[i]++;
}
}
}
cout << b[k] << ' ';
int place = 0;
for (int i = 1; i <= n; i++) {
if (i == k) {
continue;
}
if (score[i] > score[k]) {
place++;
continue;
}
if (score[i] == score[k] && cnt[i] > cnt[k]) {
place++;
continue;
}
if (score[i] == score[k] && cnt[i] > cnt[k] && i < k) {
place++;
}
}
cout << place + 1 << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
2516 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
2652 KB |
Output isn't correct |
11 |
Incorrect |
6 ms |
4696 KB |
Output isn't correct |
12 |
Incorrect |
10 ms |
7000 KB |
Output isn't correct |
13 |
Incorrect |
28 ms |
7764 KB |
Output isn't correct |
14 |
Incorrect |
41 ms |
12340 KB |
Output isn't correct |
15 |
Incorrect |
75 ms |
15824 KB |
Output isn't correct |
16 |
Incorrect |
81 ms |
16080 KB |
Output isn't correct |
17 |
Incorrect |
110 ms |
19540 KB |
Output isn't correct |
18 |
Incorrect |
131 ms |
22348 KB |
Output isn't correct |
19 |
Incorrect |
167 ms |
26068 KB |
Output isn't correct |
20 |
Incorrect |
191 ms |
26828 KB |
Output isn't correct |