Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
230113 | 2224梁翁思译 | *小美的排列询问 | C++ | 解答错误 | 20 | 0 MS | 1076 KB | 424 | 2024-01-07 16:10:21 |
#include<bits/stdc++.h> using namespace std; #define unsigned long long int int n; int a[2000005] = {0}; int x,y; signed main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n; for(int i = 0;i < n;i++) { int tmp; cin >> tmp; a[tmp] = i; } cin >> x >> y; if(a[x] - a[y] == 1) { cout << "Yes"; return 0; } cout << "No"; return 114514; return 1919810; }