/in/foo.cc: In function 'int main()':
/in/foo.cc:192:29: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
n = m = HasGetCake= target = s = d = r = bornants=nowants=0;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'bool update()':
/in/foo.cc:185:29: warning: iteration 5 invokes undefined behavior [-Waggressive-loop-optimizations]
rep(i,1,MAX_nants) if(a[i].Isalive) a[i].age++;
~~~~~^~~~~~~
/in/foo.cc:9:36: note: within this loop
#define rep(i,a,b) for(int i = a;i <= b;i++)
^
/in/foo.cc:185:2: note: in expansion of macro 'rep'
rep(i,1,MAX_nants) if(a[i].Isalive) a[i].age++;
^~~
/in/foo.cc:174:11: warning: iteration 5 invokes undefined behavior [-Waggressive-loop-optimizations]
if(a[i].Isalive&& reachable[a[i].x][a[i].y] && a[i].blood < 0) {
~~~~~^~~~~~~
/in/foo.cc:9:36: note: within this loop
#define rep(i,a,b) for(int i = a;i <= b;i++)
^
/in/foo.cc:173:2: note: in expansion of macro 'rep'
rep(i,1,MAX_nants)
^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:195:32: warning: iteration 10 invokes undefined behavior [-Waggressive-loop-optimizations]
map[i][j] = reachable[i][j] = 0;
~~~~~~~~~~~~~~~~^~~
/in/foo.cc:9:36: note: within this loop
#define rep(i,a,b) for(int i = a;i <= b;i++)
^
/in/foo.cc:194:3: note: in expansion of macro 'rep'
rep(j,0,MAX_m)
^~~
/in/foo.cc: In function 'void move(int)':
/in/foo.cc:87:6: warning: 'dir' may be used uninitialized in this function [-Wmaybe-uninitialized]
int dir, maxpheromon = -1, x = a[id].x, y = a[id].y;
^~~