#2082
Sierpinski
Se dă un număr natural n
. Să se genereze o matrice pătratică de ordinul 3
n
, cu elemente din mulțimea {0, 1}
, după modelul covorului lui Sierpinski.
Problema | Sierpinski | Operații I/O |
sierpinski.in /sierpinski.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 0.2 MB
/
Stivă 0.2 MB
|
Id soluție | #30469486 | Utilizator | |
Fișier | sierpinski.cpp | Dimensiune | 2.44 KB |
Data încărcării | 10 August 2021, 12:35 | Scor / rezultat | Eroare de compilare |
sierpinski.cpp:48:35: error: stray '#' in program for(int j = 0; j < l; j++)#include <bits/stdc++.h> ^ sierpinski.cpp: In function 'void afisare(int)': sierpinski.cpp:48:36: error: 'include' was not declared in this scope for(int j = 0; j < l; j++)#include <bits/stdc++.h> ^ sierpinski.cpp:48:45: error: 'bits' was not declared in this scope for(int j = 0; j < l; j++)#include <bits/stdc++.h> ^ sierpinski.cpp:48:50: error: 'stdc' was not declared in this scope for(int j = 0; j < l; j++)#include <bits/stdc++.h> ^ sierpinski.cpp:50:1: error: expected primary-expression before 'using' using namespace std; ^ sierpinski.cpp:50:1: error: expected ';' before 'using' sierpinski.cpp:59:1: error: a function-definition is not allowed here before '{' token { ^ sierpinski.cpp:64:1: error: a function-definition is not allowed here before '{' token { ^ sierpinski.cpp:118:1: error: expected '}' at end of input } ^ sierpinski.cpp:55:5: warning: unused variable 'n' [-Wunused-variable] int n; ^ sierpinski.cpp:56:6: warning: unused variable 'a' [-Wunused-variable] char a[729][92]; ^ sierpinski.cpp:118:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Sierpinski 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ă.