結果

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ull=unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)

vector<string> Colors = {
  "Red","Orange","Yellow","Green","Cyan","Blue","Violet"
};

int C[7]={};
int C2[7]={};

int main(){
  int N; cin>>N;
  rep(i,N){
    string s; cin>>s;
    rep(t,7) if(Colors[t]==s) C[t]++;
  }
  rep(i,N-1){
    string s; cin>>s;
    rep(t,7) if(Colors[t]==s) C2[t]++;
  }
  rep(t,7){
    if(C[t]>C2[t]) cout<<Colors[t]<<"\n";
  }
  return 0;
}
0