#include #include #include #include using namespace std; vector data_structure(string row) { vector pom; char before=row[0]; //printf("%c\t",before); pom.push_back(0); int numb_before=0; for(int i=1;i data_struct) { for(int i=0;i radar = data_structure(row); int from; int to; scanf(" "); while(!feof(stdin)) { scanf("%d%d ", &from, &to); int number = radar[to] - radar[from]; //printf("from: %d (%d), to: %d (%d), count %d\n",from, radar[from], to, radar[to], number); printf("%d\n", number); } //print(radar); return 0; }