#include #define endl "n" using namespace std; const int MAXN=1024,MAXM=10005; int n,m; int used[MAXM],mat[MAXN],f[MAXN][MAXN],reb[MAXN]; vector >ind; struct place { int x,y,vol; place() {} place(int _x,int _y,int _vol) { x=_x; y=_y; vol=_vol; } }; vectorp; vector > >edges; vectorgraph[MAXN]; inline void speed () { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } inline double dist(pair a,place b) { double ret=(a.first-b.x)*(a.first-b.x)+(a.second-b.y)*(a.second-b.y); return sqrt(ret); } void read() { int xx,yy,cc; cin>>n>>m; for(int i=0; i>xx>>yy; ind.push_back({xx,yy}); } for(int j=0; j>xx>>yy>>cc; p.push_back(place(xx,yy,cc)); } for(int i=0; i=n; } inline void add_edge(pair e) { graph[e.first].push_back(e.second); } void solve() { double curr_ans=0,i=0; do { memset(mat,0,sizeof(mat)); add_edge(edges[i].second); curr_ans=edges[i].first; i++; } while(check()==0&&i