首页 > 移动平台 > 详细

Android 不能返回 parent Activity 的问题

时间:2014-03-15 17:38:42      阅读:599      评论:0      收藏:0      [点我收藏+]

http://codeforces.com/problemset/problem/311/A


If we ignore "break", tot will be up to bubuko.com,布布扣.

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的横坐标都不相同呢?

Android 不能返回 parent Activity 的问题,布布扣,bubuko.com

Android 不能返回 parent Activity 的问题

原文:http://blog.csdn.net/zhouzme/article/details/21281139

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!