11981 - Corrupted Friendship

All about problems in Volume 119. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
t2faz
New poster
Posts: 2
Joined: Sun Dec 19, 2010 2:19 pm

11981 - Corrupted Friendship

Post by t2faz »

Code: Select all

Removed After AC
Last edited by t2faz on Thu Jun 02, 2011 7:27 am, edited 1 time in total.
yan yan
New poster
Posts: 13
Joined: Thu May 13, 2010 4:16 pm
Location: Viet Nam
Contact:

Re: 11981 TLE :( please help me

Post by yan yan »

i haven't solve it yet but i think 100000*100000 is too large :(

Code: Select all

for(int i=2;i<=nod;i++)
      {
         dfs(i);
         //color[1]=false;
         for(int j=2;j<=nod;j++)
         {
            ...
         }
      }
And there is a recommended in this problem.
Input is huge. So, faster I/O methods (e.g. scanf, printf, BufferedReader, BufferedWriter) are recommended.
p.s: hope it help
Post Reply

Return to “Volume 119 (11900-11999)”