# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
841770 | I_love_Hoang_Yen | Soccer Stadium (IOI23_soccer) | C++17 | 336 ms | 31828 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>
#include "soccer.h"
using namespace std;
struct Row {
int first, last;
int cnt() const {
return last - first + 1;
}
bool contains(const Row& b) const {
return first <= b.first && b.last <= last;
}
bool operator < (const Row& b) const {
return cnt() > b.cnt();
}
};
pair<bool, int> subtask_25p(int n, const vector<vector<int>>& forest) {
int cnt_row = 0; // number of non-empty rows
int first_row = n, last_row = -1;
int total = 0;
vector<Row> rows;
for (int r = 0; r < n; ++r) {
int cnt = 0; // number of empty cells
int first = n, last = -1; // all empty cells should be in [first, last]
for (int c = 0; c < n; ++c) {
if (forest[r][c] == 0) {
++total; ++cnt;
if (first == n) first = c;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |