Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

TLE~~~T得我无言了~~

Posted by trueshlqsh at 2007-12-30 17:11:26 on Problem 3476
我的算法是:用数组模拟指针链表来做的……
初始化时O(N)的,问题就出在这里……
我自己跑的时候就是初始化出问题,不知道是读入耗时还是初始化处理耗时…………
我用SCANF,CIN都莫法……后面的CUT和CONNECT是秒杀的……自己测试了N多数据都是这样,前面初始化状态压缩要超时:(

感觉的确是O(N)的啊……就是1个1个字符进队,直到和队里的字符不一样了就把开始那串处理好的整体赶出队,重新排队……

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator