結果
| 問題 |
No.3171 Color Restoration
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-06 22:40:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 750 bytes |
| コンパイル時間 | 2,758 ms |
| コンパイル使用メモリ | 213,524 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2025-06-06 22:40:51 |
| 合計ジャッジ時間 | 3,998 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
vector<string> S1 = {"gray","brown","green","cyan","blue","yellow","orange","red"};
vector<string> S2 = {"gray","green","blue","yellow","red"};
vector<string> S3 = {"gray","green","cyan","blue","violet","orange","red"};
map<vector<string>,int> S;
for(int i=0; i<S1.size(); i++) for(int k=0; k<S2.size(); k++) for(int l=0; l<S3.size(); l++){
vector<string> now = {S1.at(i),S2.at(k),S3.at(l)};
sort(now.begin(),now.end());
S[now]++;
}
vector<string> A(3);
for(auto &a : A) cin >> a;
sort(A.begin(),A.end());
if(S[A] == 1) cout << "Yes\n";
else cout << "No\n";
}