// TLEの原因探し中... #include using namespace std; #define SET_A( A , N ) FOR( VARIABLE_FOR_CIN_A , 0 , N ){ cin >> A[VARIABLE_FOR_CIN_A]; } #define FOR( VAR , INITIAL , FINAL_PLUS_ONE ) for( int VAR = INITIAL ; VAR < FINAL_PLUS_ONE ; VAR ++ ) #define REPEAT( HOW_MANY_TIMES ) FOR( VARIABLE_FOR_REPEAT_ ## HOW_MANY_TIMES , 0 , HOW_MANY_TIMES ) #define COUT_A( A , N ) FOR( VARIABLE_FOR_OUTPUT_ARRAY , 0 , N ){ cout << A[VARIABLE_FOR_OUTPUT_ARRAY] << (VARIABLE_FOR_OUTPUT_ARRAY==N-1?"":" "); } cout << endl int main() { int T , N , M; cin >> T >> N >> M; REPEAT( T ){ int L[N] = {}; cout << 1 << " "; COUT_A( L , N ); cin >> M; SET_A( L , N ); SET_A( L , N ); SET_A( L , N ); } return 0; }