There was discussion after the contest regarding problem L (Which Warehouse?) and the interplay between the stated bounds on the input data, the stated time limit and the time complexity of the most likely solution. While the stated bounds on the data were 1000 warehouses and 1000 products, the test data had a maximum of 100 of each.
라는 부분이 있습니다. n 제한을 100으로 수정해야 하고, 다른 값들도 non-negative 라고만 언급이 나와있어서 제한의 추가가 필요해 보입니다. 아래에 제한을 추가하여 수정했으니 그대로 써주시면 될 것 같습니다.
Input begins with two positive integers $n$ $m$ $(n \leq 100, m \leq n)$ indicating the number of warehouses and products, respectively. Following this are $n$ lines each with $m$ non-negative integers less than or equal to 1000. The $i^{th}$ value on the $j^{th}$ of these lines indicates the amount of product $i$ stored in warehouse $j$. Finally there follow $n$ lines each with $n$ integers. The $i^{th}$ value on the $j^{th}$ of these lines is either a non-negative value less than or equal to 100 that specifies the length of the road between warehouse $j$ to warehouse $i$, or is $-1$ that indicates that there is no road directly going from warehouse $j$ to warehouse $i$. It is possible that the distance to travel on the road from one warehouse $r$ to another warehouse $s$ may not be the same as the distance to travel on the road from $s$ to $r$. The distance from any warehouse to itself is always 0 and there is always at least one path between any two warehouses.
kyo20111 3년 전
대회 Report(https://raw.githubusercontent....) 중에
There was discussion after the contest regarding problem L (Which Warehouse?) and
the interplay between the stated bounds on the input data, the stated time limit and the
time complexity of the most likely solution. While the stated bounds on the data were
1000 warehouses and 1000 products, the test data had a maximum of 100 of each.
라는 부분이 있습니다. n 제한을 100으로 수정해야 하고, 다른 값들도 non-negative 라고만 언급이 나와있어서 제한의 추가가 필요해 보입니다. 아래에 제한을 추가하여 수정했으니 그대로 써주시면 될 것 같습니다.
Input begins with two positive integers $n$ $m$ $(n \leq 100, m \leq n)$ indicating the number of warehouses and products, respectively. Following this are $n$ lines each with $m$ non-negative integers less than or equal to 1000. The $i^{th}$ value on the $j^{th}$ of these lines indicates the amount of product $i$ stored in warehouse $j$. Finally there follow $n$ lines each with $n$ integers. The $i^{th}$ value on the $j^{th}$ of these lines is either a non-negative value less than or equal to 100 that specifies the length of the road between warehouse $j$ to warehouse $i$, or is $-1$ that indicates that there is no road directly going from warehouse $j$ to warehouse $i$. It is possible that the distance to travel on the road from one warehouse $r$ to another warehouse $s$ may not be the same as the distance to travel on the road from $s$ to $r$. The distance from any warehouse to itself is always 0 and there is always at least one path between any two warehouses.