結果

問題 No.851 テストケース
ユーザー chacoder1
提出日時 2021-05-03 19:27:47
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 17 ms / 3,153 ms
コード長 634 bytes
コンパイル時間 1,967 ms
コンパイル使用メモリ 201,284 KB
最終ジャッジ日時 2025-01-21 06:22:35
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define int long long
string a[4];
ll n[3];
signed main(void) {
  getline(cin,a[0]);
  getline(cin,a[1]);
  getline(cin,a[2]);
  getline(cin,a[3]);
  if(a[2] == ""){
    cout<<"\"assert\""<<endl;
    return 0;
  }
  n[0]=stoll(a[1]);
  n[1]=stoll(a[2]);  
  n[2]=stoll(a[3]); 
  //cout<<n[0]<<" "<<n[1]<<" "<<n[2]<<endl;
  map<int,int>mp;
  mp[-(n[0]+n[1])]++;
  mp[-(n[2]+n[1])]++;
  mp[-(n[0]+n[2])]++;   
  int cnt=0;
  for(auto e:mp){
    cnt++;
    if(cnt==2){
      cout<<-e.first<<endl;
      return 0;
    }
  }
}

    
0