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 |
输入问题想了半天终于决定这样。。int n; string s; char ss[100]; cin >> n; for (int i=2;i<=n;i++) { for (int j=1;j<=i-1;j++) { cin >> s; memset(ss,'a',sizeof(ss)); if (s=="x") a[i][j]=999999999; else { for (unsigned int k=0;k<=s.size()-1;k++) ss[k]=s[k]; a[i][j]=atof(ss); } } } 试验成功- - Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator