#3124
PatratMagic0
Se dă un număr natural n
, urmat de o matrice pătratică cu n * n
elemente, numere naturale. Să se verifice dacă matricea dată este un pătrat magic.
Problema | PatratMagic0 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51260440 | Utilizator | |
Fișier | patratmagic0.cpp | Dimensiune | 1.43 KB |
Data încărcării | 02 Iunie 2024, 22:10 | Scor / rezultat | Eroare de compilare |
patratmagic0.cpp:13:13: error: stray '\303' in program if ( a [ i ][ j ] > n * n ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:13:13: error: stray '\274' in program patratmagic0.cpp:14:13: error: stray '\303' in program if ( f [ a [ i ][ j ]] > 1 ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:14:13: error: stray '\274' in program patratmagic0.cpp:20:9: error: stray '\303' in program if ( f [ i ] == 0 ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:20:9: error: stray '\274' in program patratmagic0.cpp:32:17: error: stray '\303' in program 0 zurückgeben ; ^ patratmagic0.cpp:32:17: error: stray '\274' in program patratmagic0.cpp:43:17: error: stray '\303' in program 0 zurückgeben ; ^ patratmagic0.cpp:43:17: error: stray '\274' in program patratmagic0.cpp:48:5: error: stray '\303' in program 0 zurückgeben ; ^ patratmagic0.cpp:48:5: error: stray '\274' in program patratmagic0.cpp:2:1: error: 'Verwenden' does not name a type Verwenden des Namensraums std; ^ patratmagic0.cpp: In function 'int main()': patratmagic0.cpp:6:5: error: 'cin' was not declared in this scope cin >> n; ^ patratmagic0.cpp:6:5: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from patratmagic0.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ patratmagic0.cpp:7:27: error: expected primary-expression before '=' token for ( int i = 1 ; i < = n ; i++ ) ^ patratmagic0.cpp:9:31: error: expected primary-expression before '=' token for ( int j = 1 ; j < = n ; j++ ) ^ patratmagic0.cpp:13:43: error: 'cout' was not declared in this scope if ( a [ i ][ j ] > n * n ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:13:43: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from patratmagic0.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ patratmagic0.cpp:13:63: error: expected ';' before 'zur' if ( a [ i ][ j ] > n * n ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:13:76: warning: statement has no effect [-Wunused-value] if ( a [ i ][ j ] > n * n ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:14:44: error: 'cout' was not declared in this scope if ( f [ a [ i ][ j ]] > 1 ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:14:44: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from patratmagic0.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ patratmagic0.cpp:14:64: error: expected ';' before 'zur' if ( f [ a [ i ][ j ]] > 1 ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:14:77: warning: statement has no effect [-Wunused-value] if ( f [ a [ i ][ j ]] > 1 ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:19:27: error: expected primary-expression before '=' token for ( int i = 1 ; i < = n * n ; i++ ) ^ patratmagic0.cpp:20:31: error: 'cout' was not declared in this scope if ( f [ i ] == 0 ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:20:31: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from patratmagic0.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ patratmagic0.cpp:20:51: error: expected ';' before 'zur' if ( f [ i ] == 0 ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:20:64: warning: statement has no effect [-Wunused-value] if ( f [ i ] == 0 ) { cout << "false" ; 0 zurückgeben ; } ^ patratmagic0.cpp:21:23: error: 'cout' was not declared in this scope if ( sc1 != sc2 ) cout << "false" ; ^ patratmagic0.cpp:21:23: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from patratmagic0.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ patratmagic0.cpp:22:5: error: 'anders' was not declared in this scope anders ^ patratmagic0.cpp:23:5: error: expected ';' before '{' token { ^ patratmagic0.cpp:49:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PatratMagic0 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ă.