|
|
There's negative numbers, that's mean if you're solving problem with C++, remainder will be calculating wrong +1 Just use Dirichlet's principle. 1) 1 1 1 5 5 0 0 2 2 0 10 => OK 3 2) 2 1 1 2 2 -1 5 0 0 0 1 100 0 0 100 54 45 67 76 99 99 => OK 2 4 3) 2 1 2 3 4 5 6 7 8 9 10 11 12 -13 -14 -15 -16 -17 -18 -19 -20 => OK 1 2 В задаче, кстати, нифига не понятен случай n=1,т.к. понятие УВАЖЕНИЯ введено для ПАР. Но в тестах подразумевается, что человек сам себя уважает(хотя пары для него нет). This problem is very easy, try to solve it when 4 * (n-1) + 1 points are given. Another hint: imagine if you got n points and you could cheat and make them all respect each other by stretching or compressing the coordinate grid (while keeping the points static); what would be the simplest way to transform the grid? In this problem you can't cheat like that, but on the other hand you only need to have n/5 points work together. Edited by author 21.03.2009 12:03 The following code really got AC! Thanks to Zhukov Dmitry. Just no comment... #include <cstdio> int n; int main() { scanf("%d", &n); puts("OK"); for(int i = 0; i < n; i++) { printf("1 "); } return 0; } Edited by author 15.03.2009 20:04 The checker program is fixed. All submits were rejudged. Oh shit! I'd lost my first place :) re.Thanks. #include <cstdio> int n; int main() { scanf("%d", &n); puts("OK"); for(int i = 0; i < n; i++) { printf("1 "); } return 0; } If this really works, then, I think, admins should rewrite checker for the problem... Can anyone give a hint? Since the N is so big,I have not idea... Think a bit. The problem is really beatiful. |
|
|