#1518
sudoku
Scrieţi un program care, pentru o matrice 9 x 9
dată, reprezentând un puzzle SUDOKU, determină o soluţie a unui astfel de puzzle.
Problema | sudoku | Operații I/O |
sudoku.in /sudoku.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #22617334 | Utilizator | |
Fișier | sudoku.c | Dimensiune | 5.33 KB |
Data încărcării | 26 Aprilie 2020, 16:34 | Scor / rezultat | Eroare de compilare |
sudoku.c: In function 'main': sudoku.c:143:5: error: incompatible type for argument 3 of 'freopen' freopen("sudoku.out","r",g); ^ In file included from sudoku.c:1:0: /usr/include/stdio.h:278:14: note: expected 'struct FILE * __restrict__' but argument is of type 'FILE' extern FILE *freopen (const char *__restrict __filename, ^ sudoku.c:147:13: error: incompatible type for argument 1 of 'fprintf' fprintf(g,"%d ",a[i][j]); ^ In file included from /usr/include/stdio.h:937:0, from sudoku.c:1: /usr/include/i386-linux-gnu/bits/stdio2.h:95:1: note: expected 'struct FILE * __restrict__' but argument is of type 'FILE' fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) ^ sudoku.c:148:9: error: incompatible type for argument 1 of 'fprintf' fprintf(g,"\n"); ^ In file included from /usr/include/stdio.h:937:0, from sudoku.c:1: /usr/include/i386-linux-gnu/bits/stdio2.h:95:1: note: expected 'struct FILE * __restrict__' but argument is of type 'FILE' fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) ^ sudoku.c:9:12: warning: ignoring return value of 'freopen', declared with attribute warn_unused_result [-Wunused-result] freopen("sudoku.in","r",f); ^ sudoku.c:16:19: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%d",a[i]+j); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sudoku 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ă.