#676
CountPrimSub
Se dă un arbore binar care conține valori numere naturale. Se dau k
noduri din arbore și se cere determinarea, pentru fiecare nod, a numărului de noduri din subarborele cu rădăcina în acel nod care conțin valori prime.
Problema | CountPrimSub | Operații I/O |
countprimsub.in /countprimsub.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #15370009 | Utilizator | |
Fișier | countprimsub.cpp | Dimensiune | 1.57 KB |
Data încărcării | 11 Aprilie 2019, 13:18 | Scor / rezultat | Eroare de compilare |
countprimsub.cpp:25:10: error: stray '#' in program }#include <bits/stdc++.h> ^ countprimsub.cpp: In function 'void citire()': countprimsub.cpp:25:11: error: 'include' was not declared in this scope }#include <bits/stdc++.h> ^ countprimsub.cpp:25:20: error: 'bits' was not declared in this scope }#include <bits/stdc++.h> ^ countprimsub.cpp:25:25: error: 'stdc' was not declared in this scope }#include <bits/stdc++.h> ^ countprimsub.cpp:27:1: error: expected primary-expression before 'using' using namespace std; ^ countprimsub.cpp:27:1: error: expected ';' before 'using' countprimsub.cpp:43:1: error: a function-definition is not allowed here before '{' token { ^ countprimsub.cpp:50:1: error: a function-definition is not allowed here before '{' token { ^ countprimsub.cpp:56:1: error: a function-definition is not allowed here before '{' token { ^ countprimsub.cpp:37:2: warning: unused variable 'ar' [-Wunused-variable] }ar[NM]; ^ countprimsub.cpp:39:5: warning: unused variable 'n' [-Wunused-variable] int n,r; ^ countprimsub.cpp:39:7: warning: unused variable 'r' [-Wunused-variable] int n,r; ^ countprimsub.cpp:40:6: warning: unused variable 'v' [-Wunused-variable] bool v[NM]; ^ countprimsub.cpp:107:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CountPrimSub 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ă.