| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1000114 | Andrey | 9월 (APIO24_september) | C++17 | 2 ms | 4956 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "september.h"
#include<bits/stdc++.h>
using namespace std;
vector<int> haha[200001];
int solve(int N, int M, std::vector<int> F, std::vector<std::vector<int>> S) {
int n = N,m = M;
for(int i = 0; i <= n; i++) {
haha[i].clear();
}
for(int i = 1; i < n; i++) {
haha[F[i]].push_back(i);
}
vector<int> p(n+1);
for(int i = 0; i < n-1; i++) {
for(int j = 0; j < m; j++) {
p[S[j][i]] = max(p[S[j][i]],i);
}
}
int y = 0,ans = 0;
for(int i = 0; i < n-1; i++) {
for(int j = 0; j < m; j++) {
int a = S[j][i];
y = max(y,p[a]);
for(int v: haha[a]) {
y = max(y,p[v]);
}
}
if(y <= ans) {
ans++;
}
}
return ans;
}
| # | 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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
