diff --git a/test/3078060.cpp.csv b/test/3078060.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..9b093a5bf5d253bc6d0cfd7cf2b2df0447287101 --- /dev/null +++ b/test/3078060.cpp.csv @@ -0,0 +1,14 @@ +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;`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 + 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 + int p,m,q1,q2,q3,q4,q5;`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`7`0`1`8`0`0`0`0`0`0`0`0`0 + int sum[n];`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 + string name[n];`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 + int max = 0, pmax = 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`1 + for (int i=0; i> name[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + scanf("%d %d %d %d %d %d %d", &p, &m, &q1, &q2, &q3, &q4, &q5);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`7`1`0`1`0`0`0`0`0`0`0`8`0`8`7`0`1`0`7`0`7`0`0 + sum[i] = q1 + q2 + q3 + q4 + q5 + (100*p) - (50*m);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`9`2`2`0`0`0`0`0`0`0`0`9`0`9`0`0`0`9`0`0`9`1`0 + if (sum[i] > max) { max = sum[i]; pmax = i; }`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`8`0`0`0`1`0`0`0`0`0`0`8`0`8`0`0`0`3`0`0`3`2`1 + cout << name[pmax] << endl;`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`1`0 diff --git a/test/3562523.cpp.csv b/test/3562523.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..2139516b67f9c921ed56c8cb05cd1ae11473233e --- /dev/null +++ b/test/3562523.cpp.csv @@ -0,0 +1,10 @@ +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 m = 0, j = 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 + while(scanf("%d",&a[m ++])==1){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`2`1`1`0`0`1`0`0`1`0`3`0`3`1`0`1`1`2`0`3`1`0 + for(int i=0;i skills;`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 + cin>>n>>m>>k;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`0`0`0`0`0`0 + for (int i=0;i>name>>lv;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + lv=(int)(lv*k);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`2`0`0`2`0`1 + if (lv>=100) skills[name]=lv;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`1`1`0`1`0`0`0`0`0`0`5`0`5`0`0`0`2`0`0`2`0`0 + for (int i=0;i>name;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + if (skills.find(name) == skills.end()) {`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`5`3`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`0`0 + skills[name]=0;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`5`2`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`0`0 + cout<::const_iterator it=skills.begin();it!=skills.end();it++) {`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`4`4`1`1`0`0`1`0`0`0`1`1`6`1`8`0`0`0`0`0`0`0`0`0 + cout<first<<" "<second<<"\n";`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`4`3`2`0`2`0`0`0`0`0`0`0`9`0`9`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 diff --git a/test/626624.cpp.csv b/test/626624.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..e859be2249accc38a409e1361b36514b053eb906 --- /dev/null +++ b/test/626624.cpp.csv @@ -0,0 +1,19 @@ +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, 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 + double t;`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`1 + cin >> n >> m >> t;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`0`0`0`0`0`0 + t *= 100.;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`1`1`0`1 + vector > ab(n);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`1`1`1`3`0`0`0`0`0`0`0`0`0 + REP(i, n) cin >> ab[i].first >> ab[i].second;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + int i=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`7`1`1`0`0`0`0`0`0`0`1`11`1`13`0`0`0`0`1`0`1`0`0 + while( i> nueva;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + bool esta = false;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`0`1`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + for(int j=0 ; j> 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 + ll ans = 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 + fr(i,0,n){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + ll t, T, x, cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`2`0`0`0`0`0`0`0`0`0`4`2`1`7`0`0`0`0`1`0`1`0`0 + cin >> t >> T >> x >> cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`5`0`0`0`0`0`0`0`0`0`0`9`0`9`0`0`0`0`0`0`0`0`0 + ll aux1 = cost + m*x;`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`1`3`1`5`0`0`0`2`0`0`2`0`1 + ll aux2 = (ll)ceil((double)m/(T-t))*cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`4`0`0`0`0`0`0`0`0`0`1`5`1`7`0`0`1`3`0`0`3`0`0 + ans += min(aux1, aux2);`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`4`0`4`0`0`1`0`0`1`1`0`0 + cout << ans << 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`5`0`5`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 diff --git a/test/6266579.cpp.csv b/test/6266579.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..3996b880fa21f66d15f0363c0e6d7f695d96401a --- /dev/null +++ b/test/6266579.cpp.csv @@ -0,0 +1,13 @@ +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, 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`0 + ll ans = 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 + fr(i,0,n){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + ll t, T, x, cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`2`0`0`0`0`0`0`0`0`0`4`2`1`7`0`0`0`0`1`0`1`0`0 + cin >> t >> T >> x >> cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`5`0`0`0`0`0`0`0`0`0`0`9`0`9`0`0`0`0`0`0`0`0`0 + ll aux1 = cost + m*x;`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`1`3`1`5`0`0`0`2`0`0`2`0`1 + ll aux2 = (ll)ceil((double)m/(T-t))*cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`4`0`0`0`0`0`0`0`0`0`1`5`1`7`0`0`1`3`0`0`3`0`0 + ans += min(aux1, aux2);`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`4`0`4`0`0`1`0`0`1`1`0`0 + cout << ans << 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`5`0`5`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 diff --git a/test/6266623.cpp.csv b/test/6266623.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..3996b880fa21f66d15f0363c0e6d7f695d96401a --- /dev/null +++ b/test/6266623.cpp.csv @@ -0,0 +1,13 @@ +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, 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`0 + ll ans = 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 + fr(i,0,n){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + ll t, T, x, cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`2`0`0`0`0`0`0`0`0`0`4`2`1`7`0`0`0`0`1`0`1`0`0 + cin >> t >> T >> x >> cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`5`0`0`0`0`0`0`0`0`0`0`9`0`9`0`0`0`0`0`0`0`0`0 + ll aux1 = cost + m*x;`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`1`3`1`5`0`0`0`2`0`0`2`0`1 + ll aux2 = (ll)ceil((double)m/(T-t))*cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`4`0`0`0`0`0`0`0`0`0`1`5`1`7`0`0`1`3`0`0`3`0`0 + ans += min(aux1, aux2);`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`4`0`4`0`0`1`0`0`1`1`0`0 + cout << ans << 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`5`0`5`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 diff --git a/test/6266680.cpp.csv b/test/6266680.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..3996b880fa21f66d15f0363c0e6d7f695d96401a --- /dev/null +++ b/test/6266680.cpp.csv @@ -0,0 +1,13 @@ +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, 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`0 + ll ans = 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 + fr(i,0,n){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + ll t, T, x, cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`2`0`0`0`0`0`0`0`0`0`4`2`1`7`0`0`0`0`1`0`1`0`0 + cin >> t >> T >> x >> cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`5`0`0`0`0`0`0`0`0`0`0`9`0`9`0`0`0`0`0`0`0`0`0 + ll aux1 = cost + m*x;`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`1`3`1`5`0`0`0`2`0`0`2`0`1 + ll aux2 = (ll)ceil((double)m/(T-t))*cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`4`0`0`0`0`0`0`0`0`0`1`5`1`7`0`0`1`3`0`0`3`0`0 + ans += min(aux1, aux2);`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`4`0`4`0`0`1`0`0`1`1`0`0 + cout << ans << 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`5`0`5`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 diff --git a/test/6266748.cpp.csv b/test/6266748.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..3996b880fa21f66d15f0363c0e6d7f695d96401a --- /dev/null +++ b/test/6266748.cpp.csv @@ -0,0 +1,13 @@ +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, 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`0 + ll ans = 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 + fr(i,0,n){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + ll t, T, x, cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`2`0`0`0`0`0`0`0`0`0`4`2`1`7`0`0`0`0`1`0`1`0`0 + cin >> t >> T >> x >> cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`5`0`0`0`0`0`0`0`0`0`0`9`0`9`0`0`0`0`0`0`0`0`0 + ll aux1 = cost + m*x;`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`1`3`1`5`0`0`0`2`0`0`2`0`1 + ll aux2 = (ll)ceil((double)m/(T-t))*cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`4`0`0`0`0`0`0`0`0`0`1`5`1`7`0`0`1`3`0`0`3`0`0 + ans += min(aux1, aux2);`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`4`0`4`0`0`1`0`0`1`1`0`0 + cout << ans << 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`5`0`5`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 diff --git a/test/6266822.cpp.csv b/test/6266822.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..3996b880fa21f66d15f0363c0e6d7f695d96401a --- /dev/null +++ b/test/6266822.cpp.csv @@ -0,0 +1,13 @@ +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, 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`0 + ll ans = 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 + fr(i,0,n){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + ll t, T, x, cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`2`0`0`0`0`0`0`0`0`0`4`2`1`7`0`0`0`0`1`0`1`0`0 + cin >> t >> T >> x >> cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`5`0`0`0`0`0`0`0`0`0`0`9`0`9`0`0`0`0`0`0`0`0`0 + ll aux1 = cost + m*x;`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`1`3`1`5`0`0`0`2`0`0`2`0`1 + ll aux2 = (ll)ceil((double)m/(T-t))*cost;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`4`0`0`0`0`0`0`0`0`0`1`5`1`7`0`0`1`3`0`0`3`0`0 + ans += min(aux1, aux2);`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`4`0`4`0`0`1`0`0`1`1`0`0 + cout << ans << 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`5`0`5`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 diff --git a/test/6266946.cpp.csv b/test/6266946.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..1c6a938677d6f74d081d90b64d57882df22275ad --- /dev/null +++ b/test/6266946.cpp.csv @@ -0,0 +1,25 @@ +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 x;`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 + while (cin >> x)`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`1`0`0`1`0`3`0`3`0`0`0`0`0`0`0`0`0 + vector v1(x);`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`0`0`0`0`1`1`1`3`0`0`0`0`0`0`0`0`0 + int c = 0;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`0`1`1`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + bool l = 1;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`0`1`1`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + for (int i = 0; i < x; i++)`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`1`1`0`0`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`0 + cin >> v1[i];`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + sort(v1.begin(), v1.end());`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`0`0 + for (int i = 0; i < x-1; i++)`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`2`2`0`0`1`0`0`0`1`1`3`1`5`0`0`0`2`1`0`3`0`0 + int count = 1;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`0`1`1`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + while (v1[i] == v1[i + 1])`FunctionDecl,false;WhileStmt,false;ForStmt,false;WhileStmt,false;`1`0`1`0`0`0`2`0`0`0`0`0`4`0`3`4`1`1`0`0`0`1`0`0`1`0`6`0`6`0`0`0`2`0`0`2`0`0 + count++;`FunctionDecl,false;WhileStmt,false;ForStmt,false;WhileStmt,false;`1`0`1`0`0`0`2`0`0`0`0`0`4`0`3`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`1 + i++;`FunctionDecl,false;WhileStmt,false;ForStmt,false;WhileStmt,false;`1`0`1`0`0`0`2`0`0`0`0`0`4`0`3`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0 + if (i == x - 1)`FunctionDecl,false;WhileStmt,false;ForStmt,false;WhileStmt,false;IfStmt,false;`1`0`1`0`0`0`2`0`1`0`0`0`5`0`4`2`1`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + break;`FunctionDecl,false;WhileStmt,false;ForStmt,false;WhileStmt,false;IfStmt,false;`1`0`1`0`0`0`2`0`1`0`0`0`5`0`4`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + if (count>2)`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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 + cout << -1 << endl;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`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 + l = 0;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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 + else if (count == 2)`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`2`0`0`0`5`0`4`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + c++;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`2`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 (l)`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`3`1`0`0`0`1`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 + cout << c << endl;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`3`2`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 diff --git a/train/10749539.cpp.csv b/train/10749539.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..c8a36ce907b8a7fb8db15c25b3b4b2aeb3ff2f0e --- /dev/null +++ b/train/10749539.cpp.csv @@ -0,0 +1,11 @@ +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 + 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 + for (int i = 1; i < 12; ++i) {`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + if (i == 10) p[i] = 15;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`3`2`2`0`1`0`0`0`0`0`0`3`0`3`0`0`0`2`0`0`2`1`0 + else p[i] = 4;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`1`0 + for (int i = 1; i < 15; ++i) {`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`1 + if (i == n - 10)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`1`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + s += p[i];`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`1`1`1`0 + cout << s << 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`5`0`5`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 diff --git a/train/10749669.cpp.csv b/train/10749669.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..5e35ae2f9f4925b966eb277dc9caed32d259b2db --- /dev/null +++ b/train/10749669.cpp.csv @@ -0,0 +1,14 @@ +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;`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 + int i,j;`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;`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 + c[1]=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`2`2`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`1`0 + for(i=2;i<=n;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 + cin>>c[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + int a,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`2`0`1`3`0`0`0`0`0`0`0`0`0 + cin>>a>>b;`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 + int 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`1`0`1`2`0`0`0`0`0`0`0`0`0 + for(i=a;i<=b;i++)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`5`0`0`0`0`1`0`0`0`1`0`5`0`5`0`0`0`2`1`0`3`0`1 + sum+=c[i]; `FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`1`1`1`0 + cout<> 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 + f[0] = f[1] = 1;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`1`1 + if(!n){`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`2`2`2`2`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`1`0`2`1`0 + puts("0 0 0");`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`2`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0 + return 0;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`2`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + for(int i = 2; i < 70; ++i)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + f[i] = f[i - 1] + f[i - 2];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`1`0 + for(int i = 0; i <= 60; ++i)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`6`4`4`0`0`1`0`0`0`1`1`6`1`8`0`0`0`4`1`0`5`2`0 + for(int j = 0; j <= 60; ++j)`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + for(int k = 0; k <= 60; ++k){`FunctionDecl,false;ForStmt,false;ForStmt,false;ForStmt,false;`1`0`3`0`0`0`0`0`0`0`0`0`4`0`3`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + if(f[i] + f[j] + f[k] == n){`FunctionDecl,false;ForStmt,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`3`0`0`0`0`0`1`0`0`0`5`0`3`0`0`0`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + cout << f[i] << " " << f[j] << " " << f[k] << " ";`FunctionDecl,false;ForStmt,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`3`0`0`0`0`0`1`0`0`0`5`0`3`8`0`0`0`0`0`0`0`0`0`0`14`0`14`0`0`0`3`0`0`3`3`0 + return 0;`FunctionDecl,false;ForStmt,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`3`0`0`0`0`0`1`0`0`0`5`0`3`6`4`1`3`0`0`0`0`0`0`0`6`0`6`0`0`0`0`0`0`0`3`0 + puts("I'm too stupid to solve this problem"); `FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`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 diff --git a/train/1075077.cpp.csv b/train/1075077.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..4ef81f8e7c9f486e3c7f5401d448dd05a5a79e0f --- /dev/null +++ b/train/1075077.cpp.csv @@ -0,0 +1,10 @@ +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 + 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 + for(int i=0;i>s[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + cin>>u>>l>>f>>b>>c>>d>>e;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`8`0`0`0`0`0`0`0`0`0`0`15`0`15`0`0`0`0`0`0`0`0`0 + a[i]=u*100-l*50+f+b+c+d+e;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`9`2`2`0`0`0`0`0`0`0`0`9`0`9`0`0`0`9`0`0`9`1`0 + for(int i=0;imx)j=i,mx=a[i];`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`8`0`0`0`1`0`0`0`0`0`0`8`0`8`0`0`0`4`0`0`4`2`0 + cout<>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 + t=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`2`0`2`0`0`0`1`0`0`1`0`0 + while(t>0)`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`1`1`0`0`0`1`0`0`1`0`1`0`1`0`0`0`1`0`0`1`0`0 + r=t%10;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + sum+=r;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`1`1`0`0 + t=t/10;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + cout<0)? x:x*-1;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`3`2`2`0`0`0`0`0`0`0`0`3`0`3`0`0`0`2`1`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 + int n,x1,x2,y1,y2;`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`5`0`1`6`0`0`0`0`0`0`0`0`1 + cin >> n >> x1 >> x2 >> y1 >> y2;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`6`0`0`0`0`0`0`0`0`0`0`11`0`11`0`0`0`0`0`0`0`0`0 + cout << abs(x2-y1)+abs(y2-x1);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`7`0`7`0`2`2`3`0`0`3`0`0 diff --git a/train/11829799.cpp.csv b/train/11829799.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..dfb5665475cd46885dbe1dda4e46f673a2620c28 --- /dev/null +++ b/train/11829799.cpp.csv @@ -0,0 +1,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 +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`1 + 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 + vector > ludi(n, vector ());`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`1`1`1`3`0`0`0`0`0`0`0`0`1 + for (int i = 0 ; i < n ; 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 + int k;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + cin >> k;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + for (int j = 0 ; j < k ; j++) {`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`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`1 + int x;`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + cin >> x;`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`1`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + ludi[i].push_back(x);`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`0`0 + set st;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`2`1`2`5`0`0`0`0`1`0`1`0`0 + for (int i = 0 ; i < n ; 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 + bool fl = false;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`0`1`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + for (auto t: ludi[i]) {`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`8`0`0`0`0`0`0`0`0`0`4`12`4`20`3`0`0`0`0`0`0`0`0 + if (st.find(t) != st.end()) {`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`5`3`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`0`0 + fl = true;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`5`1`1`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + for (auto x: ludi[i])`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`8`0`0`0`0`0`0`0`0`0`4`12`4`20`3`0`0`0`0`0`0`0`0 + st.insert(x);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 + if (!fl)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`0`1`0`1`0`0 + ans++;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`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 + cout << ans;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 diff --git a/train/11829895.cpp.csv b/train/11829895.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..59094c8c690c5046ff468fdbd2727f50fea48260 --- /dev/null +++ b/train/11829895.cpp.csv @@ -0,0 +1,13 @@ +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;`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 + while (cin >> n) {`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`1`0`0`1`0`3`0`3`0`0`0`0`0`0`0`0`0 + int r = ((10+1)==n || (10+11)==n);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`4`4`0`0`0`0`0`0`0`1`2`1`4`0`0`0`5`0`0`5`0`1 + int c[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10};`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`0`12`12`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + for (int i = 0; i < 12; i++) {`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + if (c[i] + 10 == n) {`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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`2`0`0`2`1`0 + r+=4;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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`0`0`1`1`0`0 + if (i == 9) {`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`2`0`0`0`5`0`4`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + r--;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`2`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 + cout << r << endl;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`5`0`5`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 diff --git a/train/11829935.cpp.csv b/train/11829935.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..5163c508066534dc2a43efb2f258e77a8a42ec66 --- /dev/null +++ b/train/11829935.cpp.csv @@ -0,0 +1,21 @@ +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 sum=0,s=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 + string 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`1`0`1`2`0`0`0`0`0`0`0`0`0 + cin>>m;`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(m=="1")`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`1`1`0`1`1`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`1 + cout<<"1"<>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 + vector a(n);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`1`1`1`3`0`0`0`0`0`0`0`0`0 + for(int i=0;i> a[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + for(int i=0;i> Arr[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(int i=0;i<10;++i)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`1 + ++Arr[0][0];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`1`2`2`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`2`0 + Arr[1][1] = (Arr[0][0]+Arr[0][1]+Arr[0][2])-(Arr[1][0]+Arr[1][2]);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`6`12`12`0`0`0`0`0`0`0`0`6`0`6`0`0`0`5`0`0`5`12`0 + Arr[2][2] = (Arr[0][0]+Arr[0][1]+Arr[0][2])-(Arr[2][0]+Arr[2][1]);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`6`12`12`0`0`0`0`0`0`0`0`6`0`6`0`0`0`5`0`0`5`12`0 + if( Arr[1][1]>0 && Arr[2][2]>0 )`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`2`6`6`0`1`0`0`0`0`0`0`2`0`2`0`0`0`3`0`0`3`4`0 + if(IsRight(Arr)) break;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`7`1`0`0`0`1`0`0`0`0`0`0`2`0`2`0`1`1`0`0`0`0`0`0 + for(int i=0;i<3;++i)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + for(int 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`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + cout << Arr[i][j] << " ";`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`4`1`0`1`0`0`0`0`0`0`0`6`0`6`0`0`0`0`0`0`0`2`0 + cout << Arr[i][2] << endl;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`1`1`0`0`0`0`0`0`0`0`6`0`6`0`0`0`0`0`0`0`2`0 + return 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`0`0`0`0`0`0`0`0`0`0`0`0 +bool IsRight(int x[][3])`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 + int v = (x[0][0]+x[0][1]+x[0][2]);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`3`6`6`0`0`0`0`0`0`0`1`3`1`5`0`0`0`2`0`0`2`6`0 + if ( (x[1][0]+x[1][1]+x[1][2])==v && (x[2][0]+x[2][1]+x[2][2])==v &&`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`9`8`12`12`0`1`0`0`0`0`0`0`8`0`8`0`0`0`12`0`0`12`12`0 + (x[0][0]+x[1][0]+x[2][0])==v && (x[0][1]+x[1][1]+x[2][1])==v &&`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`9`8`12`12`0`0`0`0`0`0`0`0`8`0`8`0`0`0`6`0`0`6`12`0 + (x[0][2]+x[1][2]+x[2][2])==v && (x[0][0]+x[1][1]+x[2][2])==v &&`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`9`8`12`12`0`0`0`0`0`0`0`0`8`0`8`0`0`0`6`0`0`6`12`0 + (x[0][2]+x[1][1]+x[2][0])==v )`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`9`4`6`6`0`0`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`6`0 + return true;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`9`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + return false;`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 diff --git a/train/11830829.cpp.csv b/train/11830829.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..8afa35ded757d2a28b30c9292df110373cabc3bf --- /dev/null +++ b/train/11830829.cpp.csv @@ -0,0 +1,19 @@ +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 + for (int i = 0; i < n; ++i) {`ForStmt,false;`0`0`1`0`0`0`0`0`0`0`0`0`1`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 (s[i] == 'R') {`ForStmt,false;IfStmt,false;`0`0`1`0`0`0`0`0`1`0`0`0`2`0`2`2`1`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`0`0 + if (first_R == -1)`ForStmt,false;IfStmt,false;IfStmt,false;`0`0`1`0`0`0`0`0`2`0`0`0`3`0`3`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`1`0`2`0`0 + first_R = i + 1;`ForStmt,false;IfStmt,false;IfStmt,false;`0`0`1`0`0`0`0`0`2`0`0`0`3`0`3`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + last_R = i + 1;`ForStmt,false;IfStmt,false;`0`0`1`0`0`0`0`0`1`0`0`0`2`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + } else if (s[i] == 'L') {`ForStmt,false;IfStmt,false;IfStmt,false;`0`0`1`0`0`0`0`0`2`0`0`0`3`0`3`2`1`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`0`0 + if (first_L == -1)`ForStmt,false;IfStmt,false;IfStmt,false;IfStmt,false;`0`0`1`0`0`0`0`0`3`0`0`0`4`0`4`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`1`0`2`0`0 + first_L = i + 1;`ForStmt,false;IfStmt,false;IfStmt,false;IfStmt,false;`0`0`1`0`0`0`0`0`3`0`0`0`4`0`4`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + if (first_R != -1)`IfStmt,false;`0`0`0`0`0`0`0`0`1`0`0`0`1`0`1`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`1`0`2`0`1 + out << first_R << ' ' << (first_L != -1 ? last_R : last_R + 1);`IfStmt,false;`0`0`0`0`0`0`0`0`1`0`0`0`1`0`1`5`3`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`2`1`0`3`0`0 + out << first_L << ' ' << first_L;`IfStmt,false;`0`0`0`0`0`0`0`0`1`0`0`0`1`0`1`3`1`0`0`0`0`0`0`0`0`0`6`0`6`0`0`0`0`0`0`0`0`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 + ios_base::sync_with_stdio(false);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`0`0`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0 + cin.tie(NULL);`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`1`2`1`4`0`0`0`0`0`0`0`0`0 + std::istream& in(std::cin);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`1`1`1`3`1`0`0`0`0`0`0`0`0 + std::ostream& out(std::cout);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`1`1`1`3`1`0`0`0`0`0`0`0`0 + solver.solve(in, out);`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`3`0`3`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 diff --git a/train/11830882.cpp.csv b/train/11830882.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..4ec0c31f36345831d239673d902017b5e73eb999 --- /dev/null +++ b/train/11830882.cpp.csv @@ -0,0 +1,17 @@ +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;`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 + int leftClosed =0, rightClosed = 0, leftOpened = 0, rightOpened = 0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`4`4`0`0`0`0`0`0`0`4`0`1`5`0`0`0`0`0`0`0`0`0 + int x,y;`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;`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 + for (int i=0; i> x >>y;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + if (x) leftOpened++;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`0`1`0`1`0`0 + else leftClosed++;`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 + if (y) rightOpened++;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`0`1`0`1`0`0 + else rightClosed++;`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 + if ( (leftOpened == n || leftClosed == n) && (rightOpened ==n || rightClosed ==n)) cout <<0;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`9`9`1`1`0`1`0`0`0`0`0`0`10`0`10`0`0`0`7`0`0`7`0`1 + else if ( (leftOpened == n || leftClosed == n) ) cout << min (rightOpened,rightClosed) << endl;`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`13`7`0`0`0`1`0`0`0`0`0`0`11`0`11`0`0`1`3`0`0`3`0`0 + else if ((rightOpened ==n || rightClosed ==n)) cout << min (leftOpened,leftClosed) << endl;`FunctionDecl,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`3`0`0`0`4`0`17`7`0`0`0`1`0`0`0`0`0`0`11`0`11`0`0`1`3`0`0`3`0`0 + cout << min (leftOpened + rightClosed, leftClosed + rightOpened) << endl;`FunctionDecl,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`3`0`0`0`4`0`17`5`0`0`0`0`0`0`0`0`0`0`9`0`9`0`0`1`2`0`0`2`0`1 + 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 diff --git a/train/11831056.cpp.csv b/train/11831056.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..02854881ffbcca4c7852af1b1100da459ca190af --- /dev/null +++ b/train/11831056.cpp.csv @@ -0,0 +1,9 @@ +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 a1 , a2 ,a3 , gcd , 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`1 + cin >> a1 >> a2 >> a3 ;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`0`0`0`0`0`0 + gcd = __gcd(__gcd(a1 , a2) , a3) ;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`6`0`6`0`0`2`1`0`0`1`0`1 + sum += (6*gcd) ;`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`2`0`2`0`0`0`1`0`1`2`0`0 + sum += (((a1/gcd)*2) + ((a2/gcd)*2) + ((a3/gcd)*2)) ;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`7`3`3`0`0`0`0`0`0`0`0`7`0`7`0`0`0`8`0`1`9`0`0 + cout << sum << 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`5`0`5`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 diff --git a/train/1920702.cpp.csv b/train/1920702.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..c81f6ef19fbbe04b9cd73bcb7cc669fd604106a5 --- /dev/null +++ b/train/1920702.cpp.csv @@ -0,0 +1,30 @@ +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 onesInSquare(int n)`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 + return (n * n + 1) / 2;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`2`2`0`0`0`0`0`0`0`0`2`0`2`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 + cin >> x;`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 + int r = x % 4;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`1`1`1`3`0`0`0`1`0`0`1`0`1 + for(int n = 1;; ++n)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`0`1`0`1`0`0 + if (n % 2 != 0)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`1`2`2`0`1`0`0`0`0`0`0`1`0`1`0`0`0`2`0`0`2`0`0 + int side = (n - 1) / 2;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`1`2`2`0`0`0`0`0`0`0`1`1`1`3`0`0`0`2`0`0`2`0`0 + int ones = onesInSquare(side);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`1`0`0`0`0`0`0`0`0`0`1`2`1`4`0`1`1`0`0`0`0`0`0 + int need = x;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`1`0`0`0`0`0`0`0`0`0`1`1`1`3`0`0`0`0`0`0`0`0`0 + need -= ones * 4;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`1`2`0`0 + if (need < 0)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`2`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + need = x % 4;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + if (r % 2 == 1)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`2`1`2`2`0`1`0`0`0`0`0`0`1`0`1`0`0`0`2`0`0`2`0`0 + need--;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`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 + if (4 * (side / 2) >= need)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`3`0`0`0`5`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 << n << endl;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`3`0`0`0`5`0`3`2`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + return 0;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`3`0`0`0`5`0`3`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + if (4 * ((side + 1) / 2) >= need)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`3`0`0`0`5`0`3`2`3`3`0`1`0`0`0`0`0`0`2`0`2`0`0`0`4`0`0`4`0`0 + cout << n << endl;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`3`0`0`0`5`0`3`2`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + return 0;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`3`0`0`0`5`0`3`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + if (r != 0)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`2`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + continue;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`2`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + int side = (n - 2) / 2;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`1`2`2`0`0`0`0`0`0`0`1`1`1`3`0`0`0`2`0`0`2`0`1 + int ones = onesInSquare(side);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`1`0`0`0`0`0`0`0`0`0`1`2`1`4`0`1`1`0`0`0`0`0`0 + if (ones * 4 >= x)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`2`2`1`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + cout << n << endl;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`2`2`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + return 0;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`2`0`1`1`0`0`0`0`0`0`0`0`0`0`0`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 diff --git a/train/19207293.cpp.csv b/train/19207293.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..e4675ace33043ce26491b1d01e7ccf0be31dd8a9 --- /dev/null +++ b/train/19207293.cpp.csv @@ -0,0 +1,25 @@ +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,p,q,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`4`0`1`5`0`0`0`0`0`0`0`0`1 + cin>>n>>p>>q;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`0`0`0`0`0`0 + char st[n];`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`1 + cin>>st;`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(p+q==n)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`3`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`2`0`0`2`0`0 + for(i=0;i>n>>p>>q;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`0`0`0`0`0`0 + char st[n];`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`1 + cin>>st;`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(p+q==n)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`3`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`2`0`0`2`0`0 + { cout<>n>>p>>q;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`0`0`0`0`0`0 + char st[n];`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`1 + cin>>st;`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(p+q==n)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`3`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`2`0`0`2`0`0 + { cout<= x){`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`3`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + ret = m;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + r = m - 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + l = m + 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + return ret;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 +void M(int pos, ll val, int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 + if (l == r&&l == pos){`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + t[x] = val;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + return;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (pos <= m)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + M(pos, val, ls);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + M(pos, val, rs);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`5`1`1`0`0`0`0`0`0`0`0`6`0`6`0`1`1`1`0`0`1`0`0 + t[x] = max(t[x * 2], t[x * 2 + 1]);`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`9`6`6`0`0`0`0`0`0`0`0`10`0`10`0`0`1`7`0`0`7`3`0 + return;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 +ll Q(int L,int R, int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 + if (l == L && R == r)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + return t[x];`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`1`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (R <= m)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + return Q(L, R, ls);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + else if(L>m){`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`5`1`1`0`1`0`0`0`0`0`0`5`0`5`0`0`0`2`0`0`2`0`0 + return Q(L, R, rs);`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + return max(Q(L, m, ls), Q(m + 1, R, rs));`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`5`3`3`0`0`0`0`0`0`0`0`7`0`7`0`1`2`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`8`5`5`0`0`0`0`0`0`0`0`9`0`9`0`1`1`5`0`0`5`0`0 + while (scanf("%d", &n) != EOF){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`1`1`0`0`1`0`0`1`0`2`0`2`1`0`1`1`2`0`3`0`1 + memset(t, 0, sizeof(t));`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`0`1 + for (int i = 1; i <= n; i++){`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`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%d", &cake[i].r, &cake[i].h);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`1`0`1`0`0`0`0`0`0`0`5`0`5`2`0`1`0`2`0`2`2`1 + cake[i].v = cake[i].r*cake[i].r*cake[i].h;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`8`0`0`0`0`0`0`0`0`0`0`8`0`8`0`0`0`3`0`0`3`4`0 + tmp[i] = cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`2`0 + sort(tmp + 1,tmp + n + 1);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`3`2`2`0`0`0`0`0`0`0`0`4`0`4`0`0`1`3`0`0`3`0`0 + for (int i = 1; i <= n; i++){`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`1`1`0`0`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`1 + int pos = find(cake[i].v);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`1`3`1`5`0`1`1`0`0`0`0`1`0 + ll val;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + if (pos == 0)`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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`1 + val = 0;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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`1 + val=Q(1, pos, 1, n, 1) + cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`3`5`3`3`0`0`0`0`0`0`0`0`6`0`6`0`1`1`2`0`0`2`1`0 + M(pos, val, 1, n, 1);`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`3`3`2`2`0`0`0`0`0`0`0`0`4`0`4`0`1`1`0`0`0`0`0`0 + printf("%.12llf\n", t[1] * PI*1.0);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`1`1`0`0`0`0`0`0`0`2`0`2`0`0`1`2`0`0`2`1`1 + return 0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`2`1`0`0`0`0`0`0`0`0`1`0`1`0`0`1`0`1`0`1`0`0 diff --git a/train/19207585.cpp.csv b/train/19207585.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..62bc948fdf1b358635e8398828892c3d4b87c5ee --- /dev/null +++ b/train/19207585.cpp.csv @@ -0,0 +1,12 @@ +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,i,a;`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`3`0`1`4`0`0`0`0`0`0`0`0`0 + float x;`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 + 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 + for(i=0;i>a;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + x=360.0/(180-a);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`2`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`3`0`0`3`0`0 + if(x-int(x)==0)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`1`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + cout<<"YES";`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`1`1`0`1`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`1 + cout<<"NO";`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`1`1`0`1`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`1 + 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 diff --git a/train/19207611.cpp.csv b/train/19207611.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..2f04109d7038857dd4d168850ef806ea90bac3bc --- /dev/null +++ b/train/19207611.cpp.csv @@ -0,0 +1,50 @@ +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, k;`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 + scanf("%d%d", &n, &k);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`1`0`1`0`0`0`0`0`0`0`3`0`3`2`0`1`0`2`0`2`0`0 + long long 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`1`0`1`2`0`0`0`0`0`0`0`0`0 + FOR(i, 0, n) {`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + scanf("%d", &A[i]);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`4`1`0`1`0`0`0`0`0`0`0`5`0`5`1`0`1`0`2`0`2`1`0 + sum += A[i];`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 + if (sum <= k) {`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + if (sum % n == 0) cout << 0 << endl;`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`2`3`2`2`0`1`0`0`0`0`0`0`6`0`6`0`0`0`2`0`0`2`0`0 + else cout << 1 << endl;`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`2`1`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`0`0 + return 0;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + sort(A, A + n);`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`4`0`4`0`0`1`1`0`0`1`0`0 + reverse(A, A + n);`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`4`0`4`0`0`1`1`0`0`1`0`0 + long long s = k;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`1`1`1`3`0`0`0`0`0`0`0`0`0 + int pos = -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`1`0`1`0`0 + FOR(i, 0, n) {`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + int diff = A[i] - A[i + 1];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`6`1`1`0`0`0`0`0`0`0`1`6`1`8`0`0`0`2`1`0`3`2`0 + s -= diff * (long long)(i + 1);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`3`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`0`2`0`1`3`0`0 + pos = i;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + if (s <= 0) break;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`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 + int level = A[pos + 1];`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`1`2`1`4`0`0`0`1`0`0`1`1`0 + int left = 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 (s < 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 + s = -s;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`1`0`2`0`0 + int cnt = s / (pos + 1);`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + level += cnt;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`1`1`0`0 + left = s % (pos + 1);`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`3`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`0`3`0`0 + RFOR(i, pos + 1, 0) {`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`2`0`0`2`0`0 + A[i] = level;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`5`2`2`0`0`0`0`0`0`0`0`5`0`5`0`0`0`2`1`0`3`1`0 + if (i < left) A[i]++;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`1`1`0`2`1`0 + reverse(A, A + n);`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`4`0`4`0`0`1`1`0`0`1`0`0 + s = 0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`1 + FOR(i, 0, n) {`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + s += A[n-1] - A[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`7`1`1`0`0`0`0`0`0`0`0`7`0`7`0`0`0`2`1`1`4`2`0 + if (s <= k) {`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + cout << 0 << endl;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`1`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`0`1 + return 0;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + s = k;`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`2`0`2`0`0`0`1`0`0`1`0`0 + FOR(i, 0, n) {`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`1`1`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + s -= (A[i + 1] - A[i]) * (long long)(i + 1);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`8`2`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`4`1`1`6`2`0 + if (s == 0) {`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`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 << A[n - 1] - A[i + 1] << endl;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`5`2`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`3`0`0`3`2`0 + return 0;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + if (s < 0) {`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`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 + int cnt = s / (i + 1);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`1 + cout << A[n - 1] - A[i] + cnt << endl;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`6`1`1`0`0`0`0`0`0`0`0`9`0`9`0`0`0`3`0`0`3`2`1 + return 0;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`1`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + throw - 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`0`0`0`0`0`0`0`0`1`0`1`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 diff --git a/train/19208028.cpp.csv b/train/19208028.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..7fa81b0c21ee8b952c467200a030834276a984f9 --- /dev/null +++ b/train/19208028.cpp.csv @@ -0,0 +1,55 @@ +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 Build(int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`1 + t[x] = 0;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`1`1 + if (l == r)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + return;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`1 + Build(ls);`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`0`1`1`0`0`0`0`0`0 + Build(rs);`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`3`1`1`0`0`0`0`0`0`0`0`4`0`4`0`1`1`1`0`0`1`0`0 +int find(ll x)`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`0`3`0`1 + int l = 1, r = n;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`2`1`1`4`0`0`0`0`0`0`0`0`0 + int ret = -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`1`0`1`0`0 + while (l <= r){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`1`0`0`1`0`2`0`2`0`0`0`1`0`0`1`0`0 + int m = (l + r) / 2;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (tmp[m] >= x){`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`3`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + ret = m;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + r = m - 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + l = m + 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + return ret;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 +void M(int pos, ll val, int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 + if (l == r&&l == pos){`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + t[x] = val;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + return;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (pos <= m)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + M(pos, val, ls);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + M(pos, val, rs);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`5`1`1`0`0`0`0`0`0`0`0`6`0`6`0`1`1`1`0`0`1`0`0 + t[x] = max(t[x * 2], t[x * 2 + 1]);`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`9`6`6`0`0`0`0`0`0`0`0`10`0`10`0`0`1`7`0`0`7`3`0 + return;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 +ll Q(int L,int R, int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 + if (l == L && R == r)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + return t[x];`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`1`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (R <= m)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + return Q(L, R, ls);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + else if(L>m){`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`5`1`1`0`1`0`0`0`0`0`0`5`0`5`0`0`0`2`0`0`2`0`0 + return Q(L, R, rs);`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + return max(Q(L, m, ls), Q(m + 1, R, rs));`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`5`3`3`0`0`0`0`0`0`0`0`7`0`7`0`1`2`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`8`5`5`0`0`0`0`0`0`0`0`9`0`9`0`1`1`5`0`0`5`0`0 + while (scanf("%d", &n) != EOF){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`1`1`0`0`1`0`0`1`0`2`0`2`1`0`1`1`2`0`3`0`1 + memset(t, 0, sizeof(t));`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`0`1 + for (int i = 1; i <= n; i++){`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`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%d", &cake[i].r, &cake[i].h);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`1`0`1`0`0`0`0`0`0`0`5`0`5`2`0`1`0`2`0`2`2`1 + cake[i].v = cake[i].r*cake[i].r*cake[i].h;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`8`0`0`0`0`0`0`0`0`0`0`8`0`8`0`0`0`3`0`0`3`4`0 + tmp[i] = cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`2`0 + sort(tmp + 1,tmp + n + 1);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`3`2`2`0`0`0`0`0`0`0`0`4`0`4`0`0`1`3`0`0`3`0`0 + for (int i = 1; i <= n; i++){`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`1`1`0`0`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`1 + int pos = find(cake[i].v);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`1`3`1`5`0`1`1`0`0`0`0`1`0 + ll val;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + if (pos == 1)`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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 + val = 0;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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`1 + val = Q(1, pos - 1, 1, n, 1) + cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`3`5`4`4`0`0`0`0`0`0`0`0`6`0`6`0`1`1`3`0`0`3`1`0 + val = val > cake[i].v ? val : cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`7`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`2`0`0`2`2`1 + M(pos , val, 1, n, 1);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`2`2`0`0`0`0`0`0`0`0`4`0`4`0`1`1`0`0`0`0`0`0 + printf("%.15lf\n", t[1] * PI*1.0);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`1`1`0`0`0`0`0`0`0`2`0`2`0`0`1`2`0`0`2`1`1 + return 0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`2`1`0`0`0`0`0`0`0`0`1`0`1`0`0`1`0`1`0`1`0`1 diff --git a/train/19208044.cpp.csv b/train/19208044.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..2920d33a52bcb26c40cb698409ae02ca7bd0c9bb --- /dev/null +++ b/train/19208044.cpp.csv @@ -0,0 +1,55 @@ +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 Build(int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`1 + t[x] = 0;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`1`1 + if (l == r)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + return;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`1 + Build(ls);`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`1`0`1`0`1`1`0`0`0`0`0`0 + Build(rs);`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`3`1`1`0`0`0`0`0`0`0`0`4`0`4`0`1`1`1`0`0`1`0`0 +int find(ll x)`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`0`3`0`1 + int l = 1, r = n;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`2`1`1`4`0`0`0`0`0`0`0`0`0 + int ret = -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`1`0`1`0`0 + while (l <= r){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`1`0`0`1`0`2`0`2`0`0`0`1`0`0`1`0`0 + int m = (l + r) / 2;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (tmp[m] >= x){`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`3`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + ret = m;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + r = m - 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + l = m + 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + return ret;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 +void M(int pos, ll val, int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 + if (l == r&&l == pos){`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + t[x] = val;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + return;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (pos <= m)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + M(pos, val, ls);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + M(pos, val, rs);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`5`1`1`0`0`0`0`0`0`0`0`6`0`6`0`1`1`1`0`0`1`0`0 + t[x] = max(t[x * 2], t[x * 2 + 1]);`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`9`6`6`0`0`0`0`0`0`0`0`10`0`10`0`0`1`7`0`0`7`3`0 + return;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 +ll Q(int L,int R, int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 + if (l == L && R == r)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + return t[x];`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`1`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (R <= m)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + return Q(L, R, ls);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + else if(L>m){`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`5`1`1`0`1`0`0`0`0`0`0`5`0`5`0`0`0`2`0`0`2`0`0 + return Q(L, R, rs);`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + return max(Q(L, m, ls), Q(m + 1, R, rs));`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`5`3`3`0`0`0`0`0`0`0`0`7`0`7`0`1`2`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`8`5`5`0`0`0`0`0`0`0`0`9`0`9`0`1`1`5`0`0`5`0`0 + while (scanf("%d", &n) != EOF){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`1`1`0`0`1`0`0`1`0`2`0`2`1`0`1`1`2`0`3`0`1 + memset(t, 0, sizeof(t));`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`0`1 + for (int i = 1; i <= n; i++){`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`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%d", &cake[i].r, &cake[i].h);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`1`0`1`0`0`0`0`0`0`0`5`0`5`2`0`1`0`2`0`2`2`1 + cake[i].v = cake[i].r*cake[i].r*cake[i].h;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`8`0`0`0`0`0`0`0`0`0`0`8`0`8`0`0`0`3`0`0`3`4`0 + tmp[i] = cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`2`0 + sort(tmp + 1,tmp + n + 1);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`3`2`2`0`0`0`0`0`0`0`0`4`0`4`0`0`1`3`0`0`3`0`0 + for (int i = 1; i <= n; i++){`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`1`1`0`0`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`1 + int pos = find(cake[i].v);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`1`3`1`5`0`1`1`0`0`0`0`1`0 + ll val;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + if (pos == 1)`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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 + val = 0;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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`1 + val = Q(1, pos - 1, 1, n, 1) + cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`3`5`4`4`0`0`0`0`0`0`0`0`6`0`6`0`1`1`3`0`0`3`1`0 + val = val > cake[i].v ? val : cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`7`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`2`0`0`2`2`1 + M(pos , val, 1, n, 1);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`2`2`0`0`0`0`0`0`0`0`4`0`4`0`1`1`0`0`0`0`0`0 + printf("%.15lf\n", t[1] * PI);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`1`1`0`0`0`0`0`0`0`2`0`2`0`0`1`1`0`0`1`1`1 + return 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`1`0`1`0`1 diff --git a/train/19208078.cpp.csv b/train/19208078.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..83a58785504712b827915e4c7f8722ede460f6ca --- /dev/null +++ b/train/19208078.cpp.csv @@ -0,0 +1,15 @@ +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 +cin>>a;`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 +cin>>b;`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 +sort(a.begin(),a.end());`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`1`0`0`0`0`0`0 +q=a;`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`1 +while(q[0]=='0'){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`1`0`0`0`1`0`0`1`0`2`0`2`0`0`0`1`0`0`1`0`0 + t++;`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`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0 + swap(q[0],q[t]);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`3`1`1`0`0`0`0`0`0`0`0`6`0`6`0`0`1`0`0`0`0`0`0 +if(q==b){`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`2`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + cout<<"OK";`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`1`1`0`1`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + cout<= x){`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`3`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + ret = m;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + r = m - 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + l = m + 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + return ret;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 +void M(int pos, ll val, int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 + if (l == r&&l == pos){`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + t[x] = val;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + return;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (pos <= m)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + M(pos, val, ls);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + M(pos, val, rs);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`5`1`1`0`0`0`0`0`0`0`0`6`0`6`0`1`1`1`0`0`1`0`0 + t[x] = max(t[x * 2], t[x * 2 + 1]);`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`9`6`6`0`0`0`0`0`0`0`0`10`0`10`0`0`1`7`0`0`7`3`0 + return;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 +ll Q(int L,int R, int l, int r, int x)`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`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 + if (l == L && R == r)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + return t[x];`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`3`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`1`0 + int m = (l + r) / 2;`FunctionDecl,true;`1`1`0`0`0`0`0`0`0`0`0`0`1`1`0`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if (R <= m)`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + return Q(L, R, ls);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + else if(L>m){`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`5`1`1`0`1`0`0`0`0`0`0`5`0`5`0`0`0`2`0`0`2`0`0 + return Q(L, R, rs);`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`1`1`0`0`0`0`0`0 + return max(Q(L, m, ls), Q(m + 1, R, rs));`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`5`3`3`0`0`0`0`0`0`0`0`7`0`7`0`1`2`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`8`5`5`0`0`0`0`0`0`0`0`9`0`9`0`1`1`5`0`0`5`0`0 + while (scanf("%d", &n) != EOF){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`1`1`0`0`1`0`0`1`0`2`0`2`1`0`1`1`2`0`3`0`1 + memset(t, 0, sizeof(t));`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`0`0`0`1 + for (int i = 1; i <= n; i++){`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`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%d", &cake[i].r, &cake[i].h);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`1`0`1`0`0`0`0`0`0`0`5`0`5`2`0`1`0`2`0`2`2`1 + cake[i].v = cake[i].r*cake[i].r*cake[i].h;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`8`0`0`0`0`0`0`0`0`0`0`8`0`8`0`0`0`3`0`0`3`4`0 + tmp[i] = cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`2`0 + sort(tmp + 1,tmp + n + 1);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`3`2`2`0`0`0`0`0`0`0`0`4`0`4`0`0`1`3`0`0`3`0`0 + for (int i = 1; i <= n; i++){`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`1`1`0`0`1`0`0`0`1`1`3`1`5`0`0`0`1`1`0`2`0`1 + int pos = find(cake[i].v);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`1`3`1`5`0`1`1`0`0`0`0`1`0 + ll val;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + if (pos == 1)`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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 + val = 0;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`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`1 + val = Q(1, pos - 1, 1, n, 1) + cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`3`5`4`4`0`0`0`0`0`0`0`0`6`0`6`0`1`1`3`0`0`3`1`0 + val = val > cake[i].v ? val : cake[i].v;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`7`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`2`0`0`2`2`1 + M(pos , val, 1, n, 1);`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`3`2`2`0`0`0`0`0`0`0`0`4`0`4`0`1`1`0`0`0`0`0`0 + printf("%.15lf\n", t[1] * PI);`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`2`1`1`0`0`0`0`0`0`0`2`0`2`0`0`1`1`0`0`1`1`1 + return 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`1`0`1`0`1 diff --git a/train/19208275.cpp.csv b/train/19208275.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..b0696c48d19c26f56cada7388df2f70d6b301dd8 --- /dev/null +++ b/train/19208275.cpp.csv @@ -0,0 +1,15 @@ +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,p,t,vasya=0,petya=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`5`0`1`6`0`0`0`0`0`0`0`0`1 + 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 + for(int i=1;i<=n;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 + cin>>arr[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + for(int i=1;i<=n;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 + pos[arr[i]]=i;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`2`0 + cin>>p;`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 + for(int i=0;i>t;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + vasya+=pos[t];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`1`1`1`0 + petya+=(n-pos[t])+1;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`2`0`1`3`1`0 + cout<>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 + int temp=-300000;`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`1`0`1`0`0 + string ans="";`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`0`1`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + for(int i=0;i>name;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + int x,y,score=0,k;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`0`1`1`0`0`0`0`0`0`0`4`0`1`5`0`0`0`0`0`0`0`0`0 + cin>>x>>y;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + score+=x*100-y*50;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`2`2`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`1`4`0`0 + for(int j=0;j>k,score+=k;`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`1`0`1`2`0`0 + if(score>temp)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + ans=name,temp=score;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`2`0`0`2`0`0 + cout<> s1;`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`1 + cin >> s2;`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 + for (int i=0; i> s3;`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 + for (int i=0; i=a[i])`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`3`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + k=0; `FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`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 + min=a[i];`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + k=k+i;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`2`0`0`2`0`0 + s=n-1-k+h;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`4`0`0`4`0`1 + if(kh)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + printf("%d",s);`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`1`0`0`0`0`0`0 diff --git a/train/22790778.cpp.csv b/train/22790778.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..45336653e1a877bd8f045fbbb0ba4a0b8594b331 --- /dev/null +++ b/train/22790778.cpp.csv @@ -0,0 +1,28 @@ +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 +bool can(int pos){`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`1 + m.clear();`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 + int caught = 0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`0`1`1`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + for(int i = pos; i < n; i++){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`2`4`0`0`0`0`1`0`0`0`1`1`4`1`6`0`0`0`1`1`0`2`0`0 + if(!m[s[i]]) caught++;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`5`4`0`0`0`1`0`0`0`0`0`0`6`0`6`0`0`0`0`2`0`2`0`0 + m[s[i]] = 1;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`2`3`1`1`0`0`0`0`0`0`0`0`5`0`5`0`0`0`1`0`0`1`0`0 + return (caught == tot);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 +int calc(int pos){`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 + m.clear();`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 + int caught = 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(int i = pos; i < n; i++){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`0`0`0`0`1`0`0`0`1`1`4`1`6`0`0`0`1`1`0`2`0`0 + if(!m[s[i]]) caught++;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`4`0`0`0`1`0`0`0`0`0`0`6`0`6`0`0`0`0`2`0`2`0`0 + m[s[i]] = 1;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`1`1`0`0`0`0`0`0`0`0`5`0`5`0`0`0`1`0`0`1`0`0 + if(caught == tot) return (i - pos + 1);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`1`1`0`1`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + return -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`0`0`0`0`0`0`0`0`1`0`1`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 + cin >> s;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`6`1`0`0`0`0`0`0`0`0`0`9`0`9`0`0`1`2`0`0`2`0`0 + string ss = s;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`1`1`1`3`0`0`0`0`0`0`0`0`0 + sort(all(ss));`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`1`0`1`0`0`1`0`0`0`0`0`0 + tot = unique(all(ss)) - ss.begin();`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`1`1`0`0`1`0`0 + int lo = 0, hi = n - 1;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`2`2`0`0`0`0`0`0`0`2`4`1`7`0`0`0`1`0`0`1`0`0 + while(lo <= hi){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`1`0`0`1`0`2`0`2`0`0`0`1`0`0`1`0`0 + int mid = (lo + hi) / 2;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`1`1`0`0`0`0`0`0`0`1`2`1`4`0`0`0`2`0`0`2`0`0 + if(can(mid)) lo = mid + 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`4`3`1`1`0`1`0`0`0`0`0`0`4`0`4`0`1`1`2`0`0`2`0`1 + else hi = mid - 1;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`4`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + cout << calc(lo - 1) << '\n';`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`2`1`0`0`0`0`0`0`0`0`5`0`5`0`1`1`1`0`0`1`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 diff --git a/train/22790784.cpp.csv b/train/22790784.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..57a91563339a820e3baf0e52f6f283e92b02a84b --- /dev/null +++ b/train/22790784.cpp.csv @@ -0,0 +1,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 + int n,m,i,j,sum=0,sum1=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`6`0`1`7`0`0`0`0`0`0`0`0`1 + 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 + int a[n],b[n];`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>a[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + if(a[i]<0)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`1`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`1`0 + sum=sum+a[i];`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`2`0`0`2`1`0 + b[sum1]=a[i];`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`2`0 + sum1=sum1+1;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + sort(b,b+sum1);`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`4`0`4`0`0`1`1`0`0`1`0`0 + if(sum1>m)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`1 + for(i=0;i<(sum1-m);i++)`FunctionDecl,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`5`1`1`0`0`1`0`0`0`1`0`5`0`5`0`0`0`3`1`0`4`0`0 + sum=sum-b[i];`FunctionDecl,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`2`0`0`2`1`1 + sum=-sum;`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`2`0`2`0`0`0`1`1`0`2`0`0 + cout<> s;`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 + for (int i=0; i k2)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`1 + for (int i=0; i=i)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`1 + m=m-i;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`2`0`0`2`0`0 + i=1;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`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`1 + else if(m>=i)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + m=m-i;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`2`0`0`2`0`0 + break;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`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`1 + printf("%I64d",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`0`0`1`0`0`0`0`0`1 + 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 diff --git a/train/22791729.cpp.csv b/train/22791729.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..865907b2f15a3dfa0621674e3030aa2f6a43d03c --- /dev/null +++ b/train/22791729.cpp.csv @@ -0,0 +1,20 @@ +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 + ifstream fin("input.txt");`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`0`1`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + long long n, m, i = 0, a, counter = 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`5`0`1`6`0`0`0`0`0`0`0`0`1 + 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 + vectorvec;`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`1 + long long 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`1`0`1`2`0`0`0`0`0`0`0`0`0 + while (i < n)`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`1`0`0`1`0`2`0`2`0`0`0`1`0`0`1`0`0 + cin >> a;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + if (a < 0)`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`1`1`1`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + counter++;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`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`1 + sum += abs(a);`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`1`0`0`1`1`0`1 + vec.push_back(a);`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + i++;`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`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0 + if (counter == m)`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`1 + break;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + if (vec.size() == n)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + cout << 0 << endl;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`1`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`0`0 + return 0;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + cout << sum << endl;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`0`1 diff --git a/train/22792092.cpp.csv b/train/22792092.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..d3e157c4e9c87515d2283434ea0fa3b077f86b38 --- /dev/null +++ b/train/22792092.cpp.csv @@ -0,0 +1,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 +ll lcm(ll a,ll 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`0 + return abs(a*b)/__gcd(a,b);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`6`0`6`0`0`2`2`0`0`2`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 + ll n,x,a,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`4`0`1`5`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>=3)`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`1 + if(n%2==0)`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`2`1`2`2`0`1`0`0`0`0`0`0`1`0`1`0`0`0`2`0`0`2`0`0 + --n;`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`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 + a=n-1;`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + b=n-2;`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`2`2`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`0`0 + else a=n-1,b=n-2;`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`2`4`2`2`0`0`0`0`0`0`0`0`4`0`4`0`0`0`5`0`0`5`0`0 + else a=n,b=n;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`3`0`0`3`0`0 + x= lcm(n,a);`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`4`0`4`0`1`1`1`0`0`1`0`0 + x = lcm(x,b);`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`4`0`4`0`1`1`1`0`0`1`0`0 + cout<>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 + int ind=getindex(n);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`1`2`1`4`0`1`1`0`0`0`0`0`0 + int a,b,c;`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`3`0`1`4`0`0`0`0`0`0`0`0`1 + a=fib(ind-1);a==0?1:a;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`3`3`0`0`0`0`0`0`0`0`5`0`5`0`1`1`3`0`0`3`0`0 + b=fib(ind-3);b==0?1:b;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`3`3`0`0`0`0`0`0`0`0`5`0`5`0`1`1`3`0`0`3`0`0 + c=fib(ind-4);c==0?1:c;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`3`3`0`0`0`0`0`0`0`0`5`0`5`0`1`1`3`0`0`3`0`0 + cout<> 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 + c = 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`2`0`2`0`0`0`1`0`0`1`0`1 + while(c > 0){`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`1`1`1`0`0`0`1`0`0`1`0`1`0`1`0`0`0`1`0`0`1`0`0 + if(c == 16 || c == 12 || c == 8 || c == 4){`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`8`4`4`4`0`1`0`0`0`0`0`0`4`0`4`0`0`0`7`0`0`7`0`0 + c -= 4;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`8`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`1`1`0`0 + a++;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`8`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0 + c -= 7;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`8`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`1`1`0`1 + b++;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`8`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0 + if(c == 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`1 + while(a){`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`1`0`0`0`0`0`1`0`0`1`0`1`0`1`0`0`0`0`0`0`0`0`0 + cout << 4;`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`1`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + a--;`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`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 + while(b){`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`1`0`0`0`0`0`1`0`0`1`0`1`0`1`0`0`0`0`0`0`0`0`0 + cout << 7;`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`1`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + b--;`FunctionDecl,false;IfStmt,false;WhileStmt,false;`1`0`0`0`0`0`1`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 + else cout << -1;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`1`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`1`0`1`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 diff --git a/train/22792759.cpp.csv b/train/22792759.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..7758d29a40fe7f09fbe600c0cdf3ce2ba715965c --- /dev/null +++ b/train/22792759.cpp.csv @@ -0,0 +1,11 @@ +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,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`2`0`1`3`0`0`0`0`0`0`0`0`1 + int a,x=0,y=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`3`0`1`4`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 + for(int i=1;i<=n;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 + cin>>a;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + if(a>x)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + x=a;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`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<>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 + for(i=1;i<=n;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 + cin>>a[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + b[a[i]]=i;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`2`0 + for(i=1;i<=n;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=i+1;j<=n;j++)`FunctionDecl,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`0`0`0`0`0`0`3`0`2`5`1`1`0`0`1`0`0`0`1`0`5`0`5`0`0`0`3`1`0`4`0`0 + if(b[a[i]+a[j]]!=0)`FunctionDecl,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`2`0`0`0`0`0`1`0`0`0`4`0`3`5`1`1`0`1`0`0`0`0`0`0`5`0`5`0`0`0`2`0`0`2`3`0 + cout<>n>>x;`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`4`5`1`10`0`0`0`0`0`0`0`0`1 + char c;`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 + for(int i=0;i>c>>d;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + if(c=='+')`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`1`1`0`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + x+=d;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`1`1`0`0 + else if(x>=d)`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + x-=d;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`1`1`0`0 + ans++;`FunctionDecl,false;ForStmt,false;IfStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0 + cout<> 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 + for(int i = 0; i < n; 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 + int a; double b;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`0`0`0`0`0`0`0`0`0`0`2`0`2`4`0`0`0`0`0`0`0`0`0 + cin >> a >> b;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + x[i] = a;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + dp[0] = 1;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`2`2`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`1`0 + for(int i = 1; i < n; 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 + dp[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`0`2`0`2`0`0`0`1`0`0`1`1`0 + for(int j = i - 1; j >= 0; 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`1`3`1`5`0`0`0`2`1`0`3`0`0 + if(x[i] >= x[j]){`FunctionDecl,false;ForStmt,false;ForStmt,false;IfStmt,false;`1`0`2`0`0`0`0`0`1`0`0`0`4`0`3`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`2`0 + dp[i] = max(dp[i], dp[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`6`1`1`0`0`0`0`0`0`0`0`7`0`7`0`0`1`2`0`0`2`3`0 + cout << n - dp[n - 1] << endl;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`1`1`0`0`0`0`0`0`0`0`7`0`7`0`0`0`2`0`0`2`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 + 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 + cin.tie(0);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 + cout.tie(0);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 + int t = 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 + while(t--) {`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 + solve();`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`1`1`0`0`0`0`0`0 diff --git a/train/22794943.cpp.csv b/train/22794943.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..c97f0a9363304a9ee4ed36b29ceacd20ac31ff7b --- /dev/null +++ b/train/22794943.cpp.csv @@ -0,0 +1,21 @@ +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,arr[10000],arr1[10000];`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`3`0`1`4`0`0`0`0`0`0`0`0`1 + 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 + for(int i=0;i>arr[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + arr1[i]=arr[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`2`1 + sort(arr1,arr1+n);`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`4`0`4`0`0`1`1`0`0`1`0`0 + int l=arr1[0],h=arr1[n-1];`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`3`2`2`0`0`0`0`0`0`0`2`3`1`6`0`0`0`1`0`0`1`2`0 + for(int i=0;i0;i--)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`2`2`0`0`1`0`0`0`1`1`3`1`5`0`0`0`2`1`0`3`0`0 + if(l==arr[i])`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`3`0`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + l=i;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + break;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + l=n-1-l;`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 + if(l+h>n>>x>>y;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`0`0`0`0`0`0 + int temp=ceil(n*y/100);`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`1`3`1`5`0`0`1`2`0`0`2`0`0 + cout<> n)`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`1`0`0`1`0`3`0`3`0`0`0`0`0`0`0`0`0 + string name;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + int suc , uns , u;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`0`0`0`0`0`0`0`0`0`0`3`0`1`4`0`0`0`0`0`0`0`0`0 + int mx = -1 ;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`0`1`1`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`1`0`1`0`0 + string mx_i = "";`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`0`1`0`1`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0 + Rep(i , n )`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`1`2`1`1`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`0`0`1`0`0 + cin >> name >> suc >> uns;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`1`5`0`0`0`0`0`0`0`0`0`0`8`0`8`0`0`0`0`1`0`1`0`0 + int point = suc * 100 + 50 * uns;`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`1`2`2`2`0`0`0`0`0`0`0`1`2`1`4`0`0`0`3`0`0`3`0`0 + Rep(i , 5)`FunctionDecl,false;WhileStmt,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`1`0`0`0`0`0`4`0`1`1`2`2`0`0`1`0`0`0`1`1`1`1`3`0`0`0`1`0`0`1`0`0 + cin >> u ;`FunctionDecl,false;WhileStmt,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`1`0`0`0`0`0`4`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`1`0`1`0`0 + point += u;`FunctionDecl,false;WhileStmt,false;ForStmt,false;ForStmt,false;`1`0`2`0`0`0`1`0`0`0`0`0`4`0`1`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`1`1`0`0 + if(mx < point){`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`2`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + mx = point;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + mx_i = name;`FunctionDecl,false;WhileStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`2`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + cout << mx_i << endl;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`5`0`5`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 diff --git a/train/22795355.cpp.csv b/train/22795355.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..d306ede371a2f1d20bb77c6c54edf7ffb123a5b5 --- /dev/null +++ b/train/22795355.cpp.csv @@ -0,0 +1,5 @@ +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;`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 + 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 + cout<<2*n-1< v;`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`1 +v.push_back(0);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 +string s;`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 +cin>>k;`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 +cin>>s;`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 +len=s.size();`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`2`0`2`0`0`0`1`0`0`1`0`1 +if(k==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 + for(i=0;s[i];i++)`FunctionDecl,false;IfStmt,false;ForStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`1`1`0`0`1`0`0`0`1`0`5`0`5`0`0`0`1`1`0`2`0`1 + if(s[i]=='1')`FunctionDecl,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`2`1`0`0`1`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`0`0 + sum+=cnt*(cnt+1)/2;`FunctionDecl,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`3`2`2`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`1`4`0`0 + cnt=0;`FunctionDecl,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`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 + cnt++;`FunctionDecl,false;IfStmt,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`2`0`0`0`4`0`3`1`0`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0 + sum+=cnt*(cnt+1)/2;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`3`2`2`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`1`4`0`0 + cout<> 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 + 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 >> nick >> p >> m >> a >> b >> c >> d >> e;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`9`0`0`0`0`0`0`0`0`0`0`17`0`17`0`0`0`0`0`0`0`0`0 + score = 100 * p - 50 * m + a + b + c + d + e;`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`8`2`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`9`0`0`9`0`0 + if(score > maxScore)`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + maxScore = score;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + winNick = nick;`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + cout << winNick;`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 + 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 diff --git a/train/22795714.cpp.csv b/train/22795714.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..84d4aea2a35a4182ec010ff984a7c243570b1dcc --- /dev/null +++ b/train/22795714.cpp.csv @@ -0,0 +1,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 +bool comp(int a, int b) {`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 > b;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`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 + int k;`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 + cin >> k;`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 + vector v(12);`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 (auto & i : v) {`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`7`0`0`0`0`0`0`0`0`0`4`10`4`18`4`0`0`0`0`0`0`0`0 + cin >> i;`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 + sort(v.begin(), v.end(), comp);`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`1`0`0`0`0`0`0 + for (int i = 1; i < 12; ++i)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + v[i] += v[i - 1];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`1`1`0`0`0`0`0`0`0`0`6`0`6`0`0`0`1`0`1`2`0`0 + if (v[11] < k) {`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`3`0`3`0`0`0`1`0`0`1`0`0 + cout << -1;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`1`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`1`0`1`0`0 + if (k == 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`1 + cout << 0;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`1`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + cout << 1 + distance(v.begin(), lower_bound(v.begin(), v.end(), k));`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`1`5`1`1`0`0`0`0`0`0`0`0`8`0`8`0`0`2`1`0`0`1`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 diff --git a/train/22795755.cpp.csv b/train/22795755.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..135d03e33819cc51622dc6f7658520c7c794421f --- /dev/null +++ b/train/22795755.cpp.csv @@ -0,0 +1,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 +ll k,i,j,sum=0,cnt=0,len;`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`6`0`1`7`0`0`0`0`0`0`0`0`0 +vector v;`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`1 +v.push_back(0);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`0`0`0`0 +string s;`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 +cin>>k;`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 +cin>>s;`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 +len=s.length();`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`2`0`2`0`0`0`1`0`0`1`0`0 +if(k==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 + for(i=0;i>n>>m>>k;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`4`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`0`0`0`0`0`0 + rr=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`3`0`3`0`0`0`2`0`0`2`0`0 + cin>>a[1];`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`0`0`0`0`0`1`0 + int yyy=a[1]%k;`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`1`2`1`4`0`0`0`1`0`0`1`1`0 + for(int i=2;i<=rr;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 + { cin>>a[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + if(a[i]%k!=yyy)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`0`0`0`1`0`0`0`0`0`0`4`0`4`0`0`0`2`0`0`2`1`0 + cout<<-1;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`1`1`1`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`1`0`1`0`0 + return 0;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + sum=max(sum,a[i]);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`4`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`1`1`0`0`1`1`1 + sort(a+1,a+rr+1);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`3`2`2`0`0`0`0`0`0`0`0`4`0`4`0`0`1`3`0`0`3`0`0 + y=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + for(int j=1;j<=rr;j++)`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 + y+=abs(a[j]-a[rr/2])/k;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`6`1`1`0`0`0`0`0`0`0`0`7`0`7`0`0`1`3`0`1`4`2`1 + cout<> n >> k;`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 + for (int 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`3`2`2`0`0`1`0`0`0`1`1`3`1`5`0`0`0`2`1`0`3`0`1 + cin >> x >> y;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`5`0`5`0`0`0`0`0`0`0`0`0 + adj[x].pb(y);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`1`0 + adj[y].pb(x);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`1`0 + for (int i = 1; i <= n; 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 + dfs(i, 1);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`1`1`1`0`0`0`0`0`0`0`0`2`0`2`0`1`1`0`0`0`0`0`0 + fill(mark, mark + n, 0);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`1`1`0`0`1`0`0 + cout << ans / 2 << '\n';`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`2`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`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 diff --git a/train/22796000.cpp.csv b/train/22796000.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..ee7659978e3ba52985e86934f33491b52c17c23a --- /dev/null +++ b/train/22796000.cpp.csv @@ -0,0 +1,15 @@ +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,x=0,y=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`3`0`1`4`0`0`0`0`0`0`0`0`1 + while(cin>>n)`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`2`0`0`0`0`0`1`0`0`1`0`3`0`3`0`0`0`0`0`0`0`0`0 + int m[n],c[n];`FunctionDecl,false;WhileStmt,false;`1`0`0`0`0`0`1`0`0`0`0`0`2`0`1`0`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0 + for(int i=0;i>m[i]>>c[i];`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`5`0`0`0`0`0`0`0`0`0`0`7`0`7`0`0`0`0`0`0`0`2`1 + x=x+m[i];`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`2`0`0`2`1`0 + y=y+c[i];`FunctionDecl,false;WhileStmt,false;ForStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`2`0`0`2`1`0 + if(x>y)`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + cout<<"Mishka\n";`FunctionDecl,false;WhileStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`1`0`0`0`3`0`2`1`1`0`1`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + else if(y>x)`FunctionDecl,false;WhileStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`3`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + cout<<"Chris\n";`FunctionDecl,false;WhileStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`3`1`1`0`1`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + cout<<"Friendship is magic!^^\n";`FunctionDecl,false;WhileStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`1`0`2`0`0`0`4`0`3`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`1 diff --git a/train/22796351.cpp.csv b/train/22796351.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..41fa3a3e2da0eb55e180deb0b5fdd3e3a8bc4787 --- /dev/null +++ b/train/22796351.cpp.csv @@ -0,0 +1,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`1 + int n,maxi,mini,maxswap,minswap;`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`5`0`1`6`0`0`0`0`0`0`0`0`1 + 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 + int a[n];`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 + for(int i=0;i>a[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + maxi= a[0];`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`2`0`2`0`0`0`1`0`0`1`1`0 + maxswap=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + for(int i=1;i=0;i--)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`2`2`0`0`1`0`0`0`1`1`3`1`5`0`0`0`2`1`0`3`0`0 + if(mini>a[i] && mini!=a[i])`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`6`0`0`0`1`0`0`0`0`0`0`6`0`6`0`0`0`3`0`0`3`2`0 + minswap=(n-1)-i;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`3`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`0`3`0`0 + cout<>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 + for(int i=1; i<=n; ++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 + cin>>a[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + if(a[i]==-1)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`1`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`1`0`2`1`0 + s.push_back(i);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + edge[a[i]].push_back(i);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`2`0 + for(int i=0 ; i>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 + for(;i>a;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`0`0`0`0 + if(!visited[a])`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`0`1`0`1`1`0 + B.push_back(a);visited[a]=1;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`4`1`1`0`0`0`0`0`0`0`0`4`0`4`0`0`0`1`0`0`1`1`0 + sort(B.begin(),B.end());`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`1`0`0`0`0`0`1 + for(i=0;i>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 + for(int i=1; i<=n; ++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 + cin>>a[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + if(a[i]==-1)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`1`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`1`0`2`1`0 + s.push_back(i);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`0`0`0`0 + edge[a[i]].push_back(i);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`2`4`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`2`0 + for(int i=0 ; i need)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`1 + tmp -= need;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`1`1`0`0 + double d = (speedV * tmp) / dist(cord[i - 1],cord[i]);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`6`1`1`0`0`0`0`0`0`0`1`7`1`9`0`1`1`3`0`0`3`2`1 + res.x = cord[i - 1].x + (cord[i].x - cord[i - 1].x) * d;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`8`2`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`6`0`0`6`3`0 + res.y = cord[i - 1].y + (cord[i].y - cord[i - 1].y) * d;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`8`2`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`6`0`0`6`3`0 + res.z = cord[i - 1].z + (cord[i].z - cord[i - 1].z) * d;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`8`2`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`6`0`0`6`3`0 + tmp = 0;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`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;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`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 + can = true;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`1`1`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`1 + if(tmp > 1e-9){`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`2`1`1`0`0`1`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`1 + can = false;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`2`1`1`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + return true;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`2`0`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + return dist(player,res)/speedP <= mid;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`4`0`0`0`0`0`0`0`0`0`0`5`0`5`0`1`1`2`0`0`2`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 + 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`1 + for (int i = 0; i <= n; ++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 + scanf("%lf%lf%lf",&cord[i].x,&cord[i].y,&cord[i].z);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`6`1`0`1`0`0`0`0`0`0`0`7`0`7`3`0`1`0`3`0`3`3`0 + scanf("%lf%lf",&speedP,&speedV);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`1`0`1`0`0`0`0`0`0`0`3`0`3`2`0`1`0`2`0`2`0`0 + scanf("%lf%lf%lf",&player.x,&player.y,&player.z);`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`4`0`4`3`0`1`0`3`0`3`0`0 + double lo = 0 , hi = 1e9,mid;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`2`1`0`0`0`0`0`0`0`3`0`1`4`0`0`0`0`0`0`0`0`1 + for(int it = 0 ; it < 128 ; it++){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + mid = (lo + hi) * 0.5;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`1`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`0`3`0`0 + if(check(mid)) hi = mid;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`3`0`0`0`1`0`0`0`0`0`0`4`0`4`0`1`1`1`0`0`1`0`1 + lo = mid;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`1 + if(!can){`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`1`0`0`0`1`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0 + puts("NO");`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0 + return 0;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + puts("YES");`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0 + printf("%.12lf\n", mid);`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`0`0`1`0`0`0`0`0`0 + printf("%.12lf %.12lf %.12lf\n", res.x,res.y,res.z);`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`4`0`4`0`0`1`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 diff --git a/train/22796716.cpp.csv b/train/22796716.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..99bd136dbac06d0fa86b2ccac15b8949a11a9a22 --- /dev/null +++ b/train/22796716.cpp.csv @@ -0,0 +1,13 @@ +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 + char data[105];`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 + int len,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`2`0`1`3`0`0`0`0`0`0`0`0`0 + gets(data);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`1`0`0`0`0`0`0 + len=strlen(data);`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`1`1`0`0`1`0`0 + if(data[len-2]=='a'|| data[len-2]=='A'|| data[len-2]=='e'|| data[len-2]=='E'|| data[len-2]=='i'|| data[len-2]=='I'|| data[len-2]=='o'|| data[len-2]=='O'|| data[len-2]=='u'|| data[len-2]=='U'|| data[len-2]=='y'|| data[len-2]=='Y')`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`23`24`24`12`0`1`0`0`0`0`0`0`24`0`24`0`0`0`35`0`0`35`12`1 + printf("YES\n");`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`23`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0 + else if(data[len-2]==' ')`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`24`2`2`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`2`0`0`2`1`0 + if(data[len-3]=='a'|| data[len-3]=='A'|| data[len-3]=='e'|| data[len-3]=='E'|| data[len-3]=='i'|| data[len-3]=='I'|| data[len-3]=='o'|| data[len-3]=='O'|| data[len-3]=='u'|| data[len-3]=='U'|| data[len-3]=='y'|| data[len-3]=='Y')`FunctionDecl,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`3`0`0`0`4`0`47`24`24`12`0`1`0`0`0`0`0`0`24`0`24`0`0`0`35`0`0`35`12`0 + printf("YES\n");`FunctionDecl,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`3`0`0`0`4`0`47`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0 + printf("NO\n");`FunctionDecl,false;IfStmt,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`3`0`0`0`4`0`47`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0 + printf("NO\n");`FunctionDecl,false;IfStmt,false;IfStmt,false;`1`0`0`0`0`0`0`0`2`0`0`0`3`0`24`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`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 diff --git a/train/22796873.cpp.csv b/train/22796873.cpp.csv new file mode 100644 index 0000000000000000000000000000000000000000..b242575dd55de1e857a769e50a220df4deeb269d --- /dev/null +++ b/train/22796873.cpp.csv @@ -0,0 +1,21 @@ +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,maxi,mini,maxswap,minswap,x;`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`6`0`1`7`0`0`0`0`0`0`0`0`1 + 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 + int a[n];`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 + for(int i=0;i>a[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`0`0`0`0`0`0`0`0`0`0`4`0`4`0`0`0`0`0`0`0`1`0 + maxi= a[0];`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`2`0`2`0`0`0`1`0`0`1`1`0 + maxswap=0;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + for(int i=1;i=0;i--)`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`2`2`0`0`1`0`0`0`1`1`3`1`5`0`0`0`2`1`0`3`0`0 + if(mini>a[i] && mini!=a[i])`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`6`0`0`0`1`0`0`0`0`0`0`6`0`6`0`0`0`3`0`0`3`2`0 + mini=a[i];`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`1`0`0`1`1`0 + minswap=(n-1)-i;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`3`1`1`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`0`3`0`0 +if((maxswap+minswap)>n || (maxswap+minswap)==n)`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`6`0`0`0`1`0`0`0`0`0`0`6`0`6`0`0`0`5`0`0`5`0`0 + cout< need)`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`1 + tmp -= need;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`1`1`0`0 + double d = (speedV * tmp) / dist(cord[i - 1],cord[i]);`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`6`1`1`0`0`0`0`0`0`0`1`7`1`9`0`1`1`3`0`0`3`2`1 + res.x = cord[i - 1].x + (cord[i].x - cord[i - 1].x) * d;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`8`2`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`6`0`0`6`3`0 + res.y = cord[i - 1].y + (cord[i].y - cord[i - 1].y) * d;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`8`2`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`6`0`0`6`3`0 + res.z = cord[i - 1].z + (cord[i].z - cord[i - 1].z) * d;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`3`8`2`2`0`0`0`0`0`0`0`0`8`0`8`0`0`0`6`0`0`6`3`0 + tmp = 0;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`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;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`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 + return dist(player,res)/speedP <= mid;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`1`4`0`0`0`0`0`0`0`0`0`0`5`0`5`0`1`1`2`0`0`2`0`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 + 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`1 + for (int i = 0; i <= n; ++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 + scanf("%lf%lf%lf",&cord[i].x,&cord[i].y,&cord[i].z);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`6`1`0`1`0`0`0`0`0`0`0`7`0`7`3`0`1`0`3`0`3`3`0 + scanf("%lf%lf",&speedP,&speedV);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`2`1`0`1`0`0`0`0`0`0`0`3`0`3`2`0`1`0`2`0`2`0`0 + scanf("%lf%lf%lf",&player.x,&player.y,&player.z);`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`4`0`4`3`0`1`0`3`0`3`0`0 + double lo = 0 , hi = 0,mid;`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`3`0`1`4`0`0`0`0`0`0`0`0`0 + for(int i = 1 ; i <= n ; 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 + hi += dist(cord[i - 1],cord[i])/speedV;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`6`1`1`0`0`0`0`0`0`0`0`7`0`7`0`1`1`2`0`1`3`2`0 + hi += 1e-9;`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`0`0`1`1`0`1 + for(int it = 0 ; it < 512 ; it++){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`2`2`2`0`0`1`0`0`0`1`1`2`1`4`0`0`0`1`1`0`2`0`0 + mid = (lo + hi) * 0.5;`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`1`3`1`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`0`3`0`0 + if(check(mid)){`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`1`0`0`0`1`0`0`0`0`0`0`2`0`2`0`1`1`0`0`0`0`0`0 + hi = mid;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0 + can = true;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`1`1`0`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0 + lo = mid;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`1 + if(!can){`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`1`0`0`0`1`0`0`0`0`0`0`1`0`1`0`0`0`0`1`0`1`0`0 + puts("NO");`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0 + return 0;`FunctionDecl,false;IfStmt,false;`1`0`0`0`0`0`0`0`1`0`0`0`2`0`3`0`1`1`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0`0 + puts("YES");`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`0`1`0`1`0`0`0`0`0`0`0`1`0`1`0`0`1`0`0`0`0`0`0 + printf("%.12lf\n", mid);`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`0`0`1`0`0`0`0`0`0 + printf("%.12lf %.12lf %.12lf\n", res.x,res.y,res.z);`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`4`0`4`0`0`1`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