結果

問題 No.564 背の順
コンテスト
ユーザー yamyam122
提出日時 2017-09-29 12:00:34
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 358µs
コード長 505 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 264 ms
コンパイル使用メモリ 71,856 KB
実行使用メモリ 9,848 KB
最終ジャッジ日時 2026-09-23 13:32:27
合計ジャッジ時間 1,463 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>

int main(){
    int H, N;
    int count =1;
    std::cin >> H >> N; std::cin.ignore();
    
    for(int t; std::cin>>t;){
        if(t>H) count++;
    }
    
    switch(count%10){
        case 1:
        std::cout <<count << "st" << std::endl; break;
        case 2:
        std::cout << count <<"nd" <<std::endl; break;
        case 3:
        std::cout<< count << "rd" <<std::endl; break;
        default:
        std::cout << count << "th" <<std::endl; break;
    }
    return 0;
}
0