목록코딩테스트 (73)
bdfgdfg
#include #include using namespace std; vector solution(vector arr1, vector arr2) { int idx = arr1[0].size(); int row = arr1.size(); int col = arr2[0].size(); vector answer(row, vector(col, 0)); for (int i = 0; i < row; ++i) { for (int j = 0; j < col; ++j) { for (int k = 0; k < idx; ++k) { answer[i][j] += arr1[i][k] * arr2[k][j]; } } } return answer; } 비효율적이지 않나 싶었지만 대부분 거의 나와 똑같은 코드더라. 행렬의 곱셈에서 ..
#include using namespace std; int main() { int r1,s; cin >> r1 >> s; cout > a; cin >> b; cin >> c; cin >> d; cout
#include #include using namespace std; vector solution(int n, vector arr1, vector arr2) { vector answer; vector solution; solution.reserve(n); for (int i = 0; i = 0; --j) { bool k = solution[i] & count; if (k) s[j] = '#'; else s[j] = ' '; count *=..