Advertisement
erfanul007

Untitled

Jan 18th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n,j,i,flg,a[20];
  5. freopen("hello.in","r",stdin);
  6. scanf("%d",&n);
  7. for(j=1;j<=n;j++){
  8. flg=0;
  9. for(i=1;i<=12;i++)
  10. scanf("%d",&a[i]);
  11. for(i=2;i<=4;i++){
  12. if(a[i]<a[i-1])
  13. flg=1;
  14. }
  15. for(i=5;i<=12;i++){
  16. if(a[i]<=a[4]){
  17. flg=1;
  18. }
  19. }
  20. if(flg==1)
  21. printf("no\n");
  22. else
  23. printf("yes\n");
  24. }
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement