結果
| 問題 | 
                            No.1468 Colourful Pastel
                             | 
                    
| ユーザー | 
                             kekenx
                         | 
                    
| 提出日時 | 2024-01-13 01:15:19 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 18 ms / 1,000 ms | 
| コード長 | 461 bytes | 
| コンパイル時間 | 896 ms | 
| コンパイル使用メモリ | 78,740 KB | 
| 最終ジャッジ日時 | 2025-02-18 19:31:24 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 25 | 
ソースコード
#include <iostream>
#include <cassert>
#include <map>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N; cin >> N;
  map<string, int> A, B;
  for (int i = 0; i < N; i++) {
    string a; cin >> a;
    A[a]++;
  }
  for (int i = 0; i < N - 1; i++) {
    string b; cin >> b;
    B[b]++;
  }
  for (const auto &[val, cnt]: A) {
    if (B[val] != cnt) {
      cout << val << endl;
      break;
    }
  }
  return 0;
}
            
            
            
        
            
kekenx