#2004
ore
Se consideră două evenimente a căror durată este exprimată fiecare prin câte trei numere naturale: ore (h
), minute (m
) şi secunde (s
). Să se scrie în fișierul de ieșire: a) pe primele două linii, duratele în formatul h: m: s
; b) pe următoarele două linii, duratele exprimate în secunde, corespunzătoare fiecărui eveniment, pe rânduri separate; c) pe următoarea linie suma obţinută din adunarea duratelor celor două evenimente, exprimată în ore, minute, secunde, în formatul h: m: s
.
Subiecte Atestat Informatica - Bucuresti
Problema | ore | Operații I/O |
ore.in /ore.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53814542 | Utilizator | |
Fișier | ore.cpp | Dimensiune | 718 B |
Data încărcării | 12 Noiembrie 2024, 12:18 | Scor / rezultat | Eroare de compilare |
ore.cpp: In function 'int main()': ore.cpp:12:4: error: reference to 'cin' is ambiguous cin>>e1.h>>e1.m>>e1.s; ^ ore.cpp:8:10: note: candidates are: std::ifstream cin ifstream cin("ore.in"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ore.cpp:13:4: error: reference to 'cin' is ambiguous cin>>e2.h>>e2.m>>e2.s; ^ ore.cpp:8:10: note: candidates are: std::ifstream cin ifstream cin("ore.in"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ ore.cpp:14:2: error: reference to 'cout' is ambiguous cout<<e1.h<<":"<< " "<<e1.m<<":"<< " "<<e1.s; ^ ore.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("ore.out"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ore.cpp:15:2: error: reference to 'cout' is ambiguous cout<<endl; ^ ore.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("ore.out"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ore.cpp:16:2: error: reference to 'cout' is ambiguous cout<<e2.h<<":"<< " "<<e2.m<<":"<< " "<<e2.s; ^ ore.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("ore.out"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ore.cpp:17:2: error: reference to 'cout' is ambiguous cout<<endl; ^ ore.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("ore.out"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ore.cpp:19:3: error: reference to 'cout' is ambiguous cout<<timps1; ^ ore.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("ore.out"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ore.cpp:20:3: error: reference to 'cout' is ambiguous cout<<endl; ^ ore.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("ore.out"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ore.cpp:22:3: error: reference to 'cout' is ambiguous cout<<timps2; ^ ore.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("ore.out"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ore.cpp:23:3: error: reference to 'cout' is ambiguous cout<<endl; ^ ore.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("ore.out"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ ore.cpp:33:1: error: reference to 'cout' is ambiguous cout<<hf<<":"<< " "<<mf<<":"<<" "<<sf; ^ ore.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("ore.out"); ^ In file included from ore.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ore 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ă.