#267
Unice
Se dau n
numere numere naturale cu cel mult două cifre fiecare. Să se determine acele numere care apar o singură dată.
Variante Bacalaureat 2009
Problema | Unice | Operații I/O |
unice.in /unice.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54744790 | Utilizator | |
Fișier | unice.cpp | Dimensiune | 413 B |
Data încărcării | 07 Decembrie 2024, 10:22 | Scor / rezultat | Eroare de compilare |
unice.cpp:1:1: error: stray '\342' in program • #include <fstream> ^ unice.cpp:1:1: error: stray '\200' in program unice.cpp:1:1: error: stray '\242' in program unice.cpp:1:5: error: stray '#' in program • #include <fstream> ^ unice.cpp:2:1: error: stray '\342' in program • using namespace std; ^ unice.cpp:2:1: error: stray '\200' in program unice.cpp:2:1: error: stray '\242' in program unice.cpp:3:1: error: stray '\342' in program • ifstream fin("unice.in"); ^ unice.cpp:3:1: error: stray '\200' in program unice.cpp:3:1: error: stray '\242' in program unice.cpp:4:1: error: stray '\342' in program • ofstream fout("unice.out"); ^ unice.cpp:4:1: error: stray '\200' in program unice.cpp:4:1: error: stray '\242' in program unice.cpp:5:1: error: stray '\342' in program • int v[101], n, x,i; ^ unice.cpp:5:1: error: stray '\200' in program unice.cpp:5:1: error: stray '\242' in program unice.cpp:6:1: error: stray '\342' in program • ^ unice.cpp:6:1: error: stray '\200' in program unice.cpp:6:1: error: stray '\242' in program unice.cpp:7:1: error: stray '\342' in program • int main() { ^ unice.cpp:7:1: error: stray '\200' in program unice.cpp:7:1: error: stray '\242' in program unice.cpp:8:1: error: stray '\342' in program • fin >> n; ^ unice.cpp:8:1: error: stray '\200' in program unice.cpp:8:1: error: stray '\242' in program unice.cpp:9:1: error: stray '\342' in program • for (i = 1; i <= n; i++) ^ unice.cpp:9:1: error: stray '\200' in program unice.cpp:9:1: error: stray '\242' in program unice.cpp:10:1: error: stray '\342' in program • { ^ unice.cpp:10:1: error: stray '\200' in program unice.cpp:10:1: error: stray '\242' in program unice.cpp:11:1: error: stray '\342' in program • fin >> x; ^ unice.cpp:11:1: error: stray '\200' in program unice.cpp:11:1: error: stray '\242' in program unice.cpp:12:1: error: stray '\342' in program • v[x]++; ^ unice.cpp:12:1: error: stray '\200' in program unice.cpp:12:1: error: stray '\242' in program unice.cpp:13:1: error: stray '\342' in program • } ^ unice.cpp:13:1: error: stray '\200' in program unice.cpp:13:1: error: stray '\242' in program unice.cpp:14:1: error: stray '\342' in program • for (i = 0; i < 100; i++) { ^ unice.cpp:14:1: error: stray '\200' in program unice.cpp:14:1: error: stray '\242' in program unice.cpp:15:1: error: stray '\342' in program • if (v[i] == 1) fout << i <<' '; ^ unice.cpp:15:1: error: stray '\200' in program unice.cpp:15:1: error: stray '\242' in program unice.cpp:16:1: error: stray '\342' in program • } ^ unice.cpp:16:1: error: stray '\200' in program unice.cpp:16:1: error: stray '\242' in program unice.cpp:17:1: error: stray '\342' in program • return 0; ^ unice.cpp:17:1: error: stray '\200' in program unice.cpp:17:1: error: stray '\242' in program unice.cpp:18:1: error: stray '\342' in program • } ^ unice.cpp:18:1: error: stray '\200' in program unice.cpp:18:1: error: stray '\242' in program unice.cpp:1:6: error: 'include' does not name a type • #include <fstream> ^ unice.cpp:3:5: error: 'ifstream' does not name a type • ifstream fin("unice.in"); ^ unice.cpp:4:5: error: 'ofstream' does not name a type • ofstream fout("unice.out"); ^ unice.cpp: In function 'int main()': unice.cpp:8:9: error: 'fin' was not declared in this scope • fin >> n; ^ unice.cpp:15:28: error: 'fout' was not declared in this scope • if (v[i] == 1) fout << i <<' '; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Unice 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ă.