提交时间:2023-12-18 14:01:53
运行 ID: 116728
# include <bits/stdc++.h> using namespace std ; bool a1 [114514] ; int main ( ) { string a , b ; cin >> a >> b ; for ( int i = 0 ; i < b . size ( ) ; i ++ ) { for ( int j = 0 ; j < a . size ( ) ; j ++ ) { if ( b [i] == a [j] ) { a1 [j] = true ; } } } for ( int i = 1 ; i < a . size ( ) ; i ++ ) { if ( a1 [i] ) { cout << "true" << endl ; return 0 ; } } cout << "false" << endl ; return 0 ; }