RCB AND PLAYOFFS

Problem link: https://www.codechef.com/CU1PP0005/problems/RCBPLAY

Problem code: RCBPLAY

Team RCB has earned XX points in the games it has played so far in this year’s IPL. To qualify for the playoffs they must earn at least a total of YY points. They currently have ZZ games left, in each game they earn 22 points for a win, 11 point for a draw, and no points for a loss.

Is it possible for RCB to qualify for the playoffs this year?

Solution:

#include <iostream>
using namespace std;

int main() {
  int t;
  cin>>t;
  while(t--){
      int x,y,z;
      cin>>x>>y>>z;
      if((x+(2*z))>=y)
      cout<<"yes\n";
      else
      cout<<"no\n";
  }
  return 0;
}
See also  PCM Dilemma: PCM