Regular polygon Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2219 Accepted Submission(s): 880 Problem Description On a two-dimensional plane, give you n integer points. Your task is to fig…
题目链接 可以贪心写,先把b数组按从小到大的顺序排个序,根据b[i]的值来产生a[n+i] 借助一个c数组,c[i]记录,j从i到n,a[j]-j的最大值,再加上一个实时更新的变量ma,记录从n+1到当前之前的a[n+i]-(n+i)的最大值,每次把max(c[b[i]],ma)的值赋给a[n+i] #include<bits/stdc++.h> using namespace std; typedef long long LL; ; ; int n; int a[N],b[N],c[N];…
题目链接 **Problem Description On a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points can make. Input The input file consists of several test cases. Each case the first line is a…
Regular polygon Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2004 Accepted Submission(s): 795 Problem Description On a two-dimensional plane, give you n integer points. Your task is to fig…
Regular polygon Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1529 Accepted Submission(s): 597 Problem Description On a two-dimensional plane, give you n integer points. Your task is to fig…