| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1367950 | nathlol2 | September (APIO24_september) | C++20 | 1 ms | 344 KiB |
#include "september.h"
#include <bits/stdc++.h>
using namespace std;
int solve(int N, int M, std::vector<int> F, std::vector<std::vector<int>> S) {
vector<vector<int>> deg(N, vector<int>(M));
for(int i = 1;i<N;i++){
for(int j = 0;j<M;j++) deg[F[i]][j]++;
}
int ans = 0;
for(int i = 0;i<N - 1;i++){
bool bigf = 1;
for(int k = 0;k<M;k++){
if(deg[S[k][i]][k] == 0){
int u = S[k][i];
while(F[u] != 0 && --deg[F[u]][k] == 0){
u = F[u];
}
}
bool f = 1;
for(int j = 0;j<=i;j++) f &= (deg[S[k][j]][k] == 0);
bigf &= f;
}
if(bigf) ++ans;
}
return ans;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
