Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- const int mxn = 2e5;
- //#define Kin
- int main()
- {
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- #ifdef Kin
- (void)!freopen("input.txt", "r", stdin);
- (void)!freopen("output.txt", "w", stdout);
- #endif
- int t;
- cin >> t;
- while (t--)
- {
- int n;
- cin >> n;
- map<float, set<int>> mp;
- for (int i = 0; i < n; i++)
- {
- float k;
- cin >> k;
- mp[k].insert(i + 1);
- }
- int pos = 0;
- auto itm = mp.begin();
- cout << "Winning Registration Numbers are: ";
- while (itm != mp.end() && pos < 3)
- {
- for (auto its = itm->second.begin(); its != itm->second.end(); its++)
- cout << *its << " ";
- itm++;
- pos++;
- }
- cout << '\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement