Submission #49790
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "bits/stdc++.h" #define ALL(x) x.begin(), x.end() #define iostreamBooster() do{ cin.tie(nullptr); ios_base::sync_with_stdio(false); }while(0) #define rep(i, s, n) for(int i(s); i < int(n); ++i) using namespace std; using i64 = long long ; using pii = pair< int , int >; template < class A, class B> inline bool chmax(A &a, const B &b){ return b>a ? a=b,1 : 0;} template < class A, class B> inline bool chmin(A &a, const B &b){ return b<a ? a=b,1 : 0;} constexpr int INF = 0x3f3f3f3f; constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL; constexpr int MOD = int (1e9) + 7; signed main() { int a[5]; rep(i, 0, 5) cin >> a[i]; int rank[5] {}; rep(i, 0, 5) { rank[i] = 1; rep(j, 0, 5) { if (a[i] < a[j]) ++rank[i]; } } rep(i, 0, 5) cout << rank[i] << endl; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 1151 - Hameln Online Judge |
ユーザー名 | Arumakan_ei1727 |
投稿日時 | 2019-05-29 20:32:16 |
言語 | C++14 |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 823 Byte |
最大実行時間 | 31 ms |
最大メモリ使用量 | 700 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1 / 1 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
1nen2_2_in01.txt | AC | 27 ms | 604 KB |
1
|
1nen2_2_in02.txt | AC | 31 ms | 700 KB |
1
|
1nen2_2_in03.txt | AC | 15 ms | 544 KB |
1
|
1nen2_2_in04.txt | AC | 22 ms | 520 KB |
1
|
1nen2_2_in05.txt | AC | 18 ms | 620 KB |
1
|
1nen2_2_in06.txt | AC | 22 ms | 596 KB |
1
|
1nen2_2_in07.txt | AC | 19 ms | 572 KB |
1
|
1nen2_2_in08.txt | AC | 19 ms | 412 KB |
1
|
1nen2_2_in09.txt | AC | 28 ms | 512 KB |
1
|
1nen2_2_in10.txt | AC | 18 ms | 484 KB |
1
|