結果
| 問題 | 
                            No.1468 Colourful Pastel
                             | 
                    
| ユーザー | 
                             a01sa01to
                         | 
                    
| 提出日時 | 2024-11-30 00:46:55 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 50 ms / 1,000 ms | 
| コード長 | 697 bytes | 
| コンパイル時間 | 2,975 ms | 
| コンパイル使用メモリ | 250,008 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-30 00:47:04 | 
| 合計ジャッジ時間 | 4,421 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 25 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
  #include "settings/debug.cpp"
#else
  #define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
int main() {
  int n;
  cin >> n;
  vector<int> cnt(7, 0);
  const vector<string> colors = { "Red", "Orange", "Yellow", "Green", "Cyan", "Blue", "Violet" };
  auto f = [&](string s) {
    rep(i, 7) if (colors[i] == s) return i;
    assert(false);
  };
  rep(_, n) {
    string s;
    cin >> s;
    cnt[f(s)]++;
  }
  rep(_, n - 1) {
    string s;
    cin >> s;
    cnt[f(s)]--;
  }
  rep(i, 7) {
    if (cnt[i] > 0) cout << colors[i] << endl;
  }
  return 0;
}
            
            
            
        
            
a01sa01to