提出 #5216112
ソースコード 拡げる
#include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i,N) for(LL i=0;i<N;++i)
typedef long long int LL;
int main()
{
LL N;
in >> N;
std::vector<LL>H(N);
rep(i, N) in >> H[i];
std::vector<LL>nums = H;
std::sort(nums.begin(), nums.end());
nums.erase(std::unique(nums.begin(), nums.end()), nums.end());
std::map<LL, LL>index;
rep(i, nums.size()) index[nums[i]] = i + 1;
rep(i, N) out << index[H[i]] << std::endl;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - 陽気な妖姫 |
| ユーザ | Bwambocos |
| 言語 | C++14 (GCC 5.4.1) |
| 得点 | 300 |
| コード長 | 472 Byte |
| 結果 | AC |
| 実行時間 | 267 ms |
| メモリ | 8192 KiB |
ジャッジ結果
| セット名 | Sample | Subtask1 | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 300 / 300 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_1.txt, sample_2.txt, sample_3.txt |
| Subtask1 | 1.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 2.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, 3.txt, 30.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample_1.txt, sample_2.txt, sample_3.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 1.txt | AC | 157 ms | 5120 KiB |
| 10.txt | AC | 182 ms | 5888 KiB |
| 11.txt | AC | 172 ms | 5632 KiB |
| 12.txt | AC | 4 ms | 384 KiB |
| 13.txt | AC | 157 ms | 5120 KiB |
| 14.txt | AC | 123 ms | 4096 KiB |
| 15.txt | AC | 66 ms | 2432 KiB |
| 16.txt | AC | 55 ms | 2176 KiB |
| 17.txt | AC | 116 ms | 3968 KiB |
| 18.txt | AC | 267 ms | 7808 KiB |
| 19.txt | AC | 166 ms | 5504 KiB |
| 2.txt | AC | 74 ms | 2688 KiB |
| 20.txt | AC | 134 ms | 4608 KiB |
| 21.txt | AC | 30 ms | 1280 KiB |
| 22.txt | AC | 21 ms | 896 KiB |
| 23.txt | AC | 204 ms | 6528 KiB |
| 24.txt | AC | 207 ms | 6528 KiB |
| 25.txt | AC | 83 ms | 2944 KiB |
| 26.txt | AC | 262 ms | 8192 KiB |
| 27.txt | AC | 83 ms | 3072 KiB |
| 28.txt | AC | 119 ms | 4096 KiB |
| 29.txt | AC | 73 ms | 2688 KiB |
| 3.txt | AC | 165 ms | 5504 KiB |
| 30.txt | AC | 4 ms | 384 KiB |
| 4.txt | AC | 156 ms | 5120 KiB |
| 5.txt | AC | 258 ms | 7936 KiB |
| 6.txt | AC | 222 ms | 7040 KiB |
| 7.txt | AC | 111 ms | 3968 KiB |
| 8.txt | AC | 88 ms | 3200 KiB |
| 9.txt | AC | 223 ms | 7168 KiB |
| sample_1.txt | AC | 1 ms | 256 KiB |
| sample_2.txt | AC | 1 ms | 256 KiB |
| sample_3.txt | AC | 1 ms | 256 KiB |