Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int R,S,T,input;
  7. cin >> R >> S >> T ;
  8. cin >> input;
  9. int a[input];
  10. for(int i=0; i<input; i++){
  11. cin >> a[i] ;
  12. a[i]-= R;
  13. for(int j=1; j<=a[i]; j++){
  14. if(a[i]%5+4 < 5){
  15. cout << "yes" << endl;
  16. }
  17. else if(a[i]%5+4 > 5){
  18. cout << "no" << endl;
  19. }
  20. else if(R >= 3){
  21. cout << "no" << endl;
  22. }
  23.  
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement