/ Vijos /

记录详情

Compile Error

/in/foo.cc:8:53: error: declaration of 'coefficients' as multidimensional array must have bounds for all dimensions except the first
 void solveLinearEquations(int n, int coefficients[][]) {
                                                     ^
/in/foo.cc: In function 'void solveLinearEquations(...)':
/in/foo.cc:10:25: error: 'n' was not declared in this scope
     for (int i = 0; i < n; ++i) {
                         ^
/in/foo.cc:14:21: error: 'coefficients' was not declared in this scope
             if (abs(coefficients[j][i]) > abs(coefficients[maxRow][i])) {
                     ^~~~~~~~~~~~
/in/foo.cc:22:22: error: 'coefficients' was not declared in this scope
                 swap(coefficients[i][k], coefficients[maxRow][k]);
                      ^~~~~~~~~~~~
/in/foo.cc:28:13: error: 'coefficients' was not declared in this scope
             coefficients[i][k] /= coefficients[i][i];
             ^~~~~~~~~~~~
/in/foo.cc:33:26: error: 'coefficients' was not declared in this scope
             int factor = coefficients[j][i];
                          ^~~~~~~~~~~~
/in/foo.cc:42:18: error: 'n' was not declared in this scope
     for (int i = n - 1; i >= 0; --i) {
                  ^
/in/foo.cc:43:24: error: 'coefficients' was not declared in this scope
         solutions[i] = coefficients[i][n];
                        ^~~~~~~~~~~~
/in/foo.cc:50:25: error: 'n' was not declared in this scope
     for (int i = 0; i < n; ++i) {
                         ^

信息

递交者
类型
递交
题目
P1052 贾老二算算术
语言
C++
递交时间
2024-11-23 22:22:51
评测时间
2024-11-23 22:22:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes