結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
ひゅーら
|
| 提出日時 | 2017-09-08 22:23:24 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 546 bytes |
| 記録 | |
| コンパイル時間 | 677 ms |
| コンパイル使用メモリ | 82,032 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-07 14:06:18 |
| 合計ジャッジ時間 | 1,106 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 3 |
ソースコード
#include <iostream>
#include <cstdlib>
#include <string>
#include <ctime>
#include <algorithm>
#include <vector>
#include <cstring>
#include <stack>
#include <queue>
#include <utility>
using namespace std;
int main(){
int h, n;
int ans = 0;
scanf("%d%d", &h, &n);
for(int i = 0; i < n-1; i++){
int t;
scanf("%d", &t);
if(t > h){
ans++;
}
}
printf("%d", ans+1);
int a = ans+1 % 10;
if(a == 1){
printf("st\n");
}else if(a == 2){
printf("nd\n");
}else if(a == 3){
printf("rd\n");
}else{
printf("th\n");
}
return 0;
}
ひゅーら