QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#582910#114. Construction of Highway_114514_Compile Error//C++17449b2024-09-22 17:45:192024-09-22 17:45:21

Judging History

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

  • [2024-09-22 17:45:21]
  • 评测
  • [2024-09-22 17:45:19]
  • 提交

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;
}

详细

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 | }
      | ^