0
已解决
陈振轩
高级光能
高级光能
#include<bits/stdc++.h>
using namespace std;
int main()
{
int x, n;
cin >> n >> x;
int a[n + 1];
for (int i = 1; i <= n; ++i)
cin >> a[i];
for (int i = 1; i <= n; ++i)
{
if (a[i] + a[i + 1] == x)
{
cout << "Y";
return 0;
}
}
cout << "N";
return 0;
}
八十分