結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-14 16:40:42 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 447 bytes |
| 記録 | |
| コンパイル時間 | 80 ms |
| コンパイル使用メモリ | 37,760 KB |
| 実行使用メモリ | 9,224 KB |
| 最終ジャッジ日時 | 2026-07-07 02:48:34 |
| 合計ジャッジ時間 | 1,040 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 3 |
ソースコード
#include <stdio.h>
int main(){
// 自身の身長・自身を含むクラスの人数・他人の身長
int height,val,student;
scanf("%d%d",&height,&val);
int rank = 1;
for(int i = 0;i < val - 1;i ++){
scanf("%d",&student);
if(student > height){
rank++;
}
}
if(rank == 1){
printf("%dst",rank);
}else if(rank == 2){
printf("%dnd",rank);
}else if(rank == 3){
printf("%drd",rank);
}else{
printf("%dth",rank);
}
}
sasa