結果
| 問題 |
No.851 テストケース
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-31 05:16:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 3,153 ms |
| コード長 | 798 bytes |
| コンパイル時間 | 1,145 ms |
| コンパイル使用メモリ | 97,336 KB |
| 最終ジャッジ日時 | 2025-01-10 19:57:48 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <numeric>
#include <math.h>
#include <map>
using namespace std;
typedef long long int ll;
ll get(string s){
ll res=0;
for(int i=0;i<s.size();i++){
res*=10;
res+=s[i]-'0';
}
return res;
}
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n; cin >> n;
string s;
getline(cin,s);
getline(cin,s);
for(char c:s){
if(c==' '){
printf("\"assert\"\n");
return 0;
}
}
ll a[3];
a[0]=get(s);
getline(cin,s);
a[1]=get(s);
getline(cin,s);
a[2]=get(s);
sort(a,a+3);
if(a[0]!=a[1]&&a[1]!=a[2]){
printf("%lld\n",a[0]+a[2]);
}
else{
printf("%lld\n",a[0]+a[1]);
}
}