#3242
pdi
Se dă un şir format din n
numere naturale nenule. Aflaţi lungimea maximă a unui subşir al şirului dat, astfel încât oricare două elemente consecutive din subşir să nu fie prime între ele.
NeuroN
Problema | pdi | Operații I/O |
pdi.in /pdi.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53550017 | Utilizator | |
Fișier | pdi.cpp | Dimensiune | 983 B |
Data încărcării | 04 Noiembrie 2024, 21:52 | Scor / rezultat | Eroare de compilare |
pdi.cpp:4:1: error: 'ofseream' does not name a type ofseream fout("pdi.out"), ^ pdi.cpp: In function 'void era()': pdi.cpp:12:5: error: 'v' was not declared in this scope v[1]=1; ^ pdi.cpp: In function 'int main()': pdi.cpp:26:10: error: 'n' was not declared in this scope cin>>n; ^ pdi.cpp:27:32: error: 'a' was not declared in this scope for(int i=1;i<=n;++i) cin>>a[i]; ^ pdi.cpp:31:9: error: 'dp' was not declared in this scope dp[i]=0; ^ pdi.cpp:32:9: error: 'd' was not declared in this scope d=pr[a[i]].size(); ^ pdi.cpp:32:14: error: 'a' was not declared in this scope d=pr[a[i]].size(); ^ pdi.cpp:35:13: error: 'p' was not declared in this scope p=pr[a[i]][j]; ^ pdi.cpp:36:16: error: 'maxi' was not declared in this scope if(maxi[p]>dp[i]) dp[i]=maxi[p]; ^ pdi.cpp:41:13: error: 'p' was not declared in this scope p=pr[a[i]][j]; ^ pdi.cpp:42:22: error: 'maxi' was not declared in this scope if(dp[i]>maxi[p]) maxi[p]=dp[i]; ^ pdi.cpp:44:18: error: 'ans' was not declared in this scope if(dp[i]>ans) ans=dp[i]; ^ pdi.cpp:6:14: error: 'fout' was not declared in this scope #define cout fout ^ pdi.cpp:46:5: note: in expansion of macro 'cout' cout<<ans; ^ pdi.cpp:46:11: error: 'ans' was not declared in this scope cout<<ans; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pdi face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.