strange_device.cpp: In function 'int main()':
strange_device.cpp:18:27: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::set<std::pair<int, int> >::size_type {aka long unsigned int}' [-Wformat=]
     printf("%d",res.size());
                 ~~~~~~~~~~^
strange_device.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d%d",&n,&a,&b);
     ~~~~~^~~~~~~~~~~~~~~~~~~
strange_device.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d",&t,&l);
         ~~~~~^~~~~~~~~~~~~~