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

G++: I have not change my program logic and solved TLE and WA

Posted by lxr473290 at 2014-05-25 21:03:02 on Problem 1002
G++: I have not change my program logic and solved TLE and WA.
WA:
	1. When using integer representing phone number, not present leading zero.
		Test case:
		4
		0000000
		0000000
		0011001
		0011001
	2. "No duplicates."
		Test case:
		1
		0000000
TLE:
	1. Do not use map<string, int> or set<> to store phone book.
	2. I/O is significant. Try using printf/scanf not cout/cin.
	3. String processing is significant. Do not use istringstream/ostringstream even string, use char* instead.
	4. Check your alg first in (finding and sorting), then in (inserting and deleting). Their complexity and Times invoked is crucial.
	  

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