#1160
Se dă n un număr natural nenul. Să se afle câte soluții are ecuația x1+x2+...+xn=0 în mulțimea {-1,0,1}.
| Problema | Necuatie | Operații I/O |
necuatie.in/necuatie.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64517618 | Utilizator | |
| Fișier | necuatie.cpp | Dimensiune | 1.68 KB |
| Data încărcării | 12 Mai 2026, 10:29 | Scor/rezultat | Eroare de compilare |
necuatie.cpp:46:10: error: redefinition of ‘std::ifstream fin’ 46 | ifstream fin("necuatie.in"); | ^~~ necuatie.cpp:4:10: note: ‘std::ifstream fin’ previously declared here 4 | ifstream fin("necuatie.in"); | ^~~ necuatie.cpp:47:10: error: redefinition of ‘std::ofstream fout’ 47 | ofstream fout("necuatie.out"); | ^~~~ necuatie.cpp:5:10: note: ‘std::ofstream fout’ previously declared here 5 | ofstream fout("necuatie.out"); | ^~~~ necuatie.cpp:48:6: error: redefinition of ‘void euclid(int, int, int&, int&)’ 48 | void euclid(int a , int b ,int & x ,int & y) | ^~~~~~ necuatie.cpp:6:6: note: ‘void euclid(int, int, int&, int&)’ previously defined here 6 | void euclid(int a , int b ,int & x ,int & y) | ^~~~~~ necuatie.cpp:62:11: error: redefinition of ‘long long int c(int, int)’ 62 | long long c(int n, int k) { | ^ necuatie.cpp:20:11: note: ‘long long int c(int, int)’ previously defined here 20 | long long c(int n, int k) { | ^ necuatie.cpp:74:5: error: redefinition of ‘int main()’ 74 | int main() | ^~~~ necuatie.cpp:32:5: note: ‘int main()’ previously defined here 32 | int main() | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Necuatie 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ă.