Borderou de evaluare (job #3328994)
| Utilizator | Data | 11 decembrie 2025 15:25:43 | |
|---|---|---|---|
| Problema | Potrivirea sirurilor | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp:12:1: error: 'vector' does not name a type
12 | vector<int> lps(2000005,0),ans;
| ^~~~~~
main.cpp: In function 'void build_lps(std::string)':
main.cpp:18:33: error: 'lps' was not declared in this scope
18 | while(k&&a[i-1]!=a[k])k=lps[k];
| ^~~
main.cpp:20:9: error: 'lps' was not declared in this scope
20 | lps[i]=k;
| ^~~
main.cpp: In function 'void kmp(std::string, std::string)':
main.cpp:30:31: error: 'lps' was not declared in this scope
30 | while(k&&a[k]!=b[i])k=lps[k];
| ^~~
main.cpp:32:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
32 | if(k==n)ans.push_back(i-n+1),nr++;
| ^~~
| abs
main.cpp:35:42: error: 'ans' was not declared in this scope; did you mean 'abs'?
35 | for(int i=0;i<min(1000,nr);i++)cout<<ans[i]<<" ";
| ^~~
| abs
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
