Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
230094 2224梁翁思译 *小美的排列询问 C++ 解答错误 60 4 MS 1052 KB 340 2024-01-07 15:52:07

Tests(3/5):


#include<bits/stdc++.h> using namespace std; #define unsigned long long int int n; int a[2000005] = {0}; int x,y; signed main() { cin >> n; for(int i = 0;i < n;i++) { int tmp; cin >> tmp; a[tmp] = i; } cin >> x >> y; if(abs(a[x] - a[y]) == 1) { cout << "Yes"; return 0; } cout << "No"; return 0; }


测评信息:

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

200000
153707 72674 16474 195180 63721 157425 12247 35884 115255 26883 130916 102071 16174 42541 14672 193362 81277 109851 132177 11377 13214 26573 118379 186730 176112 187719 164619 81523 64748 1560...

输出

No

答案

Yes

系统信息

exit code: 0, checker exit code: 0

输入

200000
99935 38168 45215 43246 183091 17079 140971 56100 194105 70761 46542 98020 174714 185289 82647 192148 104581 30294 16640 162669 49154 117086 9243 129281 112581 162885 4110 111040 145952 48999 ...

输出

No

答案

Yes

系统信息

exit code: 0, checker exit code: 0