#223
MinCols1
Se dă o matrice cu elemente numere naturale. Să se determine ultima cifră a produsului elementelor de pe diagonala secundară cu proprietatea că sunt minime pe coloanele lor.
Variante Bacalaureat 2009
Problema | MinCols1 | Operații I/O |
mincols1.in /mincols1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50424173 | Utilizator | |
Fișier | mincols1.cpp | Dimensiune | 407 B |
Data încărcării | 09 Aprilie 2024, 09:32 | Scor / rezultat | Eroare de compilare |
mincols1.cpp:3:1: error: stray '\342' in program ifstream cin (“mincols1.in”); ^ mincols1.cpp:3:1: error: stray '\200' in program mincols1.cpp:3:1: error: stray '\234' in program mincols1.cpp:3:1: error: stray '\342' in program mincols1.cpp:3:1: error: stray '\200' in program mincols1.cpp:3:1: error: stray '\235' in program mincols1.cpp:4:1: error: stray '\342' in program ofstream cout (“mincols1.out”); ^ mincols1.cpp:4:1: error: stray '\200' in program mincols1.cpp:4:1: error: stray '\234' in program mincols1.cpp:4:1: error: stray '\342' in program mincols1.cpp:4:1: error: stray '\200' in program mincols1.cpp:4:1: error: stray '\235' in program mincols1.cpp:7:1: error: stray '\342' in program { cin>>n; for (i=1;i<=n;i++)for (j=1;j<=n;j++) cin>>a[i][j]; for (j=1;j<=n;j++) { mini=100; for (i=1;i<=n;i++) if (a[i][j]<mini) mini=a[i][j];if (a[n-j+1][j]==mini) { p=p*mini%10; ok=1; } } if (ok==0) cout<<“NU EXISTA”; else cout<<p; return 0; } ^ mincols1.cpp:7:1: error: stray '\200' in program mincols1.cpp:7:1: error: stray '\234' in program mincols1.cpp:7:1: error: stray '\342' in program mincols1.cpp:7:1: error: stray '\200' in program mincols1.cpp:7:1: error: stray '\235' in program mincols1.cpp:3:18: error: 'mincols1' was not declared in this scope ifstream cin (“mincols1.in”); ^ mincols1.cpp:4:19: error: 'mincols1' was not declared in this scope ofstream cout (“mincols1.out”); ^ mincols1.cpp: In function 'int main()': mincols1.cpp:7:53: error: 'a' was not declared in this scope { cin>>n; for (i=1;i<=n;i++)for (j=1;j<=n;j++) cin>>a[i][j]; for (j=1;j<=n;j++) { mini=100; for (i=1;i<=n;i++) if (a[i][j]<mini) mini=a[i][j];if (a[n-j+1][j]==mini) { p=p*mini%10; ok=1; } } if (ok==0) cout<<“NU EXISTA”; else cout<<p; return 0; } ^ mincols1.cpp:7:116: error: 'a' was not declared in this scope { cin>>n; for (i=1;i<=n;i++)for (j=1;j<=n;j++) cin>>a[i][j]; for (j=1;j<=n;j++) { mini=100; for (i=1;i<=n;i++) if (a[i][j]<mini) mini=a[i][j];if (a[n-j+1][j]==mini) { p=p*mini%10; ok=1; } } if (ok==0) cout<<“NU EXISTA”; else cout<<p; return 0; } ^ mincols1.cpp:7:147: error: 'a' was not declared in this scope { cin>>n; for (i=1;i<=n;i++)for (j=1;j<=n;j++) cin>>a[i][j]; for (j=1;j<=n;j++) { mini=100; for (i=1;i<=n;i++) if (a[i][j]<mini) mini=a[i][j];if (a[n-j+1][j]==mini) { p=p*mini%10; ok=1; } } if (ok==0) cout<<“NU EXISTA”; else cout<<p; return 0; } ^ mincols1.cpp:7:211: error: 'NU' was not declared in this scope { cin>>n; for (i=1;i<=n;i++)for (j=1;j<=n;j++) cin>>a[i][j]; for (j=1;j<=n;j++) { mini=100; for (i=1;i<=n;i++) if (a[i][j]<mini) mini=a[i][j];if (a[n-j+1][j]==mini) { p=p*mini%10; ok=1; } } if (ok==0) cout<<“NU EXISTA”; else cout<<p; return 0; } ^ mincols1.cpp:7:214: error: expected ';' before 'EXISTA' { cin>>n; for (i=1;i<=n;i++)for (j=1;j<=n;j++) cin>>a[i][j]; for (j=1;j<=n;j++) { mini=100; for (i=1;i<=n;i++) if (a[i][j]<mini) mini=a[i][j];if (a[n-j+1][j]==mini) { p=p*mini%10; ok=1; } } if (ok==0) cout<<“NU EXISTA”; else cout<<p; return 0; } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MinCols1 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ă.