c-plus-plus / train /10257437.cpp.csv
ReySajju742's picture
Add files using upload-large-folder tool
e0b2a67 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 bin(int l, int r, int key){`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
if(l>r) return 0;`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`2`1`1`0`1`0`0`0`0`0`0`2`0`2`0`0`0`1`0`0`1`0`0
int q = (l+r)>>1;`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(p[q].first>key) return bin(l, q-1, key);`FunctionDecl,true;IfStmt,false;`1`1`0`0`0`0`0`0`1`0`0`0`2`1`1`6`1`1`0`1`0`0`0`0`0`0`7`0`7`0`1`1`2`0`0`2`1`0
else if(p[q].first<key) return bin(q+1, r, key);`FunctionDecl,true;IfStmt,false;IfStmt,false;`1`1`0`0`0`0`0`0`2`0`0`0`3`1`2`6`1`1`0`1`0`0`0`0`0`0`7`0`7`0`1`1`2`0`0`2`1`0
else return p[q].second;`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`2`0`2`0`0`0`0`0`0`0`1`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;`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
FOR(i, 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`1`0`0`1`0`1
scanf("%d", &p[i].first);`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`1
p[i].second = 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`1`0`0`1`1`0
sort(p+1, p+1+n);`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
int 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
scanf("%d", &m);`FunctionDecl,false;`1`0`0`0`0`0`0`0`0`0`0`0`1`0`0`1`1`0`1`0`0`0`0`0`0`0`2`0`2`1`0`1`0`1`0`1`0`0
int 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`1`0`1`2`0`0`0`0`0`0`0`0`0
REP(i, m){`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`1`3`3`0`0`1`0`0`0`1`3`1`3`7`0`0`0`1`0`0`1`0`0
scanf("%d", &b);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`3`1`0`1`0`0`0`0`0`0`0`4`0`4`1`0`1`0`2`0`2`0`0
int q = bin(1, n, b);`FunctionDecl,false;ForStmt,false;`1`0`1`0`0`0`0`0`0`0`0`0`2`0`0`2`1`1`0`0`0`0`0`0`0`1`3`1`5`0`1`1`0`0`0`0`0`1
k1 += q;`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`0`0`1`1`0`1
k2 += n - q + 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
printf("%d %d\n", k1, k2);`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`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