// 入力フォーマットチェック2 #include using namespace std; using ll = long long; #define GETLINE( A ) string A; getline( cin , A ) #define UNTIE ios_base::sync_with_stdio( false ); cin.tie( nullptr ) #define FOR( VAR , INITIAL , FINAL_PLUS_ONE ) for( remove_const::type >::type VAR = INITIAL ; VAR < FINAL_PLUS_ONE ; VAR ++ ) #define REPEAT( HOW_MANY_TIMES ) FOR( VARIABLE_FOR_REPEAT , 0 , HOW_MANY_TIMES ) #define QUIT return 0 #define RETURN( ANSWER ) cout << ( ANSWER ) << "\n"; QUIT #define STOI( N ) ll N = 0; while( N ## _str != "" ){ N = N * 10 + stoi( N ## _str.substr( 0 , 1 ) ); N ## _str = N ## _str.substr( 1 ); } // #define CHECK_REDUNDANT_INPUT string VARIABLE_FOR_CHECK_REDUNDANT_INPUT = ""; cin >> VARIABLE_FOR_CHECK_REDUNDANT_INPUT; assert( VARIABLE_FOR_CHECK_REDUNDANT_INPUT == "" ); assert( ! cin ); #define CHECK_REDUNDANT_INPUT string VARIABLE_FOR_CHECK_REDUNDANT_INPUT = ""; getline( cin , VARIABLE_FOR_CHECK_REDUNDANT_INPUT ); assert( VARIABLE_FOR_CHECK_REDUNDANT_INPUT == "" ); assert( ! cin ); int main() { UNTIE; GETLINE( N_str ); STOI( N ); GETLINE( M ); REPEAT( N ){ GETLINE( Aj ); } CHECK_REDUNDANT_INPUT; RETURN( "YES" ); }