#include #define INF 100000000 int N; int s[50]; int M; int adj[50][50]; int dp[50][50]; int MIN(int a,int b){ if(a