結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2020-06-05 19:33:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 926 ms |
コンパイル使用メモリ | 80,568 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-16 07:02:10 |
合計ジャッジ時間 | 1,306 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 3 |
ソースコード
#include<iostream> #include<math.h> #include<string.h> #include<vector> #include<algorithm> #include<iomanip> #include<deque> using namespace std; int main(){ int h,n; cin >> h >> n; int ans=1; for(int i=0;i<n-1;i++){ int temp; cin >> temp; if(temp>h)ans++; } cout << ans; if(ans==1){ cout << "st" << endl; }else if(ans==2){ cout << "nd" << endl; }else if(ans==3){ cout << "rd" << endl; }else{ cout << "th" << endl; } return 0; }