ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1242. Werewolf

WA 5
Posted by Ivan 14 Jul 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);