結果

問題 No.1257 変わった平均値
コンテスト
ユーザー 57tggx
提出日時 2020-10-16 21:45:35
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 381µs
コード長 458 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 450 ms
コンパイル使用メモリ 89,856 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-20 15:56:31
合計ジャッジ時間 2,502 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>
#include <algorithm>

int main(){
	std::vector<int> before(3), after(3);
	for(int i = 0; i < 3; ++i){
		std::cin >> before[i];
	}
	for(int i = 0; i < 3; ++i){
		std::cin >> after[i];
	}
	std::sort(before.begin(), before.end());
	std::sort(after.begin(), after.end());
	for(int i = 0; i < 3; ++i){
		if(before[i] != after[i]){
			std::cout << "No" << std::endl;
			return 0;
		}
	}
	std::cout << "Yes\n2" << std::endl;
}
0