Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
229931 | 232214陈皓轩 | *小美的排列询问 | C++ | Wrong Answer | 60 | 0 MS | 1048 KB | 338 | 2024-01-07 14:00:26 |
#include <iostream> using namespace std; int n; int a[200005]; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; } int x, y; cin >> x >> y; for (int i = 1; i < n; i++) { if (a[i] == x && a[i + 1] == y || a[i] == y && a[i + 1] == x) { cout << "Yes\n"; return 0; } } cout << "No\n"; }