QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#582910 | #114. Construction of Highway | _114514_ | Compile Error | / | / | C++17 | 449b | 2024-09-22 17:45:19 | 2024-09-22 17:45:21 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
.push_back(w[i]);
sort(vals.begin(),vals.end()),vals.erase(unique(vals.begin(),vals.end()),vals.end());
for(int i=1;i<=n;++i) w[i]=lower_bound(vals.begin(),vals .end(),w[i])-vals.begin()+1;
LCT.col[1]=w[1],LCT.siz[1]=1;
for(int i=1;i<n;++i) {
int u,v;
scanf("%lld%lld",&u,&v);
LCT.cover(u,w[v]);
printf("%lld\n",ans);
LCT.fa[v]=u,LCT.col[v]=w[v],LCT.siz[v]=1;
}
return 0;
}
Details
answer.code:3:1: error: expected unqualified-id before ‘.’ token 3 | .push_back(w[i]); | ^ answer.code:4:13: error: expected constructor, destructor, or type conversion before ‘(’ token 4 | sort(vals.begin(),vals.end()),vals.erase(unique(vals.begin(),vals.end()),vals.end()); | ^ answer.code:5:9: error: expected unqualified-id before ‘for’ 5 | for(int i=1;i<=n;++i) w[i]=lower_bound(vals.begin(),vals .end(),w[i])-vals.begin()+1; | ^~~ answer.code:5:21: error: ‘i’ does not name a type 5 | for(int i=1;i<=n;++i) w[i]=lower_bound(vals.begin(),vals .end(),w[i])-vals.begin()+1; | ^ answer.code:5:26: error: expected unqualified-id before ‘++’ token 5 | for(int i=1;i<=n;++i) w[i]=lower_bound(vals.begin(),vals .end(),w[i])-vals.begin()+1; | ^~ answer.code:6:9: error: ‘LCT’ does not name a type 6 | LCT.col[1]=w[1],LCT.siz[1]=1; | ^~~ answer.code:7:9: error: expected unqualified-id before ‘for’ 7 | for(int i=1;i<n;++i) { | ^~~ answer.code:7:21: error: ‘i’ does not name a type 7 | for(int i=1;i<n;++i) { | ^ answer.code:7:25: error: expected unqualified-id before ‘++’ token 7 | for(int i=1;i<n;++i) { | ^~ answer.code:14:9: error: expected unqualified-id before ‘return’ 14 | return 0; | ^~~~~~ answer.code:15:1: error: expected declaration before ‘}’ token 15 | } | ^