http://codeforces.com/problemset/problem/311/A
If we ignore "break", tot will be up to
.
Consider whether we can make such inequality d ≤ p[j].x - p[i].x is always false. The obvious way is to make all points' x coordinates the same(WTF!!!). And we can just choose n distinct numbers to be all points' y coordinate.
Thus the problem is solved.
#include<cstdio>
int main()
{
int n, k;
scanf("%d%d", &n, &k);
if (k >= n * (n - 1) / 2) puts("no solution");
else for (int i = 1; i <= n; i++) printf("0 %d\n", i);
return 0;
}
【扩展】
如果要求每个x的横坐标都不相同呢?
CodeForces 311A 解题报告

本文提供了一种解决 CodeForces 311A 问题的方法,通过设定所有点的 x 坐标相同并选择 n 个不同的 y 坐标来避免特定条件成立。此外还探讨了当 x 坐标各不相同时的解题思路。
811

被折叠的 条评论
为什么被折叠?



