| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 91804 | sh25_shenpy | 数字卡片 | C++ | 运行超时 | 2000 MS | 640 KB | 364 | 2026-06-16 20:35:36 |
#include <bits/stdc++.h> using namespace std ; const int N = 1e5 + 1 ; const int M = 2e5 + 10 ; int a[M] , l = N , r = N ; int q ; int main() { cin >> q ; int op , x ; while(cin >> op >> x) { if(op == 1) a[l++] = x ; if(op == 2) a[--r] = x ; if(op == 3) cout << a[l - x] << endl ; } return 0 ; }