Problema | Matrice_Rara | Operații I/O |
matrice_rara.in /matrice_rara.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53766023 | Utilizator | |
Fișier | matrice_rara.cpp | Dimensiune | 1.28 KB |
Data încărcării | 11 Noiembrie 2024, 11:01 | Scor / rezultat | Eroare de compilare |
matrice_rara.cpp:9:1: error: 'triplet' does not name a type triplet a[300001] , c[300001] , b[300001]; ^ matrice_rara.cpp:10:13: error: variable or field 'citire' declared void void citire(triplet a[] , int n) ^ matrice_rara.cpp:10:13: error: 'triplet' was not declared in this scope matrice_rara.cpp:10:27: error: expected primary-expression before 'int' void citire(triplet a[] , int n) ^ matrice_rara.cpp:15:14: error: variable or field 'afisare' declared void void afisare(triplet a[] , int n) ^ matrice_rara.cpp:15:14: error: 'triplet' was not declared in this scope matrice_rara.cpp:15:28: error: expected primary-expression before 'int' void afisare(triplet a[] , int n) ^ matrice_rara.cpp:21:12: error: 'triplet' was not declared in this scope int maimic(triplet a , andra b) ^ matrice_rara.cpp:21:24: error: 'andra' was not declared in this scope int maimic(triplet a , andra b) ^ matrice_rara.cpp:21:31: error: expression list treated as compound expression in initializer [-fpermissive] int maimic(triplet a , andra b) ^ matrice_rara.cpp:22:1: error: expected ',' or ';' before '{' token { ^ matrice_rara.cpp: In function 'int main()': matrice_rara.cpp:28:5: error: reference to 'cin' is ambiguous cin >> n >> m >> n1 >> n2; ^ matrice_rara.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("matrice_rara.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from matrice_rara.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ matrice_rara.cpp:29:12: error: 'a' was not declared in this scope citire(a , n1); ^ matrice_rara.cpp:29:18: error: 'citire' was not declared in this scope citire(a , n1); ^ matrice_rara.cpp:30:12: error: 'b' was not declared in this scope citire(b , n2); ^ matrice_rara.cpp:34:30: error: 'maimic' cannot be used as a function if(maimic(a[i] , b[j])) c[++nc] = a[i++]; ^ matrice_rara.cpp:34:33: error: 'c' was not declared in this scope if(maimic(a[i] , b[j])) c[++nc] = a[i++]; ^ matrice_rara.cpp:35:35: error: 'maimic' cannot be used as a function else if(maimic(b[j] , a[i])) c[++nc] = b[j++]; ^ matrice_rara.cpp:35:38: error: 'c' was not declared in this scope else if(maimic(b[j] , a[i])) c[++nc] = b[j++]; ^ matrice_rara.cpp:40:17: error: 'c' was not declared in this scope c[++nc] = a[i]; ^ matrice_rara.cpp:47:20: error: 'c' was not declared in this scope while(i <= n1) c[++nc] = a[i++]; ^ matrice_rara.cpp:48:20: error: 'c' was not declared in this scope while(j <= n2) c[++nc] = b[j++]; ^ matrice_rara.cpp:49:5: error: reference to 'cout' is ambiguous cout << nc << '\n'; ^ matrice_rara.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("matrice_rara.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from matrice_rara.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ matrice_rara.cpp:51:9: error: reference to 'cout' is ambiguous cout << c[i].i << " " << c[i].j << " " << c[i].val << '\n'; ^ matrice_rara.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("matrice_rara.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from matrice_rara.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ matrice_rara.cpp:51:17: error: 'c' was not declared in this scope cout << c[i].i << " " << c[i].j << " " << c[i].val << '\n'; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Matrice_Rara 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ă.