/ Vijos /

记录详情

Compile Error

foo.cc: In function 'void dfs(int, int, int)':
foo.cc:13:29: error: reference to 'tm' is ambiguous
         dfs(s,x,curr);dfs(s+tm[i],x,curr+v[i]);
                             ^~
foo.cc:4:5: note: candidates are: int tm [1000]
 int tm[1000],vl[1000];
     ^~
In file included from /usr/include/time.h:39:0,
                 from /usr/include/c++/7/ctime:42,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:49,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note:                 struct tm
 struct tm
        ^~
foo.cc:13:32: error: 'i' was not declared in this scope
         dfs(s,x,curr);dfs(s+tm[i],x,curr+v[i]);
                                ^
foo.cc:13:42: error: 'v' was not declared in this scope
         dfs(s,x,curr);dfs(s+tm[i],x,curr+v[i]);
                                          ^
foo.cc: In function 'int main()':
foo.cc:18:30: error: reference to 'tm' is ambiguous
     for(int i=0;i<m;i++)cin>>tm[i]>>vl[i];
                              ^~
foo.cc:4:5: note: candidates are: int tm [1000]
 int tm[1000],vl[1000];
     ^~
In file included from /usr/include/time.h:39:0,
                 from /usr/include/c++/7/ctime:42,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:49,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note:                 struct tm
 struct tm
        ^~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1104 采药
语言
C++
递交时间
2021-10-15 18:42:36
评测时间
2021-10-15 18:42:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes