/in/foo.cc: In function 'void tree_dp(long long int, long long int)':
/in/foo.cc:53:42: warning: iteration 3 invokes undefined behavior [-Waggressive-loop-optimizations]
dp[from][(j+val)%7]+=dp[to][j];
~~~~~~~~^
/in/foo.cc:11:42: note: within this loop
#define rep(i,s,e) for(register int i=s;i<=e;++i)
/in/foo.cc:52:13:
rep(j,0,6)
~~~~~
/in/foo.cc:52:9: note: in expansion of macro 'rep'
rep(j,0,6)
^~~
/in/foo.cc:51:26: warning: iteration 3 invokes undefined behavior [-Waggressive-loop-optimizations]
ans+=dp[to][j]*dp[from][((-j-val)%7+7)%7]*6;
~~~~~~~~^
/in/foo.cc:11:42: note: within this loop
#define rep(i,s,e) for(register int i=s;i<=e;++i)
/in/foo.cc:50:13:
rep(j,0,6)
~~~~~
/in/foo.cc:50:9: note: in expansion of macro 'rep'
rep(j,0,6)
^~~