#1860
BlackFriday
Anul acesta unele magazine din România s-au hotărât să organizeze BlackFriday joia, altele de luni până joi, iar altele sâmbătă şi duminică. Ele au afişat n
preţuri înainte de ieftinire şi cele n
preţuri după ieftinire. Aflaţi ce produs s-a ieftinit cu cel mai mare procent.
Problema | BlackFriday | Operații I/O |
![]() blackfriday.in /blackfriday.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57233363 | Utilizator | |
Fișier | blackfriday.cpp | Dimensiune | 352 B |
Data încărcării | 21 Martie 2025, 08:48 | Scor / rezultat | Eroare de compilare |
blackfriday.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream g("blackfriday.out") ^ blackfriday.cpp: In function 'int main()': blackfriday.cpp:7:8: error: 'n' was not declared in this scope { f >> n; ^ blackfriday.cpp:8:8: error: 'i' was not declared in this scope for ( i=1 ; i<=n; i++) ^ blackfriday.cpp:9:9: error: 'a' was not declared in this scope f>>a[i]; ^ blackfriday.cpp:10:8: error: 'i' was not declared in this scope for ( i=1; i<=n; i++) ^ blackfriday.cpp:11:9: error: 'b' was not declared in this scope f>>b[i]; ^ blackfriday.cpp:12:2: error: 'j' was not declared in this scope j=1; ^ blackfriday.cpp:13:7: error: 'i' was not declared in this scope for (i=2; i<=n; i++) ^ blackfriday.cpp:14:11: error: 'a' was not declared in this scope if ( a[j]*(a[i]-b[i])>(a[j]-b[j])*a[i]) j=i; ^ blackfriday.cpp:14:22: error: 'b' was not declared in this scope if ( a[j]*(a[i]-b[i])>(a[j]-b[j])*a[i]) j=i; ^ blackfriday.cpp:15:6: error: 'g' was not declared in this scope g<<j; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BlackFriday 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ă.