#2766
Gradient
Dându-se două culori valide (reprezentate fiecare prin câte 3
numere) și numărul n
, calculați toate culorile prin care va trece prima pentru a deveni a doua.
Best of CNCV /w 2018
Problema | Gradient | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #30428765 | Utilizator | |
Fișier | gradient.cpp | Dimensiune | 963 B |
Data încărcării | 03 August 2021, 17:59 | Scor / rezultat | Eroare de compilare |
gradient.cpp: In function 'int main()': gradient.cpp:6:12: error: 'a1' was not declared in this scope cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2 >> n; ^ gradient.cpp:6:18: error: 'b1' was not declared in this scope cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2 >> n; ^ gradient.cpp:6:24: error: 'c1' was not declared in this scope cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2 >> n; ^ gradient.cpp:6:30: error: 'a2' was not declared in this scope cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2 >> n; ^ gradient.cpp:6:36: error: 'b2' was not declared in this scope cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2 >> n; ^ gradient.cpp:6:42: error: 'c2' was not declared in this scope cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2 >> n; ^ gradient.cpp:6:48: error: 'n' was not declared in this scope cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2 >> n; ^ gradient.cpp:8:5: error: 'r1' was not declared in this scope r1 = abs(a1 - a2) / (n - 1); ^ gradient.cpp:9:5: error: 'r2' was not declared in this scope r2 = abs(b2 - b1) / (n - 1); ^ gradient.cpp:10:5: error: 'r3' was not declared in this scope r3 = abs(c2 - c1) / (n - 1); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Gradient 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ă.