Skiry Posted February 4, 2014 Report Share Posted February 4, 2014 Buna ziua. Ma chinui de vreo ora sa rezolv o problema(pe campion)..De fapt,am rezolvat-o , dar la 16/20 de verificari imi da : "Killed By Signal" ..si la restul,"OK",deci am rezolvat corect..si nu inteleg cum pot rezolva cu problema asta cu " Killed By Signal",am inteles mai demult ca e de la marimea vectorului,am marit-o,dar degeaba..putin ajutor ?Multumesc. Quote Link to comment Share on other sites More sharing options...
Active Members MrGrj Posted February 4, 2014 Active Members Report Share Posted February 4, 2014 Si problema ? Quote Link to comment Share on other sites More sharing options...
Raz0R99 Posted February 4, 2014 Report Share Posted February 4, 2014 Zi exact ce problem? ai, ai declarat corect vectorul? Quote Link to comment Share on other sites More sharing options...
Skiry Posted February 4, 2014 Author Report Share Posted February 4, 2014 (edited) Da. Acolo spune 1<= n <= 20000Am declarat vectorul a[20005] si imi da ca am trecut limita de timp,iar daca il micsorez cam pe la a[10000] imi da Killed By Signal Edited February 4, 2014 by Skiry Quote Link to comment Share on other sites More sharing options...
totti93 Posted February 4, 2014 Report Share Posted February 4, 2014 Banuiesc ca se fac teste cu valori diferite. Cele cu "Time limit exceeded!" probabil sugereaza faptul ca algoritmul tau e lent, iar la cele cu "Killed by signal: 11" probabil accesezi o zona de memorie ce nu ai voie. Un fel de "Segmentation fault". Atata timp cat nu postezi codul sursa, nu prea te putem ajuta.L.E.: Posteaza si cerinta. Quote Link to comment Share on other sites More sharing options...
Active Members MrGrj Posted February 5, 2014 Active Members Report Share Posted February 5, 2014 Incearca asta:std::vector<structureType> vectorName; // retine in momentul de fata 0 elemeentevectorName.reserve(100); // retine tot 0 elemente dar are capacitatea de 100 Modifici tu 100 cu cat iti tre'. Quote Link to comment Share on other sites More sharing options...