結果

問題 No.1468 Colourful Pastel
ユーザー heaveneleven521
提出日時 2021-04-04 15:17:43
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 60 ms / 1,000 ms
コード長 637 bytes
コンパイル時間 2,217 ms
コンパイル使用メモリ 170,192 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-27 22:48:08
合計ジャッジ時間 3,979 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

 #include <bits/stdc++.h>
using namespace std;
 
int main() {
    int n;
    cin >> n;
    vector<string> p={"Red","Orange","Yellow","Green","Cyan","Blue","Violet"};
    int cnt1[7]={};
    int cnt2[7]={};
    for(int i=0;i<n;i++){
    string q;
    cin >> q;
        for(int j=0;j<7;j++){
            if(q==p[j]){
            cnt1[j]++;
            }
        }
    }
    for(int i=0;i<n;i++){
    string r;
    cin >> r;
        for(int j=0;j<7;j++){
            if(r==p[j]){
            cnt2[j]++;
            }
        }
    }
    for(int i=0;i<7;i++){
        if(cnt1[i]>cnt2[i]){
        cout << p[i] << endl;
        }
    }
}
    
0