/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int cmp(const void*, const void*)':
foo.cpp:31:20: error: no matching function for call to 'NodeTp::NodeTp(const void*&)'
 NodeTp y=*(NodeTp )b; return x.W > y.W ? 1:-1; }
                    ^
foo.cpp:31:20: note: candidates are:
foo.cpp:11:8: note: NodeTp::NodeTp()
 struct NodeTp
        ^
foo.cpp:11:8: note:   candidate expects 0 arguments, 1 provided
foo.cpp:11:8: note: constexpr NodeTp::NodeTp(const NodeTp&)
foo.cpp:11:8: note:   no known conversion for argument 1 from 'const void*' to 'const NodeTp&'
foo.cpp:11:8: note: constexpr NodeTp::NodeTp(NodeTp&&)
foo.cpp:11:8: note:   no known conversion for argument 1 from 'const void*' to 'NodeTp&&'
foo.cpp: In function 'void init()':
foo.cpp:34:92: error: 'struct NodeTp' has no member named 'Lp'
 scanf("%d%d%d",&n,&KL,&KR); for (i=1;i<=n;i++) {scanf("%d%d",&p[i].L,&p[i].R); p[i].W=p[i].Lp[i].R; } qsort(p+1,n,sizeof(p[1]),cmp); }
                                                                                            ^

信息

递交者
类型
递交
题目
P1779 国王游戏
语言
C++
递交时间
2015-07-22 10:23:21
评测时间
2015-07-22 10:23:24
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes