結果

問題 No.2599 Summer Project
ユーザー kapoonkapoon
提出日時 2024-01-15 15:50:41
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 539 bytes
コンパイル時間 525 ms
コンパイル使用メモリ 65,340 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-15 15:50:42
合計ジャッジ時間 977 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 WA -
testcase_02 AC 2 ms
6,676 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;
int main(void){
    string s,t;
    string m[3]={"beachball","watermelon","shrinebell"};
    bool c[3]={false};
    cin>>s>>t;
    if(s[0]=='w'){
        c[0]=true;
    }else if(s[0]=='b'){
        c[1]=true;
    }else if(s[0]=='c'){
        c[2]=true;
    }
    if(t[0]=='w'){
        c[0]=true;
    }else if(t[0]=='b'){
        c[1]=true;
    }else if(t[0]=='c'){
        c[2]=true;
    }

    for(int i=0;i<3;i++){
        if(c[i]==false)cout<<m[i];
    }
    
    return 0;
}
0