#3824
Perechi6
Se dau două șiruri de numere întregi, ordonate crescător. Șirul x[]
contine n
numere întregi ordonate crescător, șirul y[]
conține m
numere întregi ordonate crescător. Să se calculeze numărul de perechi de forma (x[i], y[j])
unde x[i] = y[j]
și x[i] ∊ X
, respectiv y[j] ∊ Y
.
Problema | Perechi6 | Operații I/O |
![]() perechi6.in /perechi6.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55548954 | Utilizator | |
Fișier | perechi6.cpp | Dimensiune | 760 B |
Data încărcării | 18 Ianuarie 2025, 10:24 | Scor / rezultat | Eroare de compilare |
perechi6.cpp: In function 'int main()': perechi6.cpp:6:15: error: two or more data types in declaration of 'n' float int n , m ,x[100000],y[100000],p=0,i,j; ^ perechi6.cpp:6:19: error: two or more data types in declaration of 'm' float int n , m ,x[100000],y[100000],p=0,i,j; ^ perechi6.cpp:6:30: error: two or more data types in declaration of 'x' float int n , m ,x[100000],y[100000],p=0,i,j; ^ perechi6.cpp:6:40: error: two or more data types in declaration of 'y' float int n , m ,x[100000],y[100000],p=0,i,j; ^ perechi6.cpp:6:42: error: two or more data types in declaration of 'p' float int n , m ,x[100000],y[100000],p=0,i,j; ^ perechi6.cpp:6:46: error: two or more data types in declaration of 'i' float int n , m ,x[100000],y[100000],p=0,i,j; ^ perechi6.cpp:6:48: error: two or more data types in declaration of 'j' float int n , m ,x[100000],y[100000],p=0,i,j; ^ perechi6.cpp:10:10: error: 'n' was not declared in this scope fin>>n; ^ perechi6.cpp:11:9: error: 'i' was not declared in this scope for(i = 0 ; i < n ; i++ ){ ^ perechi6.cpp:12:14: error: 'x' was not declared in this scope fin>>x[i]; ^ perechi6.cpp:15:10: error: 'm' was not declared in this scope fin>>m; ^ perechi6.cpp:16:10: error: 'j' was not declared in this scope for( j = 0 ; j < m ; j++ ){ ^ perechi6.cpp:17:14: error: 'y' was not declared in this scope fin>>y[j]; ^ perechi6.cpp:20:5: error: 'i' was not declared in this scope i=0; ^ perechi6.cpp:21:5: error: 'j' was not declared in this scope j=0; ^ perechi6.cpp:24:12: error: 'x' was not declared in this scope if(x[i]==y[j]){ ^ perechi6.cpp:24:18: error: 'y' was not declared in this scope if(x[i]==y[j]){ ^ perechi6.cpp:25:13: error: 'p' was not declared in this scope p++; ^ perechi6.cpp:34:11: error: 'p' was not declared in this scope fout<<p; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Perechi6 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ă.