update
This commit is contained in:
parent
5973bcf498
commit
9ec3f62d1f
@ -1,3 +1,5 @@
|
||||
#define NDEBUG
|
||||
|
||||
#include <cmath>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
@ -5,6 +7,11 @@
|
||||
#include <string>
|
||||
|
||||
#define NV(v)#v<<" : "<<(v)
|
||||
#ifdef NDEBUG
|
||||
#define DEBUG(code)
|
||||
#else
|
||||
#define DEBUG(code){code}
|
||||
#endif
|
||||
|
||||
using ull = unsigned long long;
|
||||
const size_t max_n = 150+5;
|
||||
@ -70,15 +77,21 @@ int main(){
|
||||
max_len[i] = std::max(mtx_len[i][j],(max_len[i]==double_inf?double_min:max_len[i]));
|
||||
}
|
||||
}
|
||||
// std::cout<<NV(min_ans)<<"\n---start\n";
|
||||
DEBUG(
|
||||
std::cout<<NV(min_ans)<<"\n---start\n";
|
||||
)
|
||||
for(ull i=1;i<=n;i++){
|
||||
for(ull j=i+1;j<=n;j++){
|
||||
if(mtx_len[i][j]==double_inf){
|
||||
// std::cout<<NV(i)<<'\n'<<NV(j)<<'\n'<<NV(max_len[i])<<'\n'<<NV(max_len[j])<<'\n'
|
||||
// <<NV(len(points[i], points[j]))<<'\n'<<NV(max_len[i]+ len(points[i], points[j]) + max_len[j])<<'\n';
|
||||
DEBUG(
|
||||
std::cout<<NV(i)<<'\n'<<NV(j)<<'\n'<<NV(max_len[i])<<'\n'<<NV(max_len[j])<<'\n'
|
||||
<<NV(len(points[i], points[j]))<<'\n'<<NV(max_len[i]+ len(points[i], points[j]) + max_len[j])<<'\n';
|
||||
)
|
||||
min_ans = std::min(max_len[i]+ len(points[i], points[j]) +max_len[j],min_ans);
|
||||
// std::cout<<NV(min_ans)<<'\n';
|
||||
// std::cout<<"---\n";
|
||||
DEBUG(
|
||||
std::cout<<NV(min_ans)<<'\n';
|
||||
std::cout<<"---\n";
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user