plz help me find out why test case 9 don't work for my code
my solution is this http://codeforces.me/contest/939/submission/35414707
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
plz help me find out why test case 9 don't work for my code
my solution is this http://codeforces.me/contest/939/submission/35414707
Название |
---|
Can you explain your logic clearly ?
I also failed on the test 9. But my error was different. The time wasn't wrapping around if it was negative.
P.S. — Another advice I'd like to give you is, don't submit 8-9 times in a contest unless you're sure it's correct. You would have gained 100+ rating points if you only submitted C once.
thx ghoshsai5000...so my logic is that find max sum of (f-s) element of array and set first element of that group to 1 according local time and then set it according to first time zone ....
The question asked you to find the minimum value of the time you could assign to the first zone. You have not done that as it is possible to assign a value lower than the value you outputted to get the same number of people to participate.
thx in one of my code i also consider that solutions but instead of tp=s-id[i]; i write tp=s-id[0]; thx any way
If there are multiple possible answers (in terms of participating population), print the minimum one ... I think your code is not doing that.
Whenever you find a segment of as much population size as the total population, check if the answer would be less if you chose this one rather than the other one.
Dear darshankdarji,
Please check the following fix for your code.
35446463
Best wishes