#include <iostream> using namespace std; #include<vector> int main() { vector<char>ret; int n; cin >> n; for (int i = 0; i < n; i++) { int a, b; cin >> a >> b; int Max = max(a, b); int ceshi[30]; int num = 0; for (int j = 0; j < 30; j++) { cin >> ceshi[j]; } for (int k = 0; k < 30; k++) { if (ceshi[k] != 0 && num < 3) { if (ceshi[k] == Max) { ret.push_back('Y'); break; } num++; } if (num >= 3) { ret.push_back('N'); break; } } } for (auto& re : ret) { cout << re << " "; } return 0; }
全部评论
(1) 回帖