/ new_bzoj /

记录详情

Compile Error

foo.cc: In function 'void dfs(int)':
foo.cc:14:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   14 |     for(int i=0;i<G[u].size();i++)
      |                 ~^~~~~~~~~~~~
foo.cc: In function 'void rdfs(int)':
foo.cc:25:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |     for(int i=0;i<rG[u].size();i++)
      |                 ~^~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:51:5: error: 'memset' was not declared in this scope
   51 |     memset(book,0,sizeof(book));
      |     ^~~~~~
foo.cc:4:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    3 | #include<vector>
  +++ |+#include <cstring>
    4 | #define maxn 50000
foo.cc:56:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
   56 |     printf("%d\n",cmp[cnt].size());
      |             ~^    ~~~~~~~~~~~~~~~
      |              |                 |
      |              int               std::vector<int>::size_type {aka long unsigned int}
      |             %ld
foo.cc:30:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   30 |     scanf("%d%d",&n,&m);
      |     ~~~~~^~~~~~~~~~~~~~
foo.cc:34:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   34 |         scanf("%d%d",&x,&y);
      |         ~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
受欢迎的牛
语言
C++
递交时间
2022-01-07 19:54:51
评测时间
2022-01-07 19:54:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes