0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-23 19:08:47 +00:00

#1536. 【2022.09.05NOIP模拟题】模糊匹配

https://sjzezoj.com/submission/55838
This commit is contained in:
Baoshuo Ren 2022-09-05 15:24:39 +08:00
parent a0eb9a2927
commit de68548fc6
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
22 changed files with 105 additions and 0 deletions

42
S2OJ/1536/1536.cpp Normal file
View File

@ -0,0 +1,42 @@
#include <iostream>
#include <string>
using std::cin;
using std::cout;
const char endl = '\n';
const int N = 20005;
int n, ans;
std::string s, t;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> s >> n;
int s_len = s.size();
for (int i = 1; i <= n; i++) {
cin >> t;
int t_len = t.size();
if (s_len == t_len) {
bool flag = true;
for (int i = 0; i < t_len; i++) {
if (s[i] != '#') {
flag &= s[i] == t[i];
}
}
if (flag) ans++;
}
}
cout << ans << endl;
return 0;
}

BIN
S2OJ/1536/data/matching1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching10.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching5.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching6.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching7.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching8.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/matching9.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1536/data/problem.conf (Stored with Git LFS) Normal file

Binary file not shown.