19194587
The code gives runtime error .
the line mod1[X%10].push_back({X/10,f,s})
is causing the problem , if u comment it out everything runs fine
How can this simple push_back() cause a RE (array index of mod1 vector are in bound)
for(int s=0;s<=6;s++)
for(int f = 0; (f+s)<=6;f++){
int X = s*7 + f*4;
mod1[X%10].push_back({X/10,f,s});
}
Auto comment: topic has been updated by arasmus (previous revision, new revision, compare).
It should be
string digit[7];
instead of 6.You now get WA on test 2