Android 不能返回 parent Activity 的问题
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的横坐标都不相同呢?
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。