#267
Se dau n 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 | #63993364 | Utilizator | |
| Fișier | unice.c | Dimensiune | 423 B |
| Data încărcării | 02 Aprilie 2026, 16:40 | Scor/rezultat | Eroare de compilare |
unice.c:1:1: error: unknown type name 'FILE' FILE *fin, *fout; ^ unice.c:2:5: warning: data definition has no type or storage class [enabled by default] fin = fopen("unice.in", "r"); ^ unice.c:2:5: warning: type defaults to 'int' in declaration of 'fin' [enabled by default] unice.c:2:5: error: conflicting types for 'fin' unice.c:1:7: note: previous declaration of 'fin' was here FILE *fin, *fout; ^ unice.c:2:5: warning: implicit declaration of function 'fopen' [-Wimplicit-function-declaration] fin = fopen("unice.in", "r"); ^ unice.c:2:5: error: initializer element is not constant unice.c:3:5: warning: data definition has no type or storage class [enabled by default] fout = fopen("unice.out", "w"); ^ unice.c:3:5: warning: type defaults to 'int' in declaration of 'fout' [enabled by default] unice.c:3:5: error: conflicting types for 'fout' unice.c:1:13: note: previous declaration of 'fout' was here FILE *fin, *fout; ^ unice.c:3:5: error: initializer element is not constant fout = fopen("unice.out", "w"); ^ unice.c:6:17: error: expected ')' before string constant fscanf(fin, "%d", &n); ^ unice.c:10:5: error: expected identifier or '(' before 'for' for(i = 0; i < n; i++) ^ unice.c:10:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token for(i = 0; i < n; i++) ^ unice.c:10:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token for(i = 0; i < n; i++) ^ unice.c:16:5: error: expected identifier or '(' before 'for' for(i = 0; i < 100; i++) ^ unice.c:16:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token for(i = 0; i < 100; i++) ^ unice.c:16:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token for(i = 0; i < 100; i++) ^ unice.c:24:5: warning: data definition has no type or storage class [enabled by default] fclose(fin); ^ unice.c:24:5: warning: type defaults to 'int' in declaration of 'fclose' [enabled by default] unice.c:24:5: warning: parameter names (without types) in function declaration [enabled by default] unice.c:25:5: warning: data definition has no type or storage class [enabled by default] fclose(fout); ^ unice.c:25:5: warning: type defaults to 'int' in declaration of 'fclose' [enabled by default] unice.c:25:5: warning: parameter names (without types) in function declaration [enabled by default]
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ă.