#1102
Bile2
Pe o masă cad n
bile săltăreţe. Fiecare este lăsată să cadă liber de la o înălţime h
, diferită pentru fiecare bilă. Toate bilele cad simultan, cu o viteză constantă (1m/s)
.
Dându-se h
şi k
pentru fiecare dintre cele n
bile, să se răspundă la m
întrebări de forma: La ce înălţime faţă de masă se va afla bila x
în momentul t
?
Problema | Bile2 | Operații I/O |
bile2.in /bile2.out
|
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 32 MB
/
Stivă 4 MB
|
Id soluție | #3921689 | Utilizator | |
Fișier | bile2.cpp | Dimensiune | 954 B |
Data încărcării | 26 Decembrie 2016, 20:33 | Scor / rezultat | 30 puncte |
bile2.cpp: In function 'int citire(long int, std::vector<std::pair<long int, long int> >&)': bile2.cpp:4:38: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long int*' [-Wformat=] #define cit fscanf(in,"%d %d", &a, &b); ^ bile2.cpp:16:9: note: in expansion of macro 'cit' cit; ^ bile2.cpp:4:38: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long int*' [-Wformat=] #define cit fscanf(in,"%d %d", &a, &b); ^ bile2.cpp:16:9: note: in expansion of macro 'cit' cit; ^ bile2.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ bile2.cpp: In function 'int main()': bile2.cpp:40:28: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long int*' [-Wformat=] fscanf(in,"%d %d",&n,&m); ^ bile2.cpp:40:28: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long int*' [-Wformat=] bile2.cpp:44:28: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long int*' [-Wformat=] fscanf(in,"%d %d",&x,&t); ^ bile2.cpp:44:28: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long int*' [-Wformat=] bile2.cpp: In function 'int citire(long int, std::vector<std::pair<long int, long int> >&)': bile2.cpp:4:39: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] #define cit fscanf(in,"%d %d", &a, &b); ^ bile2.cpp:16:9: note: in expansion of macro 'cit' cit; ^ bile2.cpp: In function 'int main()': bile2.cpp:40:29: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] fscanf(in,"%d %d",&n,&m); ^ bile2.cpp:44:29: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] fscanf(in,"%d %d",&x,&t); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
2 | 0.004 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | OK. | 10 | 10 | Exemplu | |
4 | 0.008 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0.008 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0.044 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0.06 secunde | OK. | 10 | 10 | ||
8 | 0.068 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0.064 secunde | OK. | 10 | 10 | ||
10 | 0.064 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 30 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Bile2 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ă.