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 |
为什么一直是output limited exceed啊!那为高手帮忙看看,谢谢了!In Reply To:为什么一直是output limited exceed啊! Posted by:lianxi at 2005-04-22 18:45:34 打击的 ! #include <iostream.h> #include <string.h> int set=1; char get[100][200]; int i, j, k; int count = 0; void fun() { for ( i = 1; i < count; i++ ) { for ( j = i - 1; j >= 0; j-- ) { for ( k = 0; get[i][k] != '\0' && get[j][k] != '\0'; k++) { if ( get[i][k] != get[j][k] ) break; } if ( get[i][k] == '\0' || get[j][k] == '\0' ) { cout << "Set " << set++ << " is not immediately decodable." << endl; count = 0; return; } } } cout << "Set " << set++ << " is immediately decodable." << endl; count = 0; } void main() { while (true) { for ( i = 0; ; i++ ) { cin >> get[i]; if ( strcmp(get[i],"9") == 0 ) { if ( i == 0 ) return; break; } count++; } fun(); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator