|
|
вернуться в форумMy code AC at POJ , but WA 3 here How funny. I really can not find what had gone wrong in my code. I have already test all the data in the discuss founm. Re: My code AC at POJ , but WA 3 here Послано 3xian 5 фев 2009 20:52 I got AC at POJ, but WA 23 here T_T Re: My code AC at POJ , but WA 3 here 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 Re: My code AC at POJ , but WA 3 here Послано 3xian 5 фев 2009 21:43 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 |
|
|