QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#393669 | #7939. High Towers | kyuukyuusha# | WA | 40ms | 9276kb | C++17 | 586b | 2024-04-19 04:39:54 | 2024-04-19 04:39:54 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
vector<pair<int, int>> nums(n);
int a;
for (int i = 0; i < n; ++i) {
cin >> a;
nums[i] = make_pair(a, i);
}
sort(nums.begin(), nums.end());
vector<int> ans(n);
for(int i = 0; i < n; ++i) {
ans[nums[i].second] = i+1;
}
for (int i = 0; i < n; ++i) {
cout << ans[i] << " ";
}
cout << endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
input:
6 3 3 4 2 5 1
output:
3 4 5 2 6 1
result:
ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
4 3 3 3 3
output:
1 2 3 4
result:
ok
Test #3:
score: -100
Wrong Answer
time: 40ms
memory: 9276kb
input:
264668 5 5 5 5 9 5 5 5 7 3 5 3 11 9 9 9 8 9 8 9 12 4 4 9 5 5 6 4 12 4 7 5 6 5 18 12 6 12 11 11 11 11 11 11 12 19 5 5 8 6 6 6 26 7 7 7 8 6 7 6 6 12 10 6 9 8 8 8 10 4 22 4 4 6 3 6 4 4 8 5 5 5 7 3 8 6 6 6 6 8 3 5 3 6 4 4 8 5 5 5 10 6 6 6 6 17 4 12 5 11 6 10 7 9 8 8 16 5 5 5 8 4 4 12 8 7 7 8 6 9 4 14 5 ...
output:
34955 34956 34957 34958 193762 34959 34960 34961 127054 4 34962 5 224949 193763 193764 193765 166260 193766 166261 193767 233263 6584 6585 193768 34963 34964 79481 6586 233264 6587 127055 34965 79482 34966 254653 233265 79483 233266 224950 224951 224952 224953 224954 224955 233267 256268 34967 34968...
result:
wrong answer