fork download
  1. #include <iostream>
  2. #include<cstdio>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. long int t,x,y,k,n,i,c,p,count;
  8. scanf("%ld",&t);
  9.  
  10. while(t--)
  11. {count=0;
  12. scanf("%ld%ld%ld%ld",&x,&y,&k,&n);
  13. for(i=0;i<n;i++)
  14. {
  15. scanf("%ld%ld",&p,&c);
  16. if(x==y||x<y)
  17. printf("1Luckychef\n");
  18. else{
  19. if(k>=c&&p>=(x-y)){
  20. printf("2LuckyChef\n");
  21. break;}
  22. else
  23. count++;
  24. if(count==n)
  25. printf("3UnluckyChef\n");
  26. }
  27.  
  28. }
  29.  
  30.  
  31. }
  32. return 0;
  33. }
Success #stdin #stdout 0s 3144KB
stdin
1
4 5 5 2
1 1
2 2
stdout
1Luckychef
1Luckychef