結果
| 問題 |
No.564 背の順
|
| コンテスト | |
| ユーザー |
yui
|
| 提出日時 | 2019-01-29 22:21:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 391 bytes |
| コンパイル時間 | 1,532 ms |
| コンパイル使用メモリ | 168,236 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-11 23:40:33 |
| 合計ジャッジ時間 | 2,108 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 3 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
signed main() {
int h, n;
cin >> h >> n;
int num =1;
for (int i = 0; i < n - 1; i++) {
int hl;
cin >> hl;
if (h < hl) {
num++;
}
}
string res = to_string(num);
if (num == 1) {
res += "st";
}
else if (num == 2) {
res += "nd";
}
else if (num == 3) {
res += "rd";
}
else {
res += "th";
}
cout << res << endl;
}
yui