# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
316754 | ant101 | Popeala (CEOI16_popeala) | C++14 | 321 ms | 9704 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int points[20001], prv[20001][51], best[51], dp[20001][51];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, t, s;
cin >> n >> t >> s;
for (int i = 1; i <= t; i++) {
cin >> points[i];
points[i] += points[i - 1];
}
for (int j = 1; j <= n; j++) {
string solved;
cin >> solved;
for (int i = 0; i < solved.size(); i++) {
if (solved[i] == '1') prv[i + 1][j] = prv[i][j];
else prv[i + 1][j] = i + 1;
}
}
for (int i = 1; i <= t; i++) {
prv[i][0] = i;
sort(prv[i], prv[i] + n + 1);
}
memset(dp, 0x3f, sizeof dp);
dp[0][0] = 0;
for (int j = 1; j <= s; j++) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |