Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
91807 sh25_shenpy 数字卡片 C++ 输出超限 13 MS 264 KB 403 2026-06-17 06:20:15

Tests(0/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 ; int op , x ; for(int i = 1 ; i <= 100000 ; i++) { 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 ; }


测评信息: