colors.cpp: In function 'int main()':
colors.cpp:46:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i= 1;i <= n;i++) if(G[i].size() == n-1)star = i;
~~~~~~~~~~~~^~~~~~
colors.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&tc);
~~~~~^~~~~~~~~~
colors.cpp:13:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
~~~~~^~~~~~~~~~~~~~
colors.cpp:16:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~
colors.cpp:19:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&b[i]);
~~~~~^~~~~~~~~~~~
colors.cpp:23:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&u,&v);
~~~~~^~~~~~~~~~~~~~
colors.cpp:63:29: warning: 'star' may be used uninitialized in this function [-Wmaybe-uninitialized]
a[star] = a[x] = b[x];
~~~~~~~~^~~~~~~~~~~~~