CodeForces 312C The Closest Pair(构造)
来源:互联网 发布:淘宝男装 知乎 编辑:程序博客网 时间:2024/06/06 01:17
题意:给你一个程序,要求让你出一组数据,使得这组数据会让程序的tot超过k
思路:很显然我们可以发现,他只是比较了x之间的距离,那么我们可以构造出所有点的x都相同,y都不相同的数据就好了,这样任意两个点的距离一定是大于任意两个点的x坐标之差的
#include<bits\stdc++.h>using namespace std;#define LL long longint main(){LL n,k;scanf("%lld%lld",&n,&k);if(k>=((n*(n-1LL))/2LL))return puts("no solution");for (int i = 0;i<n;i++)printf("1 %d\n",i);}
0 0
- CodeForces 312C The Closest Pair(构造)
- CF 312C. The Closest Pair 简单构造
- Codeforces Round #185 (Div. 2)-The Closest Pair
- 10245 - The Closest Pair Problem
- 10245 - The Closest Pair Problem
- UVaOJ10245 - The Closest Pair Problem
- Uva10245-The Closest Pair Problem
- UVA10245 - The Closest Pair Problem
- UVA_10245_ The Closest Pair Problem
- The Closest Pair Problem UVA
- uva 10245 - The Closest Pair Problem(暴力剪枝)
- uva10245 - The Closest Pair Problem(暴力+剪枝)
- uva 10245 The Closest Pair Problem (暴力+剪枝)
- uva10245 - - The Closest Pair Problem(最近点问题)
- UVA 10245 The Closest Pair Problem (分治法)
- Codeforces Round #185 (Div. 1) / 311A The Closest Pair (“陷阱”题)
- UVa 10245 - The Closest Pair Problem
- UVa 10245 - The Closest Pair Problem
- 欢迎使用CSDN-markdown编辑器
- synchronized的应用
- python 中 xgboost 安装
- 关于即时通信小项目的整理总结
- Scroller的工作原理概括
- CodeForces 312C The Closest Pair(构造)
- 教您如何从ECSHOP整站中提取单独模板的方法
- Linux 设备驱动框架
- android:EditText控制首字母不能输0
- 探索集合框架
- 如何领取门票参加中国北京科技产业博览会?
- java 中的==,equals(),hashCode()
- 编程珠玑:位图法排序
- angular.js之路由实现