吉比特笔试第一题多项式计算题,明明跟着测试案例敲在自己电脑上运行答案是正确的,到牛客笔试网上就错了(输出的值没错,但不知道为什么显示错误)。写完第二题直接没看第三题一直在改第一题,半小时没发现问题在哪。。。有无通过的大佬帮忙看看,不然要睡不着觉了// ================= 代码 ================= // #include using namespace std; const int MOD = 10000009; const int Number = 233; using ll = long long; void oper(vector> &grid, int m, vector optNums, int l, int r) { for (int i = l; i { if (m % 2 == 0) // 偶操作 + { for (int j = 0; j { if (j > grid[i].size() - 1) { grid[i].push_back(optNums[j]); } else { grid[i][j] += optNums[j]; } } } else { // 奇操作 - for (int j = 0; j { if (j > grid[i].size() - 1) { grid[i].push_back(-optNums[j]); } else { grid[i][j] -= optNums[j]; } } } } } int main(int argc, char const *argv[]) { int n, d, m; cin >> n >> d >> m; vector> grid(n + 1); for (int i = 1; i { int p; cin >> p; for (int k = 0; k { int temp; cin >> temp; grid[i].push_back(temp); } } for (int i = 1; i { int p, l, r; cin >> p >> l >> r; vector optNums(p + 1); for (int i = 0; i { cin >> optNums[i]; } oper(grid, i, optNums, l, r); } // 计算结果 for (int i = 1; i { ll sum = 0; for (int k = 0; k { sum += grid[i][k] * pow(Number, k); sum %= MOD; } cout } cout return 0; }// ================= 代码 ================= //#吉比特笔试#