编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#21264 #1001. A. 神秘谜题 Time Limit Exceeded 0 1586 ms 476 K C++ 11 / 513 B orz233 2020-02-02 20:27:44
显示原始代码
#include <iostream>

using namespace std;

const int Max = 2e5;
int n;
int cnt = 0;
int a[Max];

void OP1() {
    for (int i = 0; i < cnt; i++) a[i]++;
}

void OP2(int x) {
    a[cnt] = x;
    cnt++;
}

int OR_SUM() {
    int tmp = 0;
    for (int i = 0; i < cnt; i++) tmp = tmp ^ a[i];
    return tmp;
}

int main() {
    cin >> n;
    int op, x;
    for (int i = 1; i <= n; i++) {
        cin >> op;
        if (op == 2) {
            cin >> x;
            OP2(x);
        } else {
            OP1();
        }
        cout << OR_SUM() << endl;
    }
    return 0;
}
子任务 #1
Time Limit Exceeded
得分:0
测试点 #1
Time Limit Exceeded
得分:0
用时:792 ms
内存:476 KiB

输入文件(1.in

200000
2 526767110
2 724642759
2 567837900
2 104106873
2 357915481
2 33997211
2 444788944
2 
<1586974 bytes omitted>

答案文件(1.ans

526767110
877985729
361528077
330887284
116239149
82537142
510237286
843295274
453728745
55
<2188330 bytes omitted>

用户输出

526767110
877985729
361528077
330887284
116239149
82537142
510237286
843295274
453728745
559263713
323554710
713540578
520942594
<588514 bytes omitted>
测试点 #2
Time Limit Exceeded
得分:0
用时:794 ms
内存:468 KiB

输入文件(2.in

200000
2 515979308
2 512702340
2 684230440
2 488136957
2 598252313
2 283603971
2 349877373
2
<1586842 bytes omitted>

答案文件(2.ans

515979308
5115816
679905408
899606653
372667236
114362215
302756634
473674072
520218589
525
<2192841 bytes omitted>

用户输出

515979308
5115816
679905408
899606653
372667236
114362215
302756634
473674072
520218589
525056845
703148326
764590712
207056035

<592374 bytes omitted>