結果

問題 No.1468 Colourful Pastel
ユーザー 3_3_nk
提出日時 2021-04-04 14:13:42
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 174 ms / 1,000 ms
コード長 1,085 bytes
コンパイル時間 4,359 ms
コンパイル使用メモリ 257,148 KB
最終ジャッジ日時 2025-01-20 11:10:03
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using P = pair<ll, ll>;
#define PREP(i, s, x) for(ll i = (s); i < (x); i++)
#define MREP(i, s, x) for(ll i = (s); i >= (x); i--)
#define REP(i, x) PREP(i, 0, x)
template<typename T> inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); }
template<typename T> inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true) : (false)); }

// variable / structure -------------------------------

constexpr ll INF = (1ll << 60);
constexpr ll MOD = 1000000007ll;

// function -------------------------------------------

// main -----------------------------------------------

int main() {
    ll n;
    cin >> n;
    vector<string> a(n), b(n-1);
    REP(i, n){
        cin >> a[i];
    }
    REP(i, n-1){
        cin >> b[i];
    }
    sort(a.begin(), a.end());
    sort(b.begin(), b.end());
    REP(i, n-1){
        if(a[i] != b[i]){
            cout << a[i] << endl;
            return 0;
        }
    }
    cout << a[n-1] << endl;
    return 0;
}
0