求助玄幻事件
  • 板块灌水区
  • 楼主yn_ko_86
  • 当前回复4
  • 已保存回复4
  • 发布时间2024/12/28 08:57
  • 上次更新2024/12/28 12:46:30
查看原帖
求助玄幻事件
741531
yn_ko_86楼主2024/12/28 08:57

p1429

我本人不具备蓝题水平,但是今天我在尝试过的题目中找到了他,且在提交代码页面有一份我自己都看不懂的代码,之后评测记录也没有我自己,历史分数也是无。在之后又看了一圈题解没有相似代码,我怀疑是以前交错代码了,有没有dalao看一下这是那道题的代码(代码没敢提交,害怕说是抄,马蜂及其崩坏,凑合看吧

#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
struct sbsbsb{
    long long sbsbsbsb,sbsbsbsbsb;
};
bool sbsb(sbsbsb sb222,sbsbsb sb333){
    return sb222.sbsbsbsb<sb333.sbsbsbsb;
}
using namespace std;
int main(){
    int a;
    cin>>a;
    double sb=pow(10,18);
    int b[a][2]={};
    sbsbsb c[a];
    for(int e=0;e<a;e++){
        cin>>b[e][0]>>b[e][1];
        c[e].sbsbsbsb=b[e][0]+b[e][1];
        c[e].sbsbsbsbsb=e;
    }
    sort(c,c+a,sbsb);
    for(int f=0;f<a;f++){
            for(int g=f+1;g<a;g++){
                if(pow(double(c[f].sbsbsbsb)/2-double(c[g].sbsbsbsb)/2,2)*2>=sb){
                    break;
                }
                sb=min(sb,abs(pow(b[c[f].sbsbsbsbsb][0]-b[c[g].sbsbsbsbsb][0],2)+pow(b[c[f].sbsbsbsbsb][1]-b[c[g].sbsbsbsbsb][1],2)));
            }
        }
        cout<<fixed<<setprecision(4)<<pow(sb,0.5);
}

这么多sb我都蒙求别举报

2024/12/28 08:57
加载中...