/ new_bzoj /

记录详情

Accepted

/in/foo.cc: In function 'line solve(point, point)':
/in/foo.cc:30:29: warning: narrowing conversion of 'a.point::x' from 'int' to 'double' inside { } [-Wnarrowing]
  if(a.x==b.x)return(line){a.x,0,min(a.y,b.y),max(a.y,b.y),1};
                           ~~^
/in/foo.cc:30:36: warning: narrowing conversion of '(int)std::min<int>(a.point::y, b.point::y)' from 'int' to 'double' inside { } [-Wnarrowing]
  if(a.x==b.x)return(line){a.x,0,min(a.y,b.y),max(a.y,b.y),1};
                                 ~~~^~~~~~~~~
/in/foo.cc:30:49: warning: narrowing conversion of '(int)std::max<int>(a.point::y, b.point::y)' from 'int' to 'double' inside { } [-Wnarrowing]
  if(a.x==b.x)return(line){a.x,0,min(a.y,b.y),max(a.y,b.y),1};
                                              ~~~^~~~~~~~~
/in/foo.cc:33:31: warning: narrowing conversion of '(int)std::min<int>(a.point::x, b.point::x)' from 'int' to 'double' inside { } [-Wnarrowing]
   return(line){k,a.y-k*a.x,min(a.x,b.x),max(a.x,b.x),0};
                            ~~~^~~~~~~~~
/in/foo.cc:33:44: warning: narrowing conversion of '(int)std::max<int>(a.point::x, b.point::x)' from 'int' to 'double' inside { } [-Wnarrowing]
   return(line){k,a.y-k*a.x,min(a.x,b.x),max(a.x,b.x),0};
                                         ~~~^~~~~~~~~
/in/foo.cc: In function 'bool pubp(line, point)':
/in/foo.cc:40:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   return(eol(l.l,(pt1+pt2)/pt3)&&eol((pt1+pt2)/pt3,l.r)||eol(l.l,(pt1-pt2)/pt3)&&eol((pt1-pt2)/pt3,l.r));
          ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'void Spawn()':
/in/foo.cc:61:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<a.size();++i)if(a[i].p.x==0&&a[i].p.y==0)return;
              ~^~~~~~~~~
/in/foo.cc: In function 'void Put_pheromone()':
/in/foo.cc:67:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<a.size();++i)ph[a[i].p.x][a[i].p.y]+=(tca==i?5:2);
              ~^~~~~~~~~
/in/foo.cc: In function 'bool Blank(int, int)':
/in/foo.cc:71:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<a.size();++i)if(a[i].p.x==x&&a[i].p.y==y)return false;
              ~^~~~~~~~~
/in/foo.cc: In function 'void Move()':
/in/foo.cc:81:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0,w;i<a.size();++i){
                ~^~~~~~~~~
/in/foo.cc: In function 'void Shoot(point, point)':
/in/foo.cc:96:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<a.size();++i)if(pubp(ray,a[i].p))a[i].hp-=d;
              ~^~~~~~~~~
/in/foo.cc: In function 'void Attack()':
/in/foo.cc:103:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(int j=0;j<a.size();++j)td=dis(turret[i],a[j].p),td<mnd?mnd=td,sa=j:0;
                ~^~~~~~~~~
/in/foo.cc: In function 'void End(int)':
/in/foo.cc:109:54: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::vector<ant>::size_type {aka long unsigned int}' [-Wformat=]
  printf("Game over after %d seconds\n%d\n",T,a.size());
                                                      ^
/in/foo.cc:110:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<a.size();++i)printf("%d %d %d %d %d\n",a[i].age,a[i].level,a[i].hp,a[i].p.x,a[i].p.y);
              ~^~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:120:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i<a.size();++i)if(a[i].p.x==n&&a[i].p.y==m&&tca==-1)tca=i,a[i].hp=min(a[i].mxhp,a[i].hp+a[i].mxhp/2);
               ~^~~~~~~~~
/in/foo.cc:122:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i<a.size();++i)if(a[i].hp<0)a.erase(a.begin()+i),tca==i?tca=-1:0,tca>i?--tca:0,--i;
               ~^~~~~~~~~
/in/foo.cc:123:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i<a.size();++i)if(tca==i&&a[i].p.x==0&&a[i].p.y==0)End(Time);
               ~^~~~~~~~~
/in/foo.cc:125:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i<a.size();++i)++a[i].age;
               ~^~~~~~~~~
/in/foo.cc:127:46: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<ant>::size_type {aka long unsigned int}' [-Wformat=]
  printf("The game is going on\n%d\n",a.size());
                                              ^
/in/foo.cc:128:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<a.size();++i)printf("%d %d %d %d %d\n",a[i].age,a[i].level,a[i].hp,a[i].p.x,a[i].p.y);
              ~^~~~~~~~~
/in/foo.cc: In function 'void Attack()':
/in/foo.cc:104:34: warning: 'sa' may be used uninitialized in this function [-Wmaybe-uninitialized]
    if(mnd<=r)Shoot(turret[i],a[sa].p);
                                  ^
# 状态 耗时 内存占用
#1 Accepted 2ms 584.0 KiB
#2 Accepted 157ms 752.0 KiB
#3 Accepted 89ms 204.0 KiB
#4 Accepted 1ms 204.0 KiB
#5 Accepted 2ms 204.0 KiB
#6 Accepted 2ms 204.0 KiB
#7 Accepted 4ms 204.0 KiB
#8 Accepted 10ms 204.0 KiB
#9 Accepted 1ms 204.0 KiB
#10 Accepted 22ms 204.0 KiB

信息

递交者
类型
递交
题目
杀蚂蚁antbuster
语言
C++
递交时间
2019-03-12 16:56:33
评测时间
2019-03-12 16:56:33
评测机
分数
100
总耗时
294ms
峰值内存
752.0 KiB