#3195
Intersectie_Multimi
Se dă o mulţime nevidă A
cu n
elemente numere reale. Să se afișeze elementele mulțimilor A ∩ N
, A ∩ Z
, A ∩ Q
și A ∩ (R-Q)
.
Problema | Intersectie_Multimi | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48847490 | Utilizator | |
Fișier | intersectie_multimi.cpp | Dimensiune | 875 B |
Data încărcării | 07 Februarie 2024, 12:10 | Scor / rezultat | Eroare de compilare |
intersectie_multimi.cpp: In function 'void BKT(int)': intersectie_multimi.cpp:19:72: warning: left operand of comma operator has no effect [-Wunused-value] if(strchr("aeiou",c[x[k-1]]) && !strchr(("aeiou",c[x[k]])) || !strchr("aeiou",c[x[k-1]]) && !strchr(("aeiou",c[x[k]]))) ^ intersectie_multimi.cpp:19:74: error: no matching function for call to 'strchr(char&)' if(strchr("aeiou",c[x[k-1]]) && !strchr(("aeiou",c[x[k]])) || !strchr("aeiou",c[x[k-1]]) && !strchr(("aeiou",c[x[k]]))) ^ intersectie_multimi.cpp:19:74: note: candidates are: In file included from /usr/include/c++/4.8/cstring:42:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:48, from intersectie_multimi.cpp:1: /usr/include/string.h:223:1: note: char* strchr(char*, int) strchr (char *__s, int __c) __THROW ^ /usr/include/string.h:223:1: note: candidate expects 2 arguments, 1 provided /usr/include/string.h:229:1: note: const char* strchr(const char*, int) strchr (const char *__s, int __c) __THROW ^ /usr/include/string.h:229:1: note: candidate expects 2 arguments, 1 provided intersectie_multimi.cpp:19:132: warning: left operand of comma operator has no effect [-Wunused-value] if(strchr("aeiou",c[x[k-1]]) && !strchr(("aeiou",c[x[k]])) || !strchr("aeiou",c[x[k-1]]) && !strchr(("aeiou",c[x[k]]))) ^ intersectie_multimi.cpp:19:134: error: no matching function for call to 'strchr(char&)' if(strchr("aeiou",c[x[k-1]]) && !strchr(("aeiou",c[x[k]])) || !strchr("aeiou",c[x[k-1]]) && !strchr(("aeiou",c[x[k]]))) ^ intersectie_multimi.cpp:19:134: note: candidates are: In file included from /usr/include/c++/4.8/cstring:42:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:48, from intersectie_multimi.cpp:1: /usr/include/string.h:223:1: note: char* strchr(char*, int) strchr (char *__s, int __c) __THROW ^ /usr/include/string.h:223:1: note: candidate expects 2 arguments, 1 provided /usr/include/string.h:229:1: note: const char* strchr(const char*, int) strchr (const char *__s, int __c) __THROW ^ /usr/include/string.h:229:1: note: candidate expects 2 arguments, 1 provided intersectie_multimi.cpp:21:13: error: 'i' was not declared in this scope viz[i]=1; ^ intersectie_multimi.cpp: In function 'int main()': intersectie_multimi.cpp:28:10: error: expected primary-expression before ';' token cin>>; ^ intersectie_multimi.cpp:29:5: error: 'nr' was not declared in this scope nr=strlen(c); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Intersectie_Multimi 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ă.