#44028: 講解(並沒有


yp11351100@yphs.tp.edu.tw (801-28胡可岳)

學校 : 臺北市私立延平高級中學
編號 : 276234
來源 : [45.38.17.252]
最後登入時間 :
2025-08-06 14:37:29

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

int main() {
    cin.sync_with_stdio(0);
    cin.tie(0);
    int N, M;
    cin >> N >> M;
    map<int, int>MAP;
    for (int i = 0; i<N; i++)
    {
        int tmp;
        cin >> tmp;
        if (tmp != 0) MAP[tmp] = i+1;
    }
    for (auto it:MAP)
    {
        cout << it.second << " ";
    }
    cout << "\n";
}