c-plus-plus / train /10248641.cpp.csv
ReySajju742's picture
Add files using upload-large-folder tool
7ab4270 verified
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
fill(a,a+1005,0);`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`3`0`3`0`0`1`1`0`0`1`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
int tmp=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<m; 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>>inp;`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
a[inp]++;`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`0`1`0`1`1`0
mmax=max(mmax,inp);`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`1`1`0`0`1`0`0
mmin=min(mmin,inp);`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`1`1`0`0`1`0`0
for (int i=mmax; i>0 && n>0; i--){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`3`4`2`2`0`0`1`0`0`0`1`1`4`1`6`0`0`0`3`1`0`4`0`0
sum+=a[i];`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`3`3`0`0`0`0`0`0`0`0`0`0`3`0`3`0`0`0`0`0`1`1`1`0
if (n>sum){`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`1`0`0`1`0`0
n-=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`0`0`1`1`1`1
res1+=sum*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`1`2`0`0
res1+=n*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`1`2`0`0
n=0;`FunctionDecl,false;ForStmt,false;IfStmt,false;`1`0`1`0`0`0`0`0`1`0`0`0`3`0`4`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0
for (int i=mmin; i<1001; 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
while (a[i]>0 && tmp>0){`FunctionDecl,false;ForStmt,false;WhileStmt,false;`1`0`1`0`0`0`1`0`0`0`0`0`3`0`4`3`2`2`0`0`0`1`0`0`1`0`3`0`3`0`0`0`3`0`0`3`1`0
if(i>tmp){`FunctionDecl,false;ForStmt,false;WhileStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`5`2`0`0`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0
res2+=tmp*i-tmp*(tmp-1)/2;`FunctionDecl,false;ForStmt,false;WhileStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`5`5`2`2`0`0`0`0`0`0`0`0`5`0`5`0`0`0`5`0`1`6`0`0
tmp=0;`FunctionDecl,false;ForStmt,false;WhileStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`5`1`1`1`0`0`0`0`0`0`0`0`1`0`1`0`0`0`1`0`0`1`0`0
res2+=i*(i+1)/2;`FunctionDecl,false;ForStmt,false;WhileStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`5`3`2`2`0`0`0`0`0`0`0`0`3`0`3`0`0`0`3`0`1`4`0`0
a[i]--;`FunctionDecl,false;ForStmt,false;WhileStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`5`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`1`0`1`1`0
tmp-=i;`FunctionDecl,false;ForStmt,false;WhileStmt,false;IfStmt,false;`1`0`1`0`0`0`1`0`1`0`0`0`4`0`5`2`0`0`0`0`0`0`0`0`0`0`2`0`2`0`0`0`0`0`1`1`0`0
cout<<res1<<" "<<res2;`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`6`0`6`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