Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
91803 sh25_shenpy 数字卡片 C++ 运行超时 2000 MS 644 KB 383 2026-06-16 20:34:20

Tests(5/19):


#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 ; while(q--) { int op , x ; 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 ; }


测评信息: