Java一直超时…所以用c++写
#include<bits/stdc++.h>
using namespace std;
int main() {
string phone;
cin >> phone;
char a = phone[7];
char b = phone[8];
char c = phone[9];
char d = phone[10];
int n;
cin >> n;
for (int i = 0; i < n; i++) {
string tmp;
cin >> tmp;
if (tmp[7] == a && tmp[8] == b && tmp[4] == c && tmp[17] == d) {
cout << tmp;
break;
}
}
return 0;
}