#include using namespace std; main() { int m; cin >> m; for(int i=0; i> shoki >> nen >> n; int max=0; for(int j=0; j> type >> riritu >> tesuu; int A=shoki; if(type){ for(int k=0; k