QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#77299 | #1481. Strahler Order | Yiyayu | Compile Error | / | / | C++14 | 479b | 2023-02-13 23:46:03 | 2023-02-13 23:46:04 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-02-13 23:46:04]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-02-13 23:46:03]
- 提交
answer
num = int(input())
for i in range(num):
setNum, nodes, edges = (int(j) for j in input().split())
holds = [0] * nodes
for t in range(edges):
start, end = (int(x) for x in input().split())
if holds[start-1] == holds[end-1] == 0:
holds[start-1] = holds[end-1] = 1
else:
if holds[start-1] > holds[end-1]:
holds[end-1] = holds[start-1]
elif holds[start-1] == holds[end-1]:
holds[end-1] += 1
print(str(setNum) + ' ' + str(max(holds)))
详细
answer.code:1:1: error: ‘num’ does not name a type; did you mean ‘enum’? 1 | num = int(input()) | ^~~ | enum