結果

問題 No.564 背の順
ユーザー keigomori2001
提出日時 2017-09-21 21:18:10
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 53,488 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-08 19:38:18
合計ジャッジ時間 915 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
int main(){
	int H=0,Hi=0,N=0,i=0,r=1;
	std::cin>>H>>N;
	for(i=1;i<N;i++){
		std::cin>>Hi;
		r+=(H<Hi?1:0);
		}
	switch(r%10){
		case 1:{std::cout<<r<<"st";break;}
		case 2:{std::cout<<r<<"nd";break;}
		case 3:{std::cout<<r<<"rd";break;}
		default:{std::cout<<r<<"th";break;}
		}
	return 0;
	}
0