为何运行出错?大家可以帮我一下吗?谢谢

P3613 【深基15.例2】寄包柜

Climb1104 @ 2023-09-03 13:39:36

#include<iostream> 
#include<vector>
using namespace std;

int main()
{
    int m, n;
    cin >> m >> n;
    vector<vector<int> > arr(n);
    for (int i = 0; i < n; i++)
    {
        int k;
        while (cin >> k)
        {
            arr[i].push_back(k);
            if (cin.get() == '\n')
                break;
        }
    }
    for (int j = 0; j < n; j++)
    {
        if (arr[j][0] == 2)
        {
            for (int k = 0; k < n; k++)
            {
                if (arr[k][1] == arr[j][1] && arr[k][2] == arr[j][2] && arr[k][0] == 1)
                    cout << arr[k][3]<<endl;
            }
        }
    }
}

by Rieman_sum @ 2023-09-03 14:04:14

我这没问题


by Climb1104 @ 2023-09-03 14:55:53

@Guo1 在这上面提交没问题吗?


|