File size: 2,265 Bytes
e0b2a67 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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
llint taghsim(llint a,llint b){`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
if (b <= 0) return INF;`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`0`2`0`2`0`0`0`1`0`0`1`0`0
return (a+b-1) / b;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`3`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`0`3`0`0
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
ios_base::sync_with_stdio(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`0`1`0`1`0`0`1`0`0`0`0`0`0
llint ans = 0, co1, co2;`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`3`0`1`4`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`0
while (n--){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`0`0`0`0`0`1`0`0`1`0`1`0`1`0`0`0`0`1`0`1`0`0
cin >> t >> T >> x >> cost;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`5`0`0`0`0`0`0`0`0`0`0`9`0`9`0`0`0`0`0`0`0`0`0
co1 = cost + (t+m > T ? x*m: 0);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`7`1`1`0`0`0`0`0`0`0`0`7`0`7`0`0`0`5`0`0`5`0`0
co2 = cost * taghsim(m, T-t);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`5`0`0`0`0`0`0`0`0`0`0`6`0`6`0`1`1`3`0`0`3`0`0
ans += min(co1, co2);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`1`0`0`1`1`0`0
cout << ans << '\n';`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`1`0`0`0`0`0`0`0`0`0`4`0`4`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
|