結果

問題 No.570 3人兄弟(その1)
ユーザー d_seid_sei
提出日時 2019-08-20 21:01:55
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 576 bytes
コンパイル時間 828 ms
コンパイル使用メモリ 77,808 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-07-28 20:36:14
合計ジャッジ時間 1,581 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include <vector>
#include<cmath>
using namespace std;
typedef long long int lont;
int main() {
	vector<int>veca(3);
	vector<int>vecb(3);
	for (int ia = 0; ia < 3; ia++) {
		cin >> veca.at(ia);
	}
	for (int ib = 0; ib < 3; ib++) {
		vecb.at(ib)=veca.at(ib);
	}
	sort(vecb.begin(), vecb.end());
	reverse(vecb.begin(), vecb.end());
	for (int ic = 0; ic < 3; ic++) {
		if (vecb.at(ic) == veca.at(0))cout << 'A' << endl;
		else if (vecb.at(ic) == veca.at(1))cout << 'B' << endl;
		else if (vecb.at(ic) == veca.at(2))cout << 'C' << endl;
	}
}
0