/* written by Pankaj Kumar. country:-INDIA Institute: National Institute of Technology, Uttarakhand */ #include using namespace std; typedef long long ll; // partilly AC long long solve() { ll n,m,k; cin>>n>>m>>k; vector g(n); for(ll i=0;i>g[i]; vector> v(m,vector(3,0)); vector ans(1<>v[i][j]; v[i][0]--; v[i][1]--; } for(ll i=0;i<(1<check(n,false); for(ll j=0;j()); for(ll i=0;i>test; // scanf("%lld",&test); while(test--) { solve(); } return 0; } /* -----------------END OF PROGRAM --------------------*/ /* * stuff you should look before submission * constraint and time limit * int overflow * special test case (n=0||n=1||n=2) * don't get stuck on one approach if you get wrong answer */