# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
963085 |
2024-04-14T13:34:23 Z |
coolboy19521 |
Poi (IOI09_poi) |
C++17 |
|
390 ms |
39792 KB |
# include <bits/stdc++.h>
namespace ddr {
# define bpc(bt) __builtin_popcountll(bt)
# define bcl(bt) __builtin_clz(bt)
# define alr(v) rbegin(v), rend(v)
# define all(v) begin(v), end(v)
# define si(v) ((ll)v.size())
# define mp make_pair
# define pb push_back
# define ins insert
# define se second
# define fi first
template <class T, size_t N> using ar = std::array <T, N>;
template <class T, class U> using pi = std::pair <T, U>;
template <class T> using pq = std::priority_queue <T>;
template <class T> using mt = std::multiset <T>;
template <class T> using ve = std::vector <T>;
template <class T> using qu = std::queue <T>;
typedef std::string str;
typedef long long ll;
typedef bool bo;
typedef char ch;
using namespace std;
const ll inf = 1e18 + 18;
}
using namespace ddr;
const ll sz = 3e5 + 15;
const ll sm = 2e3 + 6;
ll n, t, p, i, j;
ll c[sm][sm];
int main() {
cin.tie(nullptr) -> sync_with_stdio(false);
cin >> n >> t >> p;
ve <ar <ll, 3>> r;
map <ll, ll> cs;
for (i = 1; i <= n; i ++) {
ll sp = 0;
for (j = 1; j <= t; j ++) {
cin >> c[i][j];
if (c[i][j]) {
cs[j] ++;
sp ++;
}
}
r.pb({0, -sp, -i});
}
for (ar <ll, 3>& k : r) {
ll po;
po = 0;
for (j = 1; j <= t; j ++) {
if (c[-k[2]][j]) {
po += n - cs[j];
}
}
k[0] = po;
}
sort(alr(r));
for (i = 0; i < n; i ++) {
if (p == -r[i][2]) {
cout << r[i][0] << ' ' << 1 + i << '\n';
break;
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
464 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
2396 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
2396 KB |
Output isn't correct |
10 |
Correct |
3 ms |
4700 KB |
Output is correct |
11 |
Correct |
13 ms |
6972 KB |
Output is correct |
12 |
Correct |
25 ms |
9000 KB |
Output is correct |
13 |
Incorrect |
54 ms |
13916 KB |
Output isn't correct |
14 |
Incorrect |
87 ms |
18588 KB |
Output isn't correct |
15 |
Incorrect |
140 ms |
24148 KB |
Output isn't correct |
16 |
Correct |
158 ms |
24536 KB |
Output is correct |
17 |
Correct |
247 ms |
30036 KB |
Output is correct |
18 |
Correct |
262 ms |
32592 KB |
Output is correct |
19 |
Correct |
359 ms |
39004 KB |
Output is correct |
20 |
Correct |
390 ms |
39792 KB |
Output is correct |