社区讨论
出题人的警示后人 & 解释 UKE 的原因
P15267「UTOI 1B」Chaotic Time Trio参与者 4已保存回复 5
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 5 条
- 当前快照
- 1 份
- 快照标识符
- @mlhxpok7
- 此快照首次捕获于
- 2026/02/11 19:16 上周
- 此快照最后确认于
- 2026/02/13 17:50 6 天前
这道题
checker 判的时候稍微有点问题。直接把 UKE 当成 WA 就行了。
CPP for (int i = 1; i <= n - 1; i++){
int a = ouf.readInt(), b = ouf.readInt();
if (a == -1) quitf(_wa, "There is a solution but participant did not found in testcase");
if (st.find(a) == st.end()) quitf(_wa, "In testcase %d: Element %d not found", tc, a);
else if (st.find(b) == st.end()) quitf(_wa, "In testcase %d: Element %d not found.", tc, b);
else{
int cur = mex(a, b);
st.erase(st.find(a));
st.erase(st.find(b));
st.insert(cur);
}
}
本来应该先删一个,然后再判 是否在集合里的。导致集合内只剩一个某种元素的时候读入两个判不掉。erase 的时候集合内没有这个元素,checker RE,就会显示 UKE。
这应该不算锅,毕竟不影响评测结果和分数(?)
回复
共 5 条回复,欢迎继续交流。
正在加载回复...