QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#403108 | #8302. Incoming Asteroids | james1BadCreeper | WA | 3ms | 17712kb | C++14 | 1.1kb | 2024-05-01 21:31:37 | 2024-05-01 21:31:38 |
Judging History
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: ''