QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#403108#8302. Incoming Asteroidsjames1BadCreeperWA 3ms17712kbC++141.1kb2024-05-01 21:31:372024-05-01 21:31:38

Judging History

你现在查看的是最新测评结果

  • [2024-05-01 21:31:38]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:17712kb
  • [2024-05-01 21:31:37]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5; 

int n, q; 
int a[N], arr[N], id; 
set<pair<int, int>> st[N]; 
struct Node {
    int pos, val, bck; 
    Node(int pos = 0, int val = 0, int bck = 0) : pos(pos), val(val), bck(bck) {}
}; 
vector<Node> loc[N]; 

int main(void) {
    ios::sync_with_stdio(0);   
    cin >> n >> q; 
    for (int lst = 0; q--; ) {
        int op; cin >> op; 
        if (op == 1) {
            int y, k; cin >> y >> k; y ^= lst; arr[id++] = y; 
            for (int i = 0; i < k; ++i) {
                int v; cin >> v; v ^= lst; 
                st[v].emplace((y + 2) / 3 + a[v], id); 
                loc[id].emplace_back(v, (y + 2) / 3 + a[v], a[v]); 
            }
        } else {
            int x, y; cin >> x >> y; x ^= lst; y ^= lst; 
            int cnt = 0; a[x] += y; 
            vector<int> ans; 
            while (!st[x].empty()) {
                auto it = *st[x].begin(); 
                if (a[x] < it.first) break; 
                int idx = it.second; 
                vector<int> vec; 
                
            }
        }
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 3ms
memory: 17712kb

input:

3 5
1 5 3 1 2 3
2 2 1
1 2 2 1 2
2 3 1
2 1 3

output:


result:

wrong answer 1st lines differ - expected: '0', found: ''