結果
| 問題 | No.1934 Four Fruits |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-21 20:00:26 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 428 bytes |
| 記録 | |
| コンパイル時間 | 834 ms |
| コンパイル使用メモリ | 96,592 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-26 04:59:26 |
| 合計ジャッジ時間 | 2,025 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector<int> A(3);
for(int i = 0; 3 > i; i++){
cin>>A[i];
}
sort(A.begin(),A.end());
if(A[0] == A[2]){
cout << A[0] << endl;
}else if(A[0] == A[1]){
cout << A[2] << endl;
}else if(A[1] == A[2]){
cout << A[0] << endl;
}else{
cout << 6-A[0]-A[1]-A[2] << endl;
}
}