彳亍
你开O2了吗?
开了
关掉
试试
CE
难绷
1 个赞
你把那个void从括号里去掉?
我试过了没用
1 个赞
破案了,是题目本身问题
1 个赞
#include <bits/stdc++.h>
using namespace std;
/*
int findP(char T[], char P[], int N, int M) {
int cnt = 0;
// 遍历T的每个子字符串
for (int i = 0; i <= N - M; i++) {
unordered_map<char, char> mt, mp;
bool f = true;
// 检查T[i...i+M-1]与P的映射关系
for (int j = 0; j < M; j++) {
char t = T[i + j];
char p = P[j];
// 如果T中的字符t已经映射过其他字符
if (mt.count(t)) {
if (mt[t] != p) {
f = false;
break;
}
} else {
mt[t] = p;
}
// 如果P中的字符p已经映射过其他字符
if (mp.count(p)) {
if (mp[p] != t) {
f = false;
break;
}
} else {
mp[p] = t;
}
}
// 如果映射关系一致,增加计数
if (f) {
cnt++;
}
}
return cnt;
}
*/
int main(void)
{
/*
char T[10005], P[10005];
cin >> T >> P;
int N = strlen(T);
int M = strlen(P);
cout << findP(T, P, N, M);
*/
cout<<1;
return 0;
}
我教这个代码都报错
1 个赞
#include <bits/stdc++.h>
using namespace std;
int main()
{
cout<<1;
return 0;
}
j就这个,这个代码交上去都报错
1 个赞
难绷
1 个赞
去问问那个大佬怎么AC的
1 个赞
他不是说要在前面加那串代码吗,所以才报错a
1 个赞