File size: 2,402 Bytes
7ab4270 |
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 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
scanf("%d",&n);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`0`1`0`0`0`0`0`0`0`2`0`2`1`0`1`0`1`0`1`0`0
memset(pos,0,sizeof pos);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`0`0
FOR(i,1,n+1){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`3`2`2`0`0`1`0`0`0`1`1`3`1`5`0`0`0`2`1`0`3`0`0
int k;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0
scanf("%d",&k);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`0`1`0`0`0`0`0`0`0`2`0`2`1`0`1`0`1`0`1`0`0
pos[i] = k;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`1
scanf("%d",&m);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`0`1`0`0`0`0`0`0`0`2`0`2`1`0`1`0`1`0`1`0`0
int num;`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`1`0`1`2`0`0`0`0`0`0`0`0`0
ll V=0,P=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`2`2`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0
FOR(i,0,m){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`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",&num);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`0`1`0`0`0`0`0`0`0`2`0`2`1`0`1`0`1`0`1`0`0
V+= (pos[num]);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`1`1`1`0
P+= (n-pos[num]+1);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`4`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`2`0`1`3`1`0
cout << V << " " << P << endl;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`3`1`0`1`0`0`0`0`0`0`0`8`0`8`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
|