#3974
Se dau 2 mulţimi de numere naturale. Să se afișeze mulţimea rezultată în urma efectuării unei operații.
| Problema | IRDDS | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 8 MB
/
Stivă 4 MB
|
| Id soluție | #64211664 | Utilizator | |
| Fișier | irdds.cpp | Dimensiune | 946 B |
| Data încărcării | 23 Aprilie 2026, 09:52 | Scor/rezultat | Eroare de compilare |
irdds.cpp: In function ‘int main()’: irdds.cpp:16:32: error: expected ‘)’ before ‘;’ token 16 | if(a[i]>a[j]) swap(a[i];a[j]); | ~ ^ | ) irdds.cpp:16:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 16 | if(a[i]>a[j]) swap(a[i];a[j]); | ^~ irdds.cpp:16:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 16 | if(a[i]>a[j]) swap(a[i];a[j]); | ^ irdds.cpp:15:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 15 | for(j=i+1;j<n;j++) | ^~~ irdds.cpp:16:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | if(a[i]>a[j]) swap(a[i];a[j]); | ^ irdds.cpp:16:37: error: expected ‘;’ before ‘)’ token 16 | if(a[i]>a[j]) swap(a[i];a[j]); | ^ | ; irdds.cpp:16:36: warning: statement has no effect [-Wunused-value] 16 | if(a[i]>a[j]) swap(a[i];a[j]); | ~~~^ irdds.cpp:18:8: error: ‘sort’ was not declared in this scope; did you mean ‘short’? 18 | {sort=1; | ^~~~ | short irdds.cpp:20:36: error: expected ‘)’ before ‘;’ token 20 | if(b[i]>b[i+1]) swap(b[i];b[i+1]), sort=0; | ~ ^ | ) irdds.cpp:20:11: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 20 | if(b[i]>b[i+1]) swap(b[i];b[i+1]), sort=0; | ^~ irdds.cpp:20:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 20 | if(b[i]>b[i+1]) swap(b[i];b[i+1]), sort=0; | ^ irdds.cpp:19:11: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 19 | for(i=0;i<n-1;i++) | ^~~ irdds.cpp:20:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | if(b[i]>b[i+1]) swap(b[i];b[i+1]), sort=0; | ^ irdds.cpp:20:43: error: expected ‘;’ before ‘)’ token 20 | if(b[i]>b[i+1]) swap(b[i];b[i+1]), sort=0; | ^ | ; irdds.cpp:20:42: warning: statement has no effect [-Wunused-value] 20 | if(b[i]>b[i+1]) swap(b[i];b[i+1]), sort=0; | ~~~~~^ irdds.cpp:22:14: error: ‘sort’ was not declared in this scope; did you mean ‘short’? 22 | }while(sort==0); | ^~~~ | short
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema IRDDS 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ă.