結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
myanta
|
| 提出日時 | 2017-09-08 22:32:51 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 368 bytes |
| 記録 | |
| コンパイル時間 | 181 ms |
| コンパイル使用メモリ | 38,016 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-07 14:18:34 |
| 合計ジャッジ時間 | 963 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 3 |
ソースコード
#include<cstdio>
int main(void)
{
int h, n;
while(scanf("%d%d", &h, &n)==2)
{
int ans=1;
for(int i=1;i<n;i++)
{
int a;
scanf("%d", &a);
if(a>h) ans++;
}
const char *suffix="th";
switch(ans)
{
case 1: suffix="st"; break;
case 2: suffix="nd"; break;
case 3: suffix="rd"; break;
}
printf("%d%s\n", ans, suffix);
}
return 0;
}
myanta