|
|
back to boardStrange test #13 when I changed char buf[100]; cin.getline(buf, 100); to char buf[1000]; cin.getline(buf, 1000); I got AC, but problem statement says that polynom's length is no longer than 100 characters. Re: Strange test #13 Because there is a '\0' character in the end of string, so for string with length 100 you should use "char buf[101]". Re: Strange test #13 And, when you use cin.getline() to read a line of max-length 100, you should write: cin.getline(*, 101, '\n'); instead of cin.getline(*, 100, '\n'); |
|
|