File size: 3,275 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 |
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
void set_vis(int i){`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
a[i/8]|=(1<<(i%8));`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`3`3`3`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`1`4`1`1
bool is_vis(int i){`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`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
return a[i/8]&(1<<(i&7));`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`3`3`3`0`0`0`0`0`0`0`0`3`0`3`0`0`0`4`0`0`4`1`1
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
set_vis(4);`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`0`1`0`1`0`1`1`0`0`0`0`0`1
cin>>l>>r;`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`2`5`1`8`0`0`0`0`0`0`0`0`0
for(int i=2;i<=r;i++){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`1`1`0`0`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`1
if(!is_vis(i)){`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`5`1`0`0`0`1`0`0`0`0`0`0`2`0`2`0`1`1`0`1`0`1`0`0
if(i>=l)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`6`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`1
prime.push_back(i);`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`6`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0
for(int j=2*i;j<=r;j+=i)`FunctionDecl,false;ForStmt,false;IfStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`1`0`0`0`4`0`6`5`1`1`0`0`1`0`0`0`1`1`5`1`7`0`0`0`2`0`1`3`0`0
set_vis(j);`FunctionDecl,false;ForStmt,false;IfStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`1`0`0`0`4`0`6`1`0`0`0`0`0`0`0`0`0`0`2`0`2`0`1`1`0`0`0`0`0`0
int cnt=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
if(l<=2)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`1`1`0`1`0`0`0`0`0`1`2`1`4`0`0`0`1`0`0`1`0`1
cnt++;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0
for(int i=0;i<sz;i++){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`1`1`0`0`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`0
double temp=prime[i]-1;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`1`3`1`5`0`0`0`1`0`0`1`0`0
if(fmod(temp,4)==0){`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`1`2`2`0`1`0`0`0`0`0`0`2`0`2`0`0`1`1`0`0`1`0`0
cnt++;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0
cout<<cnt<<endl;`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`4`0`4`0`0`0`0`0`0`0`0`0
|