結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2018-01-17 17:10:28 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 425µs | |
| コード長 | 341 bytes |
| 記録 | |
| コンパイル時間 | 1,207 ms |
| コンパイル使用メモリ | 220,288 KB |
| 実行使用メモリ | 9,828 KB |
| 最終ジャッジ日時 | 2026-10-10 18:35:32 |
| 合計ジャッジ時間 | 2,481 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int h, n; cin>>h>>n;
vector<int> a(n-1);
for(int& e: a) cin>>e;
a.push_back(h);
sort(rbegin(a), rend(a));
for(int i=1; i<=n; ++i) {
if (a[i-1]==h) {
int t=i%10;
cout<<i<<"th\0st\0nd\0rd"+3*(t<4?t:0)<<endl;
}
}
}
hogeover30