【Codeforces Round #185 (Div. 2) C】The Closest Pair

【链接】 链接
【题意】

让你构造n个点,去hack一种求最近点对的算法。

【题解】

让x相同。 那么那个剪枝就不会起作用了。

【错的次数】

在这里输入错的次数

【反思】

在这里输入反思

【代码】

#include <bits/stdc++.h>
#define ll long long
using namespace std;

int n,k;

int main()
{
    scanf("%d%d",&n,&k);
    int ju = n*(n-1)/2;
    if (ju <= k)
        puts("no solution");
    else
    {
        for (int i = 1;i <= n;i++)
            printf("0 %d
",i);
    }
    return 0;
}
原文地址:https://www.cnblogs.com/AWCXV/p/7634273.html