#include #include #include #include using namespace std; typedef long long ll; const ll INF=1e18; int main() { int n,k; cin>>n>>k; string t; for(int i=0;i>s[i]>>c[i]; } int p[3*k][n]; for(int i=0;i<3*k;i++) { for(int j=0;j cost) { v[u] = cost; } } } /* for(int i=0;i<=3*k;i++) { cout<