提出 #813970


ソースコード 拡げる

#include<map>
#include<string>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){

	int N;
	int temp = 0;
	int a[1001] = { 0 };

	cin >> N;

	for (int i = 0; i < N; i++){
		cin >> a[i];
	}
	sort(a, a + N);

	temp = a[N - 1];
	for (int i = N - 1; i >= 0; i--){
		if (temp != a[i]) {
			cout << a[i] << endl;
			return 0;
		}
	}
	return 0;
}

提出情報

提出日時
問題 B - 心配性な富豪、ファミリーレストランに行く。
ユーザ y0u7t1a8
言語 C++ (G++ 4.6.4)
得点 100
コード長 386 Byte
結果 AC
実行時間 29 ms
メモリ 920 KiB

ジャッジ結果

セット名 All
得点 / 配点 100 / 100
結果
AC × 15
セット名 テストケース
All random_1.txt, random_10.txt, random_2.txt, random_3.txt, random_4.txt, random_5.txt, random_6.txt, random_7.txt, random_8.txt, random_9.txt, small_1.txt, small_2.txt, small_3.txt, small_4.txt, small_5.txt
ケース名 結果 実行時間 メモリ
random_1.txt AC 27 ms 916 KiB
random_10.txt AC 26 ms 872 KiB
random_2.txt AC 26 ms 920 KiB
random_3.txt AC 26 ms 796 KiB
random_4.txt AC 26 ms 916 KiB
random_5.txt AC 25 ms 876 KiB
random_6.txt AC 26 ms 796 KiB
random_7.txt AC 29 ms 868 KiB
random_8.txt AC 27 ms 812 KiB
random_9.txt AC 26 ms 872 KiB
sample_1.txt AC 26 ms 840 KiB
sample_2.txt AC 26 ms 884 KiB
sample_3.txt AC 26 ms 796 KiB
small_1.txt AC 25 ms 796 KiB
small_2.txt AC 25 ms 868 KiB
small_3.txt AC 25 ms 876 KiB
small_4.txt AC 26 ms 800 KiB
small_5.txt AC 25 ms 920 KiB