ENG
RUS
Timus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board
Discussion of Problem
1056
. Centers of the Net
Power_OJ4
Why I get TLE when I use forwards star but AC for vector?
// Problem
1056. Centers of the Net
2 Aug 2011 07:18
// forwards star
int num,adj[10005];
struct edge
{int v,pre;}e[10005];
void insert(int u,int v)
{
e[num].v=v;
e[num].pre=adj[u];
adj[u]=num++;
}
for(i=adj[x];~i;i=e[i].pre)
{
}
Edited by author 02.08.2011 07:19
© 2000–2026
Timus Online Judge Team
. All rights reserved.