File size: 3,927 Bytes
2d31f09
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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`0
  int n,s=0,f=0,sum=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`3`3`0`0`0`0`0`0`0`4`0`1`5`0`0`0`0`0`0`0`0`0
  bool flag = 1;`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
  cin >> n;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0
  if(n<7 && n != 4)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`2`2`2`0`1`0`0`0`0`0`0`2`0`2`0`0`0`3`0`0`3`0`0
      cout << -1 << endl;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`1`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`1`0`1`0`0
  while(sum < n)`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`4`2`0`0`0`0`0`1`0`0`1`0`2`0`2`0`0`0`1`0`0`1`0`0
      sum += 7;`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`4`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`1`1`0`0
      s++;`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`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
  while(sum != n)`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`4`2`0`0`0`0`0`1`0`0`1`0`2`0`2`0`0`0`1`0`0`1`0`0
      if(sum > n)`FunctionDecl,false;IfStmt,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`5`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0
          sum -= 7;`FunctionDecl,false;IfStmt,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`5`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`1`1`0`0
          sum += 4;`FunctionDecl,false;IfStmt,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`5`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`1`1`0`0
          s--;`FunctionDecl,false;IfStmt,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`5`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0
          f++;`FunctionDecl,false;IfStmt,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`5`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0
          cout << -1 << endl;`FunctionDecl,false;IfStmt,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`5`1`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`1`0`1`0`1
          flag = 0;`FunctionDecl,false;IfStmt,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`5`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;IfStmt,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`5`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0
  if(flag)`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`5`1`0`0`0`1`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`1
      while(f--)`FunctionDecl,false;IfStmt,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`6`1`0`0`0`0`0`1`0`0`1`0`1`0`1`0`0`0`0`1`0`1`0`0
          cout << 4 ;`FunctionDecl,false;IfStmt,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`6`1`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0
      while(s--)`FunctionDecl,false;IfStmt,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`6`1`0`0`0`0`0`1`0`0`1`0`1`0`1`0`0`0`0`1`0`1`0`0
          cout << 7;`FunctionDecl,false;IfStmt,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`6`1`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0
      cout << endl;`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`5`1`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0