tortoise.cpp: In function 'int dp(int, int)':
tortoise.cpp:16:6: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
16 | if(i>shop.size()||t>2*n)return 0;
| ~^~~~~~~~~~~~
tortoise.cpp:21:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
21 | if(nx[i]<play.size())sd=min(sd,play[nx[i]]-shop[i]);
| ~~~~~^~~~~~~~~~~~
tortoise.cpp:30:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
30 | if(nx[i]<play.size())take=min(take,abs(shop[y]-play[nx[i]])+abs(shop[i]-play[nx[i]]));
| ~~~~~^~~~~~~~~~~~
tortoise.cpp:18:6: warning: unused variable 'num' [-Wunused-variable]
18 | int num=0;
| ^~~
tortoise.cpp: In function 'int main()':
tortoise.cpp:53:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
53 | for(int x=0;x<shop.size();++x){
| ~^~~~~~~~~~~~
tortoise.cpp:55:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
55 | while(cur+1<play.size()&&play[cur+1]<i)++cur;
| ~~~~~^~~~~~~~~~~~
tortoise.cpp:41:4: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
41 | sf("%d",&n);
| ^
tortoise.cpp:44:5: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
44 | sf("%d",&a[i]);
| ^