#4360
O echipa are mulți membrii, dar nimeni nu este la fel de îndrăgit precum mascota, Trixie, o prințesă robot care este gata mereu să navigheze prin coduri și mecanisme pentru a ghida echipa spre victorie.
Știind că fiecare motor are un număr atribuit acestuia care reprezintă numărul de rotații pe minut (RPM) ale acestuia, Trixie a testat mai multe motoare, cu diferite RPM-uri și a venit cu o descoperire inedită. Aceasta a observat că o pereche de motoare care merg bine impreună au numerele de RPM sub formă de numere anagrame. O pereche de numere anagrame sunt formate din aceleași cifre, eventual în altă ordine.
Se dau două numere cu trei cifre, reprezentând numerele de RPM atribuite unei perechi de motoare. Să se afișeze mesajul DA dacă motoarele merg bine împreună și NU în caz contrar.
| Problema | Trixie1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 64 MB
|
| Id soluție | #64757041 | Utilizator | |
| Fișier | trixie1.cpp | Dimensiune | 1.25 KB |
| Data încărcării | 28 Mai 2026, 09:45 | Scor/rezultat | Eroare de compilare |
trixie1.cpp:5:1: error: ‘::main’ must return ‘int’ 5 | int main() | ^~~ trixie1.cpp: In function ‘int main()’: trixie1.cpp:7:10: error: ‘x’ was not declared in this scope 7 | cin>>x>>y; | ^ trixie1.cpp:7:13: error: ‘y’ was not declared in this scope; did you mean ‘yn’? 7 | cin>>x>>y; | ^ | yn trixie1.cpp:10:13: error: ‘x0’ was not declared in this scope; did you mean ‘y0’? 10 | x0++; | ^~ | y0 trixie1.cpp:12:13: error: ‘x1’ was not declared in this scope; did you mean ‘y1’? 12 | x1++; | ^~ | y1 trixie1.cpp:14:13: error: ‘x2’ was not declared in this scope 14 | x2++; | ^~ trixie1.cpp:16:13: error: ‘x3’ was not declared in this scope 16 | x3++; | ^~ trixie1.cpp:18:13: error: ‘x4’ was not declared in this scope 18 | x4++; | ^~ trixie1.cpp:20:13: error: ‘x5’ was not declared in this scope 20 | x5++; | ^~ trixie1.cpp:22:13: error: ‘x6’ was not declared in this scope 22 | x6++; | ^~ trixie1.cpp:24:13: error: ‘x7’ was not declared in this scope 24 | x7++; | ^~ trixie1.cpp:26:13: error: ‘x8’ was not declared in this scope 26 | x8++; | ^~ trixie1.cpp:28:13: error: ‘x9’ was not declared in this scope 28 | x9++; | ^~ trixie1.cpp:35:13: warning: ISO C++ forbids incrementing a pointer of type ‘double (*)(double) noexcept’ {aka ‘double (*)(double)’} [-Wpointer-arith] 35 | y0++; | ^~ trixie1.cpp:35:13: error: lvalue required as increment operand trixie1.cpp:37:13: warning: ISO C++ forbids incrementing a pointer of type ‘double (*)(double) noexcept’ {aka ‘double (*)(double)’} [-Wpointer-arith] 37 | y1++; | ^~ trixie1.cpp:37:13: error: lvalue required as increment operand trixie1.cpp:39:13: error: ‘y2’ was not declared in this scope; did you mean ‘yn’? 39 | y2++; | ^~ | yn trixie1.cpp:41:13: error: ‘y3’ was not declared in this scope; did you mean ‘yn’? 41 | y3++; | ^~ | yn trixie1.cpp:43:13: error: ‘y4’ was not declared in this scope; did you mean ‘yn’? 43 | y4++; | ^~ | yn trixie1.cpp:45:13: error: ‘y5’ was not declared in this scope; did you mean ‘yn’? 45 | y5++; | ^~ | yn trixie1.cpp:47:13: error: ‘y6’ was not declared in this scope; did you mean ‘yn’? 47 | y6++; | ^~ | yn trixie1.cpp:49:13: error: ‘y7’ was not declared in this scope; did you mean ‘yn’? 49 | y7++; | ^~ | yn trixie1.cpp:51:13: error: ‘y8’ was not declared in this scope; did you mean ‘yn’? 51 | y8++; | ^~ | yn trixie1.cpp:53:13: error: ‘y9’ was not declared in this scope; did you mean ‘yn’? 53 | y9++; | ^~ | yn trixie1.cpp:56:9: error: ‘x0’ was not declared in this scope; did you mean ‘y0’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | y0 trixie1.cpp:56:13: error: ‘m0’ was not declared in this scope; did you mean ‘y0’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | y0 trixie1.cpp:56:19: error: ‘x1’ was not declared in this scope; did you mean ‘y1’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | y1 trixie1.cpp:56:29: error: ‘x2’ was not declared in this scope 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ trixie1.cpp:56:33: error: ‘y2’ was not declared in this scope; did you mean ‘yn’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | yn trixie1.cpp:56:39: error: ‘x3’ was not declared in this scope 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ trixie1.cpp:56:43: error: ‘y3’ was not declared in this scope; did you mean ‘yn’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | yn trixie1.cpp:56:49: error: ‘x4’ was not declared in this scope 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ trixie1.cpp:56:53: error: ‘y4’ was not declared in this scope; did you mean ‘yn’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | yn trixie1.cpp:56:59: error: ‘x5’ was not declared in this scope 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ trixie1.cpp:56:63: error: ‘y5’ was not declared in this scope; did you mean ‘yn’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | yn trixie1.cpp:56:69: error: ‘x6’ was not declared in this scope 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ trixie1.cpp:56:73: error: ‘y6’ was not declared in this scope; did you mean ‘yn’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | yn trixie1.cpp:56:79: error: ‘x7’ was not declared in this scope 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ trixie1.cpp:56:83: error: ‘y7’ was not declared in this scope; did you mean ‘yn’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | yn trixie1.cpp:56:89: error: ‘x8’ was not declared in this scope 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ trixie1.cpp:56:93: error: ‘y8’ was not declared in this scope; did you mean ‘yn’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | yn trixie1.cpp:56:98: error: ‘x9’ was not declared in this scope 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ trixie1.cpp:56:102: error: ‘y9’ was not declared in this scope; did you mean ‘yn’? 56 | if (x0==m0 && x1==y1 && x2==y2 && x3==y3 && x4==y4 && x5==y5 && x6==y6 && x7==y7 && x8==y8 &&x9==y9) | ^~ | yn
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Trixie1 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ă.