| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1356066 | Toto | 9월 (APIO24_september) | C++20 | 51 ms | 5740 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<int> mpos(n+1,-1);
for(int i=0;i<m;i++){
for(int j=0;j<n-1;j++){
mpos[s[i][j]]=max(mpos[s[i][j]],j);
}
}
vector<int> w = mpos;
for(int i=n-1;i>=1;i--){
int p=f[i];
if(p>0){
w[p]=max(w[p],w[i]);
}
}
int pos=0,ans=0;
for(int i=0;i<n-1;i++){
pos=max(pos,w[s[0][i]]);
if(i==pos){
ans++;
//cout << i << '\n';
}
}
return ans;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
