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

Re:发现1002一个陷阱:号码数组长度不足(提供测试数据一组)

Posted by JiangDLing at 2013-04-18 15:08:02
In Reply To:发现1002一个陷阱:号码数组长度不足(提供测试数据一组) Posted by:fjnplx at 2013-02-12 02:59:07
> 题目给定的数据最长只有15字符(-4-8-7-3-2-7-9-),
> 如果为节省空间开辟数组char num[MAX][16];则WA。
> 而开辟char num[MAX][100];则通过。
> 
> 所以可以据此提供测试数据如下:
> 
> INPUT:
> 
> 2
> 12345--------------------------67
> 1234567
> 
> OUTPUT:
> 
> 123-4567 2

c的果然每题都坑数组

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