Submission #3417945
Source Code Expand
/** * ABC 36 C * author : kyomukyomupurin * created : 2018-10-16 18:01:48 **/ #include <bits/stdc++.h> using namespace std; #define int64 long long int main(){ ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; int a[N] = {}; for (auto i = 0; i < N; ++i) { cin >> a[i]; } set<int> s; for (auto i = 0; i < N; ++i) { s.insert(a[i]); } map<int, int> mp; int beg = 0; for (auto x : s){ mp[x] = beg; ++beg; } for (auto i = 0; i < N; ++i) { cout << mp[a[i]] << '\n'; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - 座圧 |
User | kyomukyomupurin |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 643 Byte |
Status | AC |
Exec Time | 105 ms |
Memory | 10496 KB |
Judge Result
Set Name | Testset1 | Testset2 | All | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 30 / 30 | 30 / 30 | 40 / 40 | ||||||
Status |
|
|
|
Set Name | Test Cases |
---|---|
Testset1 | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt |
Testset2 | 000.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | AC | 1 ms | 256 KB |
001.txt | AC | 2 ms | 384 KB |
002.txt | AC | 2 ms | 384 KB |
003.txt | AC | 2 ms | 384 KB |
004.txt | AC | 2 ms | 384 KB |
005.txt | AC | 2 ms | 384 KB |
006.txt | AC | 1 ms | 256 KB |
007.txt | AC | 2 ms | 384 KB |
008.txt | AC | 1 ms | 256 KB |
009.txt | AC | 2 ms | 384 KB |
010.txt | AC | 70 ms | 5120 KB |
011.txt | AC | 26 ms | 1024 KB |
012.txt | AC | 62 ms | 3968 KB |
013.txt | AC | 44 ms | 2048 KB |
014.txt | AC | 81 ms | 6784 KB |
015.txt | AC | 60 ms | 3712 KB |
016.txt | AC | 46 ms | 2176 KB |
017.txt | AC | 79 ms | 6528 KB |
018.txt | AC | 78 ms | 6272 KB |
019.txt | AC | 72 ms | 5376 KB |
020.txt | AC | 105 ms | 10496 KB |
021.txt | AC | 85 ms | 6912 KB |
022.txt | AC | 50 ms | 2304 KB |
023.txt | AC | 98 ms | 9216 KB |
024.txt | AC | 100 ms | 9600 KB |
025.txt | AC | 41 ms | 1664 KB |
026.txt | AC | 57 ms | 3200 KB |
027.txt | AC | 89 ms | 7680 KB |
028.txt | AC | 56 ms | 2944 KB |
029.txt | AC | 104 ms | 10240 KB |