File size: 2,960 Bytes
da6962b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
code`block`FunctionDecl`FunctionDeclRec`ForStmt`ForStmtRec`DoStmt`DoStmtRec`WhileStmt`WhileStmtRec`IfStmt`IfStmtRec`SwitchStmt`SwitchStmtRec`countBlocks`countBlocksRec`countCondition`countVariable`countLiteral`IntegerLiteral`StringLiteral`IfStmt`ForStmt`WhileStmt`DoStmt`SwitchStmt`countLoop`VarDecl`DeclRefExpr`DeclStmt`countDecl`countPointer`writeFunction`CallExpr`BinaryOperator`UnaryOperator`CompoundAssignOperator`countOperand`ArraySubscriptE`RealFaultLocation
	int a,b[1001],c[1001];`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`3`0`1`4`0`0`0`0`0`0`0`0`1
	while(~scanf("%d",&a))`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`1`0`1`0`0`1`0`0`1`0`2`0`2`1`0`1`0`2`0`2`0`0
		if(a == 1)`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`1
			printf("YES\n");`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0
			memset(c,0,sizeof(c));`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`0`1
			int pl = 0;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`0`1`1`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0
			for(int i = 0;i < a;i ++)`FunctionDecl,false;WhileStmt,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`3`3`1`1`0`0`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`0
				scanf("%d",&b[i]);`FunctionDecl,false;WhileStmt,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`3`2`1`0`1`0`0`0`0`0`0`0`3`0`3`1`0`1`0`1`0`1`1`0
				c[b[i]] ++;`FunctionDecl,false;WhileStmt,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`3`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`1`0`1`2`0
			for(int j = 0;j < 1000;j ++)`FunctionDecl,false;WhileStmt,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`3`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0
				if(c[j] > a/ 2 + 1)`FunctionDecl,false;WhileStmt,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`2`0`0`0`5`0`4`3`2`2`0`1`0`0`0`0`0`0`3`0`3`0`0`0`3`0`0`3`1`0
					pl = 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`2`0`0`0`5`0`4`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0
					printf("NO\n");`FunctionDecl,false;WhileStmt,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`2`0`0`0`5`0`4`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0
					break;	`FunctionDecl,false;WhileStmt,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`2`0`0`0`5`0`4`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`1
			if(pl == 0)`FunctionDecl,false;WhileStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`3`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0
				printf("YES\n");`FunctionDecl,false;WhileStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`3`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0