You are viewing a single comment's thread. Return to all comments →
Can someone tell me what's wrong with my code please?
using namespace std;
int main() { string str1; int N, q, k_size;
getline(cin, str1); N = str1[0] - '0'; q = str1[2]-'0'; vector<vector<int>> a(N); getline(cin, str1); cout << N << " " << q << endl; for (int i = 0; i < N; i++) { getline(cin, str1); k_size = str1[0] - '0'; vector<int> k(k_size); for (int j = 0; j < k_size; j++) k[j] = str1[j + 2]; } for (int i = 0; i < 2; i++) { getline(cin, str1); cout << a[str1[0] - '0'][str1[2] - '0'] << endl; } return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Variable Sized Arrays
You are viewing a single comment's thread. Return to all comments →
Can someone tell me what's wrong with my code please?
include
include
include
using namespace std;
int main() { string str1; int N, q, k_size;
}