結果
| 問題 |
No.564 背の順
|
| コンテスト | |
| ユーザー |
Yamada
|
| 提出日時 | 2019-09-14 00:42:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 303 bytes |
| コンパイル時間 | 1,304 ms |
| コンパイル使用メモリ | 159,928 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-04 10:50:46 |
| 合計ジャッジ時間 | 2,071 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 3 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
int main(){
int H,N;
cin >> H >> N;
int h;
int ans = 1;
string st[4] ={"st","nd","rd","th"};
rep(i,N-1){
cin >> h;
if (H < h) ans++;
}
cout << ans << st[min({ans-1,3})] <<endl;
}
Yamada