Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int n,j,i,flg,a[20];
- freopen("hello.in","r",stdin);
- scanf("%d",&n);
- for(j=1;j<=n;j++){
- flg=0;
- for(i=1;i<=12;i++)
- scanf("%d",&a[i]);
- for(i=2;i<=4;i++){
- if(a[i]<a[i-1])
- flg=1;
- }
- for(i=5;i<=12;i++){
- if(a[i]<=a[4]){
- flg=1;
- }
- }
- if(flg==1)
- printf("no\n");
- else
- printf("yes\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement