結果
問題 |
No.1468 Colourful Pastel
|
ユーザー |
![]() |
提出日時 | 2021-04-04 15:09:04 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 81 ms / 1,000 ms |
コード長 | 1,085 bytes |
コンパイル時間 | 5,125 ms |
コンパイル使用メモリ | 257,296 KB |
最終ジャッジ日時 | 2025-01-20 11:12:29 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
#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; }