#include using namespace std; #include using namespace atcoder; using ll=long long; using Graph=vector>>; #define MAX 100 #define MOD 1000000007 #define INF 1000000000 int main(){ int N,M,K,L; cin>>N>>M>>K>>L; mcf_graph G(N+M+2); for(int i=0;i>X>>Y>>Z; G.add_edge(X,N+Y,1,(1LL<<32)-(1LL< p=G.flow(0,N+M+1); ll ans=(ll)p.first*(1LL<<32)-p.second; cout<