int arr[10000]
注意!!上面的寫法在Zerojudge可能會讓你拿到MLE
下面有替代方案 :
map<int, int>sparse;
//如果是多維陣列,使用巢狀map即可
map<int, map<int, int>>arr