File size: 5,143 Bytes
7ab4270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 main(){`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`0`0`0`0`0`0`0`0`0`0`0`0`1
	int n,m;`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`2`0`1`3`0`0`0`0`0`0`0`0`0
	cin>>n>>m;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`3`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`1
	int i,j,k,l,sum=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`1`0`0`0`0`0`0`0`5`0`1`6`0`0`0`0`0`0`0`0`0
	int a[m][2],b[n+1][n+1];`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`2`0`1`3`0`0`0`0`0`0`0`0`0
	for(i=0;i<m;i++)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`1`0`0`0`1`0`4`0`4`0`0`0`2`1`0`3`0`0
	for(j=0;j<2;j++){`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`3`2`2`0`0`1`0`0`0`1`0`3`0`3`0`0`0`2`1`0`3`0`0
	cin>>a[i][j];`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`2`0
for(i=0;i<n+1;i++)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`2`2`0`0`1`0`0`0`1`0`4`0`4`0`0`0`3`1`0`4`0`0
for(j=0;j<n+1;j++)`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`4`2`2`0`0`1`0`0`0`1`0`4`0`4`0`0`0`3`1`0`4`0`0
b[i][j]=0;`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`3`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`2`0
	for(i=0;i<m;i++){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`1`0`0`0`1`0`4`0`4`0`0`0`2`1`0`3`0`0
	b[a[i][0]][a[i][1]]=1;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`5`3`3`0`0`0`0`0`0`0`0`5`0`5`0`0`0`1`0`0`1`6`0
	b[a[i][1]][a[i][0]]=1;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`5`3`3`0`0`0`0`0`0`0`0`5`0`5`0`0`0`1`0`0`1`6`0
	for(i=0;i<2*n;i++){//扫n遍 `FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`2`2`0`0`1`0`0`0`1`0`4`0`4`0`0`0`3`1`0`4`0`0
	for(j=1;j<n+1;j++){//对n个点扫 `FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`4`2`2`0`0`1`0`0`0`1`0`4`0`4`0`0`0`3`1`0`4`0`0
	sum=0;`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0
		for(k=1;k<n+1;k++){`FunctionDecl,false;ForStmt,false;ForStmt,false;ForStmt,false;`1`0`3`0`0`0`0`0`0`0`0`0`4`0`3`4`2`2`0`0`1`0`0`0`1`0`4`0`4`0`0`0`3`1`0`4`0`0
		if(b[j][k]==1)`FunctionDecl,false;ForStmt,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`3`0`0`0`0`0`1`0`0`0`5`0`4`3`1`1`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`2`0
		sum++;`FunctionDecl,false;ForStmt,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`3`0`0`0`0`0`1`0`0`0`5`0`4`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0
		if(sum<2){`FunctionDecl,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`2`0`0`0`0`0`1`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
		for(l=0;l<n+1;l++){`FunctionDecl,false;ForStmt,false;ForStmt,false;IfStmt,false;ForStmt,false;`1`0`3`0`0`0`0`0`1`0`0`0`5`0`4`4`2`2`0`0`1`0`0`0`1`0`4`0`4`0`0`0`3`1`0`4`0`0
		b[j][l]=0;`FunctionDecl,false;ForStmt,false;ForStmt,false;IfStmt,false;ForStmt,false;`1`0`3`0`0`0`0`0`1`0`0`0`5`0`4`3`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`2`0
		b[l][j]=0;`FunctionDecl,false;ForStmt,false;ForStmt,false;IfStmt,false;ForStmt,false;`1`0`3`0`0`0`0`0`1`0`0`0`5`0`4`3`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`2`0
	int tag=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`1`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0
for(i=0;i<n+1;i++)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`2`2`0`0`1`0`0`0`1`0`4`0`4`0`0`0`3`1`0`4`0`1
for(j=0;j<n+1;j++)`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`4`2`2`0`0`1`0`0`0`1`0`4`0`4`0`0`0`3`1`0`4`0`0
if(b[i][j]==1){`FunctionDecl,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`2`0`0`0`0`0`1`0`0`0`4`0`3`3`1`1`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`2`0
tag=1;`FunctionDecl,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`2`0`0`0`0`0`1`0`0`0`4`0`3`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0
break;`FunctionDecl,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`2`0`0`0`0`0`1`0`0`0`4`0`3`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0
if(tag==0)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0
cout<<"NO";`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`1`1`0`1`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0
cout<<"FHTAGN!";`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`1`1`0`1`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0
	return 0;`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`0`0`0`0`0`0`0`0`0`0`0`0`0