| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 94252 | autumn_eel | Bitaro’s Party (JOI18_bitaro) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef pair<int,int>P;
#define B 100
vector<int>E[200000];
set<P>dp[200000];
map<int,int>mp[200000];
int main(){
int n,m,q;cin>>n>>m>>q;
rep(i,m){
int s,t;scanf("%d%d",&s,&t);s--;t--;
E[s].push_back(t);
}
rep(i,n)dp[i].push(P(0,i));
rep(i,n){
for(auto p:dp[i]){
for(int u:E[i]){
if(mp[u][p.second]<=p.first){
dp[u].erase(P(mp[u][p.second],p.second));
mp[u][p.second]=p.first+1;
dp[u].insert(P(mp[u][p.second],p.second));
}
while(mp[u].size()>B)mp[u].erase(mp[u].begin());
}
}
}
rep(i,q){
int t,y;scanf("%d%d",&t,&y);t--;
rep(j,y)
}
}
