|
|
back to boardHow funny. I really can not find what had gone wrong in my code. I have already test all the data in the discuss founm. I got AC at POJ, but WA 23 here T_T 3xian is an ACMER from GDUT? Isn't it? haha OH, I know. While reading data, dealing with string, must use: for(i = 0; i < strlen(str); i++) { XXXXXXX } if use: i = 0; while(str[i]) { i++; } will WA 32 It takes me two days to find this fault. Edited by author 05.02.2009 21:26 Edited by author 05.02.2009 21:26 Edited by author 05.02.2009 21:28 I know what had happened~ When we convert 'char' that ASCII larger than 127 into 'int', we will get negative integer but not the original number. Edited by author 05.02.2009 21:51 |
|
|