Why UKE?
查看原帖
Why UKE?
1286053
Nostopathy楼主2024/3/24 14:31
#include <iostream>
#include <string>
#include <cstring>
#define int long long int
using namespace std;

int it, Lix, i; string a, s; 

signed main () {
    string::size_type _;
    
    while (cin >> it >> a >> s) {
        for (i = 0; i < s.length(); ) {
            _ = s.find(a, i);
            
            if (_ == s.npos) {
                cout << '\n'; break;
            }
            
            cout << _ << '\n'; i = _ + 1;
        }
    }
}

这代码有问题吗,谢谢QaQ

2024/3/24 14:31
加载中...