| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
sscanf好好用啊先用scanf读入一个字符串,遇到空格停止读入,再用sscanf读入根节点和儿子节点的数目。
如0:(1) 1
scanf("%s", str);
此时str为0:(1), 再sscanf(str, "%d:(%d", &root, &num);
root = 0, num = 1; ok!
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator