|
|
вернуться в форумWA 5 Послано Ivan 14 июл 2015 21:46 Can anybody send me the fifth test of this problem? My program always crushes on it. I think it's something wrong when input my data int size; struct point{ int number; bool pr; }; vector<point> matrix[1000]; int main(){ int name1, name2; point c; char hg='0'; vector<int> victims; cin >> size; while (hg != 'B'){ cin >> hg; if (hg != 'B'){ cin >> name2; name1 = atoi(&hg); c.pr = true; c.number = name2 - 1; matrix[name1 - 1].push_back(c); c.pr = false; c.number = name1 - 1; matrix[name2 - 1].push_back(c); } } for (int i = 0; i < 4; i++) cin >> hg; while (std::cin >> name1) victims.push_back(name1 - 1); |
|
|