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