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

不作死就不会死。。异想天开地用了short数组存号码的出现次数就一直WA

Posted by BENCJL at 2015-08-02 00:04:25 on Problem 1002
其实int类型开10000000也不会爆内存啊。真是异想天开了,还去纠结duplicate.后面有没有空格。。。还是太菜了。
一开始是用链表来存号码,而且号码是用string来存的,居然写了上百行,然后TLE了。还是数组好,号码也没必要用string代表,直接用数字代表妥妥的。
还要感谢大神的WA指南,我一开始也没注意号码开头为0的情况,想当然地以为是1以上的数字开头。字符串长度我开了50是可以的。

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