#1702
Cristale
Pietrele preţioase au fascinat omenirea încă din timpuri străvechi iar cele mai renumite dintre ele, cristalele, au devenit atât simbolul durităţii cât şi al eternităţii. În urma unui studiu ştiinţific, pe un eşantion de formă dreptunghiulară se pot observa diferite tipuri de molecule, dispuse într-o geometrie perfectă, pe M
rânduri a câte N
molecule fiecare, aliniate una lângă alta. O formaţiune cristalizabilă este alcătuită din 3
molecule de acelaşi tip, învecinate două câte două, având una dintre cele patru forme din imaginea alăturată (fig.1).
Fiecare formaţiune este înconjurată de jur-împrejur, ca în fig.2, de un înveliş special format şi el din molecule identice, de alt tip decât cele din formaţiunea cristalizabilă pe care o înconjoară şi o izolează de restul formaţiunilor moleculare. În acest fel, fiecare moleculă din formaţiunea cristalizabilă se învecinează la Nord, Sud, Est şi Vest cu o moleculă din aceeaşi formaţiune cristalizabilă sau cu o moleculă din învelişul special.
Fiecare formaţiune cristalizabilă se bombardează cu raze X
şi în acest fel are loc cristalizarea, proces prin care învelişul special se extinde peste formaţiunea cristalizabilă pe care o înconjoară, formând o singură structură din care se va dezvolta cristalul.
Cerințe
ONI 2016, clasa a VII-a
Problema | Cristale | Operații I/O |
cristale.in /cristale.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 1 MB
/
Stivă 1 MB
|
Id soluție | #37461979 | Utilizator | |
Fișier | cristale.cpp | Dimensiune | 7.10 KB |
Data încărcării | 31 August 2022, 10:09 | Scor / rezultat | 100 puncte |
cristale.cpp: In function 'int main()': cristale.cpp:38:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:38:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:40:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:40:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:42:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:42:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:47:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:47:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:49:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:49:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:51:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:51:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:53:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:53:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:55:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:55:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:57:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:57:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:59:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:59:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:74:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:74:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:76:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:76:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:78:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:78:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:83:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:83:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:85:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:85:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:87:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:87:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:89:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:89:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:91:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:91:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:93:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:93:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:95:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:95:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:109:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:109:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:111:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:111:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:113:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:113:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:118:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:118:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:120:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:120:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:122:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:122:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:124:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:124:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:126:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:126:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:128:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:128:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:130:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:130:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:144:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:144:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:146:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:146:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:148:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:148:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:153:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:153:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:155:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:155:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:157:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:157:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:159:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:159:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:161:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:161:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:163:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:163:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:165:43: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^ cristale.cpp:165:54: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(v[l][c]==a && 1<=l<=n && 1<=c<=m)ok++; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | OK. | 2 | 2 | ||
1 | 0 secunde | OK. | 2 | 2 | ||
2 | 0 secunde | OK. | 2 | 2 | ||
3 | 0 secunde | OK. | 2 | 2 | ||
4 | 0.012 secunde | OK. | 2 | 2 | ||
5 | 0 secunde | OK. | 2 | 2 | ||
6 | 0 secunde | OK. | 2 | 2 | ||
7 | 0.016 secunde | OK. | 2 | 2 | ||
8 | 0.004 secunde | OK. | 2 | 2 | ||
9 | 0.012 secunde | OK. | 2 | 2 | ||
10 | 0 secunde | OK. | 5 | 5 | ||
11 | 0 secunde | OK. | 5 | 5 | ||
12 | 0 secunde | OK. | 5 | 5 | ||
13 | 0 secunde | OK. | 5 | 5 | ||
14 | 0.02 secunde | OK. | 5 | 5 | ||
15 | 0 secunde | OK. | 5 | 5 | ||
16 | 0 secunde | OK. | 5 | 5 | ||
17 | 0.032 secunde | OK. | 5 | 5 | ||
18 | 0.008 secunde | OK. | 5 | 5 | ||
19 | 0.024 secunde | OK. | 5 | 5 | ||
20 | 0.04 secunde | OK. | 2 | 2 | ||
21 | 0.08 secunde | OK. | 5 | 5 | ||
22 | 0.068 secunde | OK. | 2 | 2 | ||
23 | 0.14 secunde | OK. | 5 | 5 | ||
24 | 0.076 secunde | OK. | 2 | 2 | ||
25 | 0.148 secunde | OK. | 5 | 5 | ||
26 | 0.056 secunde | OK. | 2 | 2 | ||
27 | 0.108 secunde | OK. | 5 | 5 | ||
28 | 0.02 secunde | OK. | 2 | 2 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cristale 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ă.