#2751
BBsecurity
C++
Se dă un număr n
și n
triplete de forma l
, c
, h
, reprezentând lungimea egala a doi stâlpi, lungimea cablului dintre acestea și înălțimea la care atârnă cablul față de podea.
Se cere să se afle distanța dintre fiecare doi stâlpi.
Problema | BBsecurity | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.6 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #13259123 | Utilizator | |
Fișier | bbsecurity.cpp | Dimensiune | 925 B |
Data încărcării | 16 Ianuarie 2019, 09:14 | Scor / rezultat | 0 puncte |
bbsecurity.cpp: In function 'int main()': bbsecurity.cpp:25:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=] fprintf(fout, "%I64d\n",s/2); ^ bbsecurity.cpp:34:17: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=] printf("%d",st); ^ bbsecurity.cpp:39:53: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=] fprintf(fout, "%I64d S\n%I64d S",st*(-1),dr*(-1)); ^ bbsecurity.cpp:39:53: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=] bbsecurity.cpp:41:40: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=] fprintf(fout, "%I64d D\n%I64d D",dr,st); ^ bbsecurity.cpp:41:40: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=] bbsecurity.cpp:43:48: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=] fprintf(fout, "%I64d S\n%I64d D",st*(-1),dr); ^ bbsecurity.cpp:43:48: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=] bbsecurity.cpp:14:23: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%d",&n); ^ bbsecurity.cpp:17:34: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%d %c",&v[i],&a); ^ bbsecurity.cpp:24:23: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%d",&k); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
2 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
3 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
4 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
5 | 0 secunde | Caught fatal signal 11 | 20 | 0 | ||
6 | 0 secunde | Caught fatal signal 11 | 20 | 0 | ||
7 | 0 secunde | Caught fatal signal 11 | 20 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BBsecurity 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ă.