problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02281 | #include <bits/stdc++.h>
#define ll long long int
#define FOR(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, n)
#define MAX 10000
#define NIL -1
using namespace std;
struct Node {
int p, l, r;
};
struct Node T[MAX];
int n;
void preParse(int u) {
if (u ... | #include <bits/stdc++.h>
#define ll long long int
#define FOR(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, n)
#define MAX 10000
#define NIL -1
using namespace std;
struct Node {
int p, l, r;
};
struct Node T[MAX];
int n;
void preParse(int u) {
if (u ... | [
"literal.string.change",
"io.output.change"
] | 126,585 | 126,584 | u925170719 | cpp |
p02281 | #include <bits/stdc++.h>
using namespace std;
#define NIL -1
int n;
struct node {
int p, l, r;
};
node tree[26];
/*先行順巡回*/
void Preorder(int u) {
if (u == NIL)
return; //左がないので戻る
cout << " " << u;
Preorder(tree[u].l);
Preorder(tree[u].r);
}
/*中間順巡回*/
void Inorder(int u) {
if (u == NIL)
return;
I... | #include <bits/stdc++.h>
using namespace std;
#define NIL -1
int n;
struct node {
int p, l, r;
};
node tree[26];
/*先行順巡回*/
void Preorder(int u) {
if (u == NIL)
return; //左がないので戻る
cout << " " << u;
Preorder(tree[u].l);
Preorder(tree[u].r);
}
/*中間順巡回*/
void Inorder(int u) {
if (u == NIL)
return;
I... | [
"identifier.change",
"call.function.change"
] | 126,586 | 126,587 | u520784163 | cpp |
p02281 | #include <iostream>
using namespace std;
struct node {
int parent, left, right;
};
node t[10001];
int n;
//ここから先行順巡回
void preparse(int u) {
if (u == -1)
return;
cout << " " << u;
preparse(t[u].left);
preparse(t[u].right);
}
//ここから中間順巡回
void inparse(int u) {
if (u == -1)
return;
inparse(t[u].left... | #include <iostream>
using namespace std;
struct node {
int parent, left, right;
};
node t[10001];
int n;
//ここから先行順巡回
void preparse(int u) {
if (u == -1)
return;
cout << " " << u;
preparse(t[u].left);
preparse(t[u].right);
}
//ここから中間順巡回
void inparse(int u) {
if (u == -1)
return;
inparse(t[u].left... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 126,589 | 126,590 | u229486205 | cpp |
p02281 | #include <cstring>
#include <iostream>
using namespace std;
int pro(int now);
int ino(int now);
int poo(int now);
typedef struct {
int p, l, r;
} node;
int pr[100001], in[100001], po[100001];
node tree[100001];
int main() {
cin.tie(0);
memset(tree, -1, sizeof(tree));
int n, v, r, l;
cin >> n;
for (int i = 0... | #include <cstring>
#include <iostream>
using namespace std;
int pro(int now);
int ino(int now);
int poo(int now);
typedef struct {
int p, l, r;
} node;
int pr[100001], in[100001], po[100001];
node tree[100001];
int main() {
cin.tie(0);
memset(tree, -1, sizeof(tree));
int n, v, r, l;
cin >> n;
for (int i = 0... | [
"literal.string.change",
"io.output.change"
] | 126,591 | 126,592 | u542562586 | cpp |
p02281 | #include <iostream>
#include <vector>
using namespace std;
vector<vector<int>> c;
void pre(int id) {
if (id == -1)
return;
cout << " " << id;
pre(c[id][0]);
pre(c[id][1]);
}
void in(int id) {
if (id == -1)
return;
in(c[id][0]);
cout << " " << id;
in(c[id][1]);
}
void post(int id) {
if (id ... | #include <iostream>
#include <vector>
using namespace std;
vector<vector<int>> c;
void pre(int id) {
if (id == -1)
return;
cout << " " << id;
pre(c[id][0]);
pre(c[id][1]);
}
void in(int id) {
if (id == -1)
return;
in(c[id][0]);
cout << " " << id;
in(c[id][1]);
}
void post(int id) {
if (id ... | [
"assignment.value.change",
"identifier.change"
] | 126,593 | 126,594 | u604920879 | cpp |
p02281 | #include <iostream>
using namespace std;
//
const int MAX = 25;
const int NIL = -1;
struct Node {
int parent = NIL;
int left = NIL;
int right = NIL;
};
Node T[MAX];
//
void preorder(int u) {
cout << " " << u;
if (T[u].left != NIL)
preorder(T[u].left);
if (T[u].right != NIL)
preorder(T[u].right)... | #include <iostream>
using namespace std;
//
const int MAX = 25;
const int NIL = -1;
struct Node {
int parent = NIL;
int left = NIL;
int right = NIL;
};
Node T[MAX];
//
void preorder(int u) {
cout << " " << u;
if (T[u].left != NIL)
preorder(T[u].left);
if (T[u].right != NIL)
preorder(T[u].right)... | [
"literal.string.change",
"io.output.change"
] | 126,597 | 126,598 | u759934006 | cpp |
p02281 | #include <cstdio>
#include <iostream>
using namespace std;
#define MAX 10000
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n;
void preParse(int u) {
if (u == NIL) {
return;
}
cout << " " << u << flush;
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == NIL) {
re... | #include <cstdio>
#include <iostream>
using namespace std;
#define MAX 10000
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n;
void preParse(int u) {
if (u == NIL) {
return;
}
cout << " " << u << flush;
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == NIL) {
re... | [
"literal.string.change",
"io.output.change"
] | 126,601 | 126,602 | u047256438 | cpp |
p02281 | #include <stdio.h>
#define MAX 10000
#define NIL -1
struct Node {
int p, l, r;
};
struct Node T[MAX];
int n;
void preParse(int u) {
if (u == NIL)
return;
printf("%d", u);
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == NIL)
return;
inParse(T[u].l);
printf("%d", u);
inPa... | #include <stdio.h>
#define MAX 10000
#define NIL -1
struct Node {
int p, l, r;
};
struct Node T[MAX];
int n;
void preParse(int u) {
if (u == NIL)
return;
printf(" %d", u);
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == NIL)
return;
inParse(T[u].l);
printf(" %d", u);
in... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 126,612 | 126,613 | u578092577 | cpp |
p02281 | #include <cstdio>
#define MAX 10005
#define NIL -1
typedef struct pp {
int p, l, r;
} Node;
Node T[MAX];
int n;
/*先行巡回*/
void preParse(int u) {
if (u == NIL)
return;
printf("%d", u);
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == NIL)
return;
inParse(T[u].l);
printf("%d... | #include <cstdio>
#define MAX 10005
#define NIL -1
typedef struct pp {
int p, l, r;
} Node;
Node T[MAX];
int n;
/*先行巡回*/
void preParse(int u) {
if (u == NIL)
return;
printf(" %d", u);
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == NIL)
return;
inParse(T[u].l);
printf(" ... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 126,614 | 126,615 | u721251852 | cpp |
p02281 | #include <cstdio>
#define MAX 10005
#define NIL -1
typedef struct pp {
int p, l, r;
} Node;
Node T[MAX];
int n;
/*先行巡回*/
void preParse(int u) {
if (u == NIL)
return;
printf(" %d", u);
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == NIL)
return;
inParse(T[u].l);
printf(" ... | #include <cstdio>
#define MAX 10005
#define NIL -1
typedef struct pp {
int p, l, r;
} Node;
Node T[MAX];
int n;
/*先行巡回*/
void preParse(int u) {
if (u == NIL)
return;
printf(" %d", u);
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == NIL)
return;
inParse(T[u].l);
printf(" ... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 126,616 | 126,615 | u721251852 | cpp |
p02281 | #include <iostream>
using namespace std;
int nil = -1;
struct Node {
int p, l, r;
};
// pはparent,lはleftchild,rはrightchild
Node T[10000];
int n;
void preParse(int u) {
if (u == nil)
return;
cout << " " << u;
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == nil)
return;
inPa... | #include <iostream>
using namespace std;
int nil = -1;
struct Node {
int p, l, r;
};
// pはparent,lはleftchild,rはrightchild
Node T[10000];
int n;
void preParse(int u) {
if (u == nil)
return;
cout << " " << u;
preParse(T[u].l);
preParse(T[u].r);
}
void inParse(int u) {
if (u == nil)
return;
inPa... | [
"identifier.change",
"call.function.change"
] | 126,618 | 126,619 | u876376564 | cpp |
p02281 | #include <cstdio>
#define NIL -1
#define MAX 10000
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == NIL)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHeight(int u) {
int h1 = 0, h2 = 0;
if (T... | #include <cstdio>
#define NIL -1
#define MAX 10000
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == NIL)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHeight(int u) {
int h1 = 0, h2 = 0;
if (T... | [
"identifier.change",
"call.function.change"
] | 126,622 | 126,623 | u815527706 | cpp |
p02281 | #include <cstdio>
#define NIL -1
#define MAX 10000
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == NIL)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHeight(int u) {
int h1 = 0, h2 = 0;
if (T... | #include <cstdio>
#define NIL -1
#define MAX 10000
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == NIL)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHeight(int u) {
int h1 = 0, h2 = 0;
if (T... | [
"identifier.change",
"call.function.change"
] | 126,624 | 126,623 | u815527706 | cpp |
p02281 | #include <algorithm>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
struct binarytree {
int parent, left, right;
};
int order(vector<binarytree> &node, int i, int mode) {
int e1, e2;
if (mode == 0)
cout << " " << i;
e1 = node[i].left;
if (e1 != -1)
order(node, e1, mo... | #include <algorithm>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
struct binarytree {
int parent, left, right;
};
int order(vector<binarytree> &node, int i, int mode) {
int e1, e2;
if (mode == 0)
cout << " " << i;
e1 = node[i].left;
if (e1 != -1)
order(node, e1, mo... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 126,627 | 126,628 | u912237403 | cpp |
p02289 | #include <iostream>
#include <queue>
#include <string>
using namespace std;
int main() {
string com;
priority_queue<int> PQ;
while (1) {
cin >> com;
if (com == "insert") {
int key;
cin >> key;
PQ.push(key);
} else if (com == "extract") {
cout << PQ.top();
PQ.pop();
... |
#include <iostream>
#include <queue>
#include <string>
using namespace std;
int main() {
string com;
priority_queue<int> PQ;
while (1) {
cin >> com;
if (com == "insert") {
int key;
cin >> key;
PQ.push(key);
} else if (com == "extract") {
cout << PQ.top() << endl;
PQ.po... | [
"io.output.newline.add"
] | 126,806 | 126,807 | u210148484 | cpp |
p02289 | #include <iostream>
#include <queue>
#include <string>
using namespace std;
int main() {
string cmd;
priority_queue<int> Q;
while (cin >> cmd && cmd != "end") {
if (cmd == "insert") {
int n;
cin >> n;
Q.push(n);
} else if (cmd == "extract") {
cout << Q.top();
Q.pop();
}
... | #include <iostream>
#include <queue>
#include <string>
using namespace std;
int main() {
string cmd;
priority_queue<int> Q;
while (cin >> cmd && cmd != "end") {
if (cmd == "insert") {
int n;
cin >> n;
Q.push(n);
} else if (cmd == "extract") {
cout << Q.top() << endl;
Q.pop();... | [
"io.output.newline.add"
] | 126,831 | 126,832 | u228348812 | cpp |
p02289 | #include <iostream>
#include <string>
using namespace std;
#define MAX 2000000
#define INFTY (1 << 30)
int H, i, A[MAX + 1];
int parent(int i) { return i / 2; }
int left(int i) { return i * 2; }
int right(int i) { return i * 2 + 1; }
void maxHeapify(int i) {
int l, r, largest;
l = left(i);
r = right(i);
i... | #include <iostream>
#include <string>
using namespace std;
#define MAX 2000000
#define INFTY (1 << 30)
int H, i, A[MAX + 1];
int parent(int i) { return i / 2; }
int left(int i) { return i * 2; }
int right(int i) { return i * 2 + 1; }
void maxHeapify(int i) {
int l, r, largest;
l = left(i);
r = right(i);
i... | [
"assignment.variable.change",
"identifier.replace.remove",
"literal.replace.add",
"variable_access.subscript.index.change",
"io.output.newline.add"
] | 126,836 | 126,837 | u699373030 | cpp |
p02289 | #include <iostream>
#include <string>
using namespace std;
#define MAX 2000000
#define INFTY (1 << 30)
int H, i, A[MAX + 1];
int parent(int i) { return i / 2; }
int left(int i) { return i * 2; }
int right(int i) { return i * 2 + 1; }
void maxHeapify(int i) {
int l, r, largest;
l = left(i);
r = right(i);
i... | #include <iostream>
#include <string>
using namespace std;
#define MAX 2000000
#define INFTY (1 << 30)
int H, i, A[MAX + 1];
int parent(int i) { return i / 2; }
int left(int i) { return i * 2; }
int right(int i) { return i * 2 + 1; }
void maxHeapify(int i) {
int l, r, largest;
l = left(i);
r = right(i);
i... | [
"assignment.variable.change",
"identifier.replace.remove",
"literal.replace.add",
"variable_access.subscript.index.change"
] | 126,838 | 126,837 | u699373030 | cpp |
p02289 | #include <cassert>
#include <cstdio>
#include <cstdlib>
#include <queue>
template <typename T> class TBinaryHeap {
std::vector<T> FArray;
void BubbleUp(int Index) {
assert(FArray.size() > Index);
if (Index == 1)
return;
int Parent = Index / 2;
if (FArray[Index] <= FArray[Parent]) {
retu... | #include <cassert>
#include <cstdio>
#include <cstdlib>
#include <queue>
template <typename T> class TBinaryHeap {
std::vector<T> FArray;
void BubbleUp(int Index) {
assert(FArray.size() > Index);
if (Index == 1)
return;
int Parent = Index / 2;
if (FArray[Index] <= FArray[Parent]) {
retu... | [
"identifier.change",
"expression.operation.binary.change",
"expression.operation.binary.remove",
"variable_declaration.type.primitive.change",
"variable_declaration.type.narrow.change"
] | 126,839 | 126,840 | u858711833 | cpp |
p02289 | #include <iostream>
#include <queue>
#include <string>
using namespace std;
int main(void) {
priority_queue<int> queue;
string command;
int num;
while (true) {
cin >> command;
if (command == "end") {
break;
}
if (command == "extract") {
cout << queue.top();
queue.pop();
... | #include <iostream>
#include <queue>
#include <string>
using namespace std;
int main(void) {
priority_queue<int> queue;
string command;
int num;
while (true) {
cin >> command;
if (command == "end") {
break;
}
if (command == "extract") {
cout << queue.top() << endl;
queue.po... | [
"io.output.newline.add"
] | 126,847 | 126,848 | u964619663 | cpp |
p02289 | #include <iostream>
#include <queue>
using namespace std;
int main() {
priority_queue<int> PQ;
char com[20];
while (1) {
cin >> com;
if (com[0] == 'i') {
int key;
cin >> key;
PQ.push(key);
} else if (com[1] == 'x') {
cout << PQ.top();
PQ.pop();
}
else {
... | #include <iostream>
#include <queue>
using namespace std;
int main() {
priority_queue<int> PQ;
char com[20];
while (1) {
cin >> com;
if (com[0] == 'i') {
int key;
cin >> key;
PQ.push(key);
} else if (com[1] == 'x') {
cout << PQ.top() << "\n";
PQ.pop();
}
else ... | [
"io.output.change"
] | 126,851 | 126,852 | u886189340 | cpp |
p02289 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int INF = 2100000000;
class Heap {
public:
vector<int> a;
Heap(int n) { a.resize(n + 1, INF); }
int get_parent(int x) { return a[(x) / 2]; }
int get_left(int x) {
if (x * 2 < a.size() - 1) {
return a[x * 2];
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int INF = 2100000000;
class Heap {
public:
vector<int> a;
Heap(int n) { a.resize(n + 1, INF); }
int get_parent(int x) { return a[(x) / 2]; }
int get_left(int x) {
if (x * 2 < a.size() - 1) {
return a[x * 2];
... | [
"literal.number.change",
"call.arguments.change"
] | 126,858 | 126,859 | u182453220 | cpp |
p02289 | #include <iostream>
using namespace std;
int A[2000000], hsize = 0;
void insert(int key) {
int i = hsize;
A[i] = key;
hsize++;
while (i > 0 && A[i] > A[(i - 1) / 2]) {
swap(A[i], A[(i - 1) / 2]);
i = (i - 1) / 2;
}
}
void modheap(int i) {
int l = i * 2 + 1;
int r = i * 2 + 2;
int larger = i;
... | #include <iostream>
using namespace std;
int A[2000000], hsize = 0;
void insert(int key) {
int i = hsize;
A[i] = key;
hsize++;
while (i > 0 && A[i] > A[(i - 1) / 2]) {
swap(A[i], A[(i - 1) / 2]);
i = (i - 1) / 2;
}
}
void modheap(int i) {
int l = i * 2 + 1;
int r = i * 2 + 2;
int larger = i;
... | [
"expression.unary.arithmetic.add"
] | 126,862 | 126,863 | u358566817 | cpp |
p02289 | #include <iostream>
using namespace std;
#define MAX 2000000
#define INFTY (1 << 30)
long long key;
int H, A[MAX];
void maxHeapify(int i) {
int l = 2 * i, largest;
int r = 2 * i + 1;
if (l <= H && A[l] > A[i])
largest = l;
else
largest = i;
if (r <= H && A[r] > A[largest])
largest = r;
if (larg... | #include <iostream>
using namespace std;
#define MAX 2000000
#define INFTY (1 << 30)
long long key;
int H, A[MAX];
void maxHeapify(int i) {
int l = 2 * i, largest;
int r = 2 * i + 1;
if (l <= H && A[l] > A[i])
largest = l;
else
largest = i;
if (r <= H && A[r] > A[largest])
largest = r;
if (larg... | [] | 126,866 | 126,867 | u649417416 | cpp |
p02289 | #define _CRT_SECURE_NO_WARNINGS
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <utility>
template <class TotallyOrderedSet> class pairing_heap {
public:
using set_type = TotallyOrderedSet;
using value_type = typename set_type::value_type;
using const_re... | #define _CRT_SECURE_NO_WARNINGS
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <utility>
template <class TotallyOrderedSet> class pairing_heap {
public:
using set_type = TotallyOrderedSet;
using value_type = typename set_type::value_type;
using const_re... | [
"misc.opposites",
"expression.operator.compare.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 126,888 | 126,889 | u984106796 | cpp |
p02289 | #define _CRT_SECURE_NO_WARNINGS
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <utility>
template <class TotallyOrderedSet> class pairing_heap {
public:
using set_type = TotallyOrderedSet;
using value_type = typename set_type::value_type;
using const_re... | #define _CRT_SECURE_NO_WARNINGS
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <utility>
template <class TotallyOrderedSet> class pairing_heap {
public:
using set_type = TotallyOrderedSet;
using value_type = typename set_type::value_type;
using const_re... | [
"misc.opposites",
"expression.operator.compare.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 126,888 | 126,890 | u984106796 | cpp |
p02289 | #define _CRT_SECURE_NO_WARNINGS
#include <cassert>
#include <cstddef>
#include <functional>
#include <memory>
#include <type_traits>
#include <utility>
template <class TotallyOrderedSet> class pairing_heap {
public:
using set_type = TotallyOrderedSet;
using value_type = typename set_type::value_type;
using cons... | #define _CRT_SECURE_NO_WARNINGS
#include <cassert>
#include <cstddef>
#include <functional>
#include <memory>
#include <type_traits>
#include <utility>
template <class TotallyOrderedSet> class pairing_heap {
public:
using set_type = TotallyOrderedSet;
using value_type = typename set_type::value_type;
using cons... | [
"misc.opposites",
"expression.operator.compare.change",
"call.arguments.change",
"expression.operation.binary.change",
"function.return_value.change"
] | 126,891 | 126,892 | u984106796 | cpp |
p02289 | #include <iostream>
#include <stdio.h>
#include <string>
#define MAX 1000000
#define INFTY (1 << 30)
int n, H[MAX];
void maxHeap(int i) {
int left = i * 2;
int right = i * 2 + 1;
if (left > n)
return;
int max = left;
if (right <= n)
max = H[left] >= H[right] ? left : right;
max = H[i] >= H[max]... | #include <iostream>
#include <stdio.h>
#include <string>
#define MAX 100000000
#define INFTY (1 << 30)
int n, H[MAX];
void maxHeap(int i) {
int left = i * 2;
int right = i * 2 + 1;
if (left > n)
return;
int max = left;
if (right <= n)
max = H[left] >= H[right] ? left : right;
max = H[i] >= H[ma... | [
"preprocessor.define.value.change",
"literal.integer.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 126,898 | 126,899 | u888548672 | cpp |
p02289 | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
class Heap {
public:
Heap() {
array = new int[2000000];
n = 0;
}
void insert(int data) {
array[n] = data;
int tmp = n;
while (tmp != 0 && array[tmp] > array[(tmp - 1) / 2]) {
std::swap(a... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
class Heap {
public:
Heap() {
array = new int[2000000];
n = 0;
}
void insert(int data) {
array[n] = data;
int tmp = n;
while (tmp != 0 && array[tmp] > array[(tmp - 1) / 2]) {
std::swap(a... | [
"assignment.change"
] | 126,905 | 126,906 | u774648665 | cpp |
p02289 | #include <iostream>
#include <queue>
#include <string>
using namespace std;
//默认的优先队列是一个最大堆,当然这个最大的基准可以自己设置
int main() {
char com[20];
priority_queue<int> pq;
while (true) {
int key;
cin >> com;
if (com[0] == 'i') {
cin >> key;
pq.push(key);
} else if (com[1] == 'x') {
cout <... | #include <iostream>
#include <queue>
#include <string>
using namespace std;
//默认的优先队列是一个最大堆,当然这个最大的基准可以自己设置
int main() {
char com[20];
priority_queue<int> pq;
while (true) {
int key;
cin >> com;
if (com[0] == 'i') {
cin >> key;
pq.push(key);
} else if (com[1] == 'x') {
cout <... | [
"io.output.newline.add"
] | 126,915 | 126,916 | u633823896 | cpp |
p02289 | // AOJ Algorithms and Data Structures I - Heaps - Priority Queue
// s 2013 0913 1556
//
/*
[ヒープを表す配列A、ヒープのサイズ(要素数)をheap_sizeとすれば、A[1...heap_size]にヒープの要素が格納される。木の根はA[1]であり、節点の添え字iが与えられたとき、その親parent(i)、左の子left(i)、右の子right(i)は以下の式で算出される:
] と、問題文に書いてあるので、添え字0は使わず、獲得する領域も1大きくする。 add
2013 0913 1714
要素数が決まってないので、動的配列で作りたいが... | // AOJ Algorithms and Data Structures I - Heaps - Priority Queue
// s 2013 0913 1556
//
/*
[ヒープを表す配列A、ヒープのサイズ(要素数)をheap_sizeとすれば、A[1...heap_size]にヒープの要素が格納される。木の根はA[1]であり、節点の添え字iが与えられたとき、その親parent(i)、左の子left(i)、右の子right(i)は以下の式で算出される:
] と、問題文に書いてあるので、添え字0は使わず、獲得する領域も1大きくする。 add
2013 0913 1714
要素数が決まってないので、動的配列で作りたいが... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 126,932 | 126,931 | u708195431 | cpp |
p02289 | // AOJ Algorithms and Data Structures I - Heaps - Priority Queue
// s 2013 0913 1556
//
/*
[ヒープを表す配列A、ヒープのサイズ(要素数)をheap_sizeとすれば、A[1...heap_size]にヒープの要素が格納される。木の根はA[1]であり、節点の添え字iが与えられたとき、その親parent(i)、左の子left(i)、右の子right(i)は以下の式で算出される:
] と、問題文に書いてあるので、添え字0は使わず、獲得する領域も1大きくする。 add
2013 0913 1714
要素数が決まってないので、動的配列で作りたいが... | // AOJ Algorithms and Data Structures I - Heaps - Priority Queue
// s 2013 0913 1556
//
/*
[ヒープを表す配列A、ヒープのサイズ(要素数)をheap_sizeとすれば、A[1...heap_size]にヒープの要素が格納される。木の根はA[1]であり、節点の添え字iが与えられたとき、その親parent(i)、左の子left(i)、右の子right(i)は以下の式で算出される:
] と、問題文に書いてあるので、添え字0は使わず、獲得する領域も1大きくする。 add
2013 0913 1714
要素数が決まってないので、動的配列で作りたいが... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 126,933 | 126,931 | u708195431 | cpp |
p02289 | // AOJ Algorithms and Data Structures I - Heaps - Priority Queue
// s 2013 0913 1556
//
/*
[ヒープを表す配列A、ヒープのサイズ(要素数)をheap_sizeとすれば、A[1...heap_size]にヒープの要素が格納される。木の根はA[1]であり、節点の添え字iが与えられたとき、その親parent(i)、左の子left(i)、右の子right(i)は以下の式で算出される:
] と、問題文に書いてあるので、添え字0は使わず、獲得する領域も1大きくする。 add
2013 0913 1714
要素数が決まってないので、動的配列で作りたいが... | // AOJ Algorithms and Data Structures I - Heaps - Priority Queue
// s 2013 0913 1556
//
/*
[ヒープを表す配列A、ヒープのサイズ(要素数)をheap_sizeとすれば、A[1...heap_size]にヒープの要素が格納される。木の根はA[1]であり、節点の添え字iが与えられたとき、その親parent(i)、左の子left(i)、右の子right(i)は以下の式で算出される:
] と、問題文に書いてあるので、添え字0は使わず、獲得する領域も1大きくする。 add
2013 0913 1714
要素数が決まってないので、動的配列で作りたいが... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 126,935 | 126,931 | u708195431 | cpp |
p02289 | // AOJ Algorithms and Data Structures I - Heaps - Priority Queue
// s 2013 0913 1556
//
/*
[ヒープを表す配列A、ヒープのサイズ(要素数)をheap_sizeとすれば、A[1...heap_size]にヒープの要素が格納される。木の根はA[1]であり、節点の添え字iが与えられたとき、その親parent(i)、左の子left(i)、右の子right(i)は以下の式で算出される:
] と、問題文に書いてあるので、添え字0は使わず、獲得する領域も1大きくする。 add
2013 0913 1714
要素数が決まってないので、動的配列で作りたいが... | // AOJ Algorithms and Data Structures I - Heaps - Priority Queue
// s 2013 0913 1556
//
/*
[ヒープを表す配列A、ヒープのサイズ(要素数)をheap_sizeとすれば、A[1...heap_size]にヒープの要素が格納される。木の根はA[1]であり、節点の添え字iが与えられたとき、その親parent(i)、左の子left(i)、右の子right(i)は以下の式で算出される:
] と、問題文に書いてあるので、添え字0は使わず、獲得する領域も1大きくする。 add
2013 0913 1714
要素数が決まってないので、動的配列で作りたいが... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 126,936 | 126,931 | u708195431 | cpp |
p02289 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct H {
int val;
H *l, *r;
H(int v) : val(v) { l = r = nullptr; }
};
H *root;
H *meld(H *h1, H *h2) {
if (h1 == nullptr)
return h2;
if (h2 == nullptr)
return h1;
if (h1->val > h2->val)
swap(h1, h2);
h1->r = me... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct H {
int val;
H *l, *r;
H(int v) : val(v) { l = r = nullptr; }
};
H *root;
H *meld(H *h1, H *h2) {
if (h1 == nullptr)
return h2;
if (h2 == nullptr)
return h1;
if (h1->val < h2->val)
swap(h1, h2);
h1->r = me... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 126,982 | 126,983 | u677070142 | cpp |
p02289 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 2000005
#define INF 2000000010
int n = 0;
int a[N];
void swap(int *a, int *b) {
int t;
t = *a;
*a = *b;
*b = t;
}
void maxHeapify(int i) {
int l = 2 * i;
int r = 2 * i + 1;
int maxi = i;
if (l <= n && a[l] > a[maxi]) {
maxi = l;
... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 2000005
#define INF 2000000010
int n = 0;
int a[N];
void swap(int *a, int *b) {
int t;
t = *a;
*a = *b;
*b = t;
}
void maxHeapify(int i) {
int l = 2 * i;
int r = 2 * i + 1;
int maxi = i;
if (l <= n && a[l] > a[maxi]) {
maxi = l;
... | [
"call.remove"
] | 126,986 | 126,985 | u713994760 | cpp |
p02289 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
struct priority_queue {
int A[2100005];
int fact;
prio... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
struct priority_queue {
int A[2001005];
int fact;
prio... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 127,021 | 127,022 | u467129921 | cpp |
p02289 | #include <algorithm>
#include <stdio.h>
using namespace std;
int val, size_, heap[2097168];
char c[9];
inline void insert(int x) {
int ptr = size_++;
heap[ptr] = x;
while (ptr > 1) {
if (heap[ptr >> 1] < heap[ptr])
swap(heap[ptr], heap[ptr >> 1]);
ptr >>= 1;
}
}
inline int extract() {
int ret = ... | #include <algorithm>
#include <stdio.h>
using namespace std;
int val, size_, heap[2097168];
char c[9];
inline void insert(int x) {
int ptr = size_++;
heap[ptr] = x;
while (ptr > 1) {
if (heap[ptr >> 1] < heap[ptr])
swap(heap[ptr], heap[ptr >> 1]);
ptr >>= 1;
}
}
inline int extract() {
int ret = ... | [
"literal.number.change",
"variable_declaration.value.change"
] | 127,027 | 127,028 | u823513038 | cpp |
p02292 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define pb push_back
#define mp make_pair
#define SZ(x) (int)(x).size()
typedef long long LL;
typedef pair<int, int> pii;
typedef pai... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define pb push_back
#define mp make_pair
#define SZ(x) (int)(x).size()
typedef long long LL;
typedef pair<int, int> pii;
typedef pai... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 127,049 | 127,050 | u972515209 | cpp |
p02292 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define pb push_back
#define mp make_pair
#define SZ(x) (int)(x).size()
typedef long long LL;
typedef pair<int, int> pii;
typedef pai... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define pb push_back
#define mp make_pair
#define SZ(x) (int)(x).size()
typedef long long LL;
typedef pair<int, int> pii;
typedef pai... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 127,051 | 127,050 | u972515209 | cpp |
p02292 | #include <bits/stdc++.h>
using namespace std;
#define TemplateVersion "3.4.0"
// Useful Marcos
//====================START=====================
// Compile use C++11 and above
#ifdef LOCAL
#define debug(args...) \
{ ... | #include <bits/stdc++.h>
using namespace std;
#define TemplateVersion "3.4.0"
// Useful Marcos
//====================START=====================
// Compile use C++11 and above
#ifdef LOCAL
#define debug(args...) \
{ ... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"io.output.change"
] | 127,054 | 127,055 | u671297350 | cpp |
p02292 | #include <bits/stdc++.h>
using namespace std;
#define TemplateVersion "3.4.0"
// Useful Marcos
//====================START=====================
// Compile use C++11 and above
#ifdef LOCAL
#define debug(args...) \
{ ... | #include <bits/stdc++.h>
using namespace std;
#define TemplateVersion "3.4.0"
// Useful Marcos
//====================START=====================
// Compile use C++11 and above
#ifdef LOCAL
#define debug(args...) \
{ ... | [
"call.arguments.change",
"call.arguments.add"
] | 127,056 | 127,057 | u671297350 | cpp |
p02292 | #include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4267) // "int n = (unsigned)size"
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using ll = long long int;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vd = vector<double>;
using v... | #include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4267) // "int n = (unsigned)size"
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using ll = long long int;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vd = vector<double>;
using v... | [
"literal.number.change",
"variable_declaration.value.change"
] | 127,069 | 127,066 | u034945619 | cpp |
p02292 | #include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4267) // "int n = (unsigned)size"
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using ll = long long int;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vd = vector<double>;
using v... | #include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4267) // "int n = (unsigned)size"
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using ll = long long int;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vd = vector<double>;
using v... | [
"literal.number.change",
"variable_declaration.value.change"
] | 127,069 | 127,070 | u034945619 | cpp |
p02292 | #include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4267) // "int n = (unsigned)size"
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using ll = long long int;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vd = vector<double>;
using v... | #include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4267) // "int n = (unsigned)size"
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using ll = long long int;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vd = vector<double>;
using v... | [
"literal.number.change",
"variable_declaration.value.change"
] | 127,069 | 127,071 | u034945619 | cpp |
p02292 | #include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
//-------------------------------------------------------------------------------------
/*2点[(x1,y1),(x2,y2)]を入力し二点を通る直線ax+by+cの(a,b,c)を返す, */
/*x1==x2ならfalseを返す*/
/*falseならばx=cの形の直線*/
void straight_line_passing_through_th... | #include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
//-------------------------------------------------------------------------------------
/*2点[(x1,y1),(x2,y2)]を入力し二点を通る直線ax+by+cの(a,b,c)を返す, */
/*x1==x2ならfalseを返す*/
/*falseならばx=cの形の直線*/
void straight_line_passing_through_th... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 127,072 | 127,073 | u471115210 | cpp |
p02292 | ////////////////////////////////////////////////////////////////////////////////
// 平面幾何
// 型変換できるもの
// double -> Point
// Segment -> Line
// 誤差の話:絶対誤差でも相対誤差でも死ぬ例
// int main(){
// const double EPS = 1e-9;
// double a = 1.3, b = 1e8, c = a + b;
// c = c - b;
// printf("%d\n", equal(a, c)); // =>... | ////////////////////////////////////////////////////////////////////////////////
// 平面幾何
// 型変換できるもの
// double -> Point
// Segment -> Line
// 誤差の話:絶対誤差でも相対誤差でも死ぬ例
// int main(){
// const double EPS = 1e-9;
// double a = 1.3, b = 1e8, c = a + b;
// c = c - b;
// printf("%d\n", equal(a, c)); // =>... | [
"expression.operation.binary.remove"
] | 127,074 | 127,075 | u392015442 | cpp |
p02292 | ////////////////////////////////////////////////////////////////////////////////
// 平面幾何
// 型変換できるもの
// double -> Point
// Segment -> Line
// 誤差の話:絶対誤差でも相対誤差でも死ぬ例
// int main(){
// const double EPS = 1e-9;
// double a = 1.3, b = 1e8, c = a + b;
// c = c - b;
// printf("%d\n", equal(a, c)); // =>... | ////////////////////////////////////////////////////////////////////////////////
// 平面幾何
// 型変換できるもの
// double -> Point
// Segment -> Line
// 誤差の話:絶対誤差でも相対誤差でも死ぬ例
// int main(){
// const double EPS = 1e-9;
// double a = 1.3, b = 1e8, c = a + b;
// c = c - b;
// printf("%d\n", equal(a, c)); // =>... | [
"expression.operation.binary.remove"
] | 127,076 | 127,077 | u392015442 | cpp |
p02292 | #include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, 1, 0, -1, 1, -1, -1, 1};
const int dy[] = {-1, 0, 1, 0, 1, 1, -1, -1};
const int INF = 1 << 30;
const double EPS = 1e-15;
#define PB push_back
#define mk make_pair
#define fi first
#define se second
#define ll long long
#define reps(i, j, k) for (int i ... | #include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, 1, 0, -1, 1, -1, -1, 1};
const int dy[] = {-1, 0, 1, 0, 1, 1, -1, -1};
const int INF = 1 << 30;
const double EPS = 1e-15;
#define PB push_back
#define mk make_pair
#define fi first
#define se second
#define ll long long
#define reps(i, j, k) for (int i ... | [
"literal.string.change",
"function.return_value.change"
] | 127,078 | 127,079 | u577850777 | cpp |
p02292 | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
pair<double, double> p0, p1, p2;
int n;
cin >> p0.first >> p0.second >> p1.first >> p1.second;
cin >> n;
while (n--) {
cin >> p2.first >> p2.second;
// ??????
double crossProduct = (p1.first - p0.firs... | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
pair<double, double> p0, p1, p2;
int n;
cin >> p0.first >> p0.second >> p1.first >> p1.second;
cin >> n;
while (n--) {
cin >> p2.first >> p2.second;
// ??????
double crossProduct = (p1.first - p0.firs... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 127,082 | 127,083 | u195155547 | cpp |
p02292 | #include <cmath>
#include <cstdio>
#include <cstring>
#include <vector>
#define EPS 1e-10
using namespace std;
struct P {
double x, y;
P(double xx = 0, double yy = 0) {
x = xx;
y = yy;
}
P operator+(P &p) { return P(x + p.x, y + p.y); }
P operator-(P &p) { return P(x - p.x, y - p.y); }
P operator*(... | #include <cmath>
#include <cstdio>
#include <cstring>
#include <vector>
#define EPS 1e-10
using namespace std;
struct P {
double x, y;
P(double xx = 0, double yy = 0) {
x = xx;
y = yy;
}
P operator+(P &p) { return P(x + p.x, y + p.y); }
P operator-(P &p) { return P(x - p.x, y - p.y); }
P operator*(... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 127,084 | 127,085 | u117454239 | cpp |
p02292 | #include <complex>
#include <iostream>
using namespace std;
typedef complex<int> point;
string ccw(point p0, point p1, point p2) {
point temp;
p1 -= p0;
p2 -= p0;
temp = p1;
p1 *= conj(p1);
p2 *= conj(p1);
if (abs(temp) == 0)
return "ON_SEGMENT";
p1 /= abs(temp);
if (p2.imag() > 0)
return "CO... | #include <complex>
#include <iostream>
using namespace std;
typedef complex<int> point;
string ccw(point p0, point p1, point p2) {
point temp;
p1 -= p0;
p2 -= p0;
temp = p1;
p1 *= conj(temp);
p2 *= conj(temp);
if (abs(temp) == 0)
return "ON_SEGMENT";
p1 /= abs(temp);
if (p2.imag() > 0)
return... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 127,086 | 127,087 | u084540620 | cpp |
p02292 | #include <complex>
#include <iostream>
#include <string>
#define x real()
#define y imag()
using namespace std;
typedef complex<double> point;
typedef complex<double> vectol;
double dot(point a, point b) { return a.x * b.x + a.y * b.y; }
double cross(point a, point b) { return a.x * b.y - a.y * b.x; }
string ccw(poi... | #include <complex>
#include <iostream>
#include <string>
#define x real()
#define y imag()
using namespace std;
typedef complex<double> point;
typedef complex<double> vectol;
double dot(point a, point b) { return a.x * b.x + a.y * b.y; }
double cross(point a, point b) { return a.x * b.y - a.y * b.x; }
string ccw(poi... | [
"literal.string.change",
"function.return_value.change"
] | 127,088 | 127,089 | u952951927 | cpp |
p02292 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
class Point {
public:
double x, y;
Point(double x = 0, double y = 0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
class Point {
public:
double x, y;
Point(double x = 0, double y = 0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
... | [
"literal.string.change",
"io.output.change"
] | 127,090 | 127,091 | u338932851 | cpp |
p02292 | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define REP(i, k, n) for (int i = k; i < n; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1 << 30
#define pb push_back
#define mp make_pair
... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define REP(i, k, n) for (int i = k; i < n; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1 << 30
#define pb push_back
#define mp make_pair
... | [
"identifier.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 127,097 | 127,098 | u765197056 | cpp |
p02292 | #include <cmath>
#include <iostream>
using namespace std;
struct vec {
double x, y;
vec operator-(vec b) {
vec &a = *this;
vec c;
c.x = a.x - b.x;
c.y = a.y - b.y;
return c;
}
};
const double eps = 0.0000001;
double inner_product(vec &a, vec &b) { return a.x * b.x + a.y * b.y; }
double out... | #include <cmath>
#include <iostream>
using namespace std;
struct vec {
double x, y;
vec operator-(vec b) {
vec &a = *this;
vec c;
c.x = a.x - b.x;
c.y = a.y - b.y;
return c;
}
};
const double eps = 0.0000001;
double inner_product(vec &a, vec &b) { return a.x * b.x + a.y * b.y; }
double out... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 127,099 | 127,100 | u696230892 | cpp |
p02292 | #include <iostream>
using namespace std;
#include <complex>
#include <cstdio>
typedef double type_n;
typedef complex<type_n> point;
void ccw(const point &a, const point &c, const point &z) {
point w;
w = conj(c) * (z - a);
type_n re = w.real(), im = w.imag();
if (re != 0) {
(re > 0 ? printf("COUNTER_CLOCK... | #include <iostream>
using namespace std;
#include <complex>
#include <cstdio>
typedef double type_n;
typedef complex<type_n> point;
void ccw(const point &a, const point &c, const point &z) {
point w;
w = conj(c) * (z - a);
type_n re = w.real(), im = w.imag();
if (im != 0) {
(im > 0 ? printf("COUNTER_CLOCK... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 127,101 | 127,102 | u986478725 | cpp |
p02292 | #define TEST_MODE 1
#ifndef __VECD__
#define __VECD__
#include <iomanip>
#include <iostream>
#include <numeric>
#include <vector>
#define rep(n) for (int i = 0; i < n; i++)
#define PB push_back
#define VecND VecD<std::vector<double>>
#if TEST_MODE
#define Vec3D _VecD<double, 3>
#define Vec2D _VecD<double, 2>
#endif
#e... | #define TEST_MODE 1
#ifndef __VECD__
#define __VECD__
#include <iomanip>
#include <iostream>
#include <numeric>
#include <vector>
#define rep(n) for (int i = 0; i < n; i++)
#define PB push_back
#define VecND VecD<std::vector<double>>
#if TEST_MODE
#define Vec3D _VecD<double, 3>
#define Vec2D _VecD<double, 2>
#endif
#e... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 127,105 | 127,106 | u024599888 | cpp |
p02292 | #include <algorithm>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
double x1, x2, xp, y1, y2, yp1, yp, naiseki, norm1, norm2, gaiseki;
int q;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
scanf("%d", &q);
for (int i = 0; i < q; i++) {
scanf("%lf %lf", &xp, &yp);
norm1 = sqr... | #include <algorithm>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
double x1, x2, xp, y1, y2, yp1, yp, naiseki, norm1, norm2, gaiseki;
int q;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
scanf("%d", &q);
for (int i = 0; i < q; i++) {
scanf("%lf %lf", &xp, &yp);
norm1 = sqr... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 127,107 | 127,108 | u697145890 | cpp |
p02292 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int x0, y0, x1, y1;
cin >> x0 >> y0 >> x1 >> y1;
int X1 = x1 - x0, Y1 = y1 - y0;
int q;
cin >> q;
while (q--) {
int x2, y2;
cin >> x2 >> y2;
int X2 = x2 - x0, Y2 = y2 - y0;
lo... | #include <cmath>
#include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int x0, y0, x1, y1;
cin >> x0 >> y0 >> x1 >> y1;
int X1 = x1 - x0, Y1 = y1 - y0;
int q;
cin >> q;
while (q--) {
int x2, y2;
cin >> x2 >> y2;
int X2 = x2 - x0, Y2 = y2 - y0;
lo... | [
"identifier.change",
"expression.operation.binary.change"
] | 127,109 | 127,110 | u929568713 | cpp |
p02292 | #include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
// CCW??¨///////////////////////////////////
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONELINE_BACK = 2;
static const... | #include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
// CCW??¨///////////////////////////////////
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONELINE_BACK = 2;
static const... | [
"literal.string.change",
"io.output.change"
] | 127,115 | 127,116 | u962041986 | cpp |
p02292 | #include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
// CCW??¨///////////////////////////////////
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONELINE_BACK = 2;
static const... | #include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
// CCW??¨///////////////////////////////////
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONELINE_BACK = 2;
static const... | [
"literal.string.change",
"io.output.change"
] | 127,118 | 127,116 | u962041986 | cpp |
p02292 | #include <complex>
#include <cstdio>
#include <iostream>
using namespace std;
typedef complex<int> point;
double dot(point a, point b) {
// return (a*conj(b)).real();
return a.real() * b.real() + a.imag() * b.imag();
}
double cross(point a, point b) {
// return (a*conj(b)).imag();
return a.real() * b.imag() ... | #include <complex>
#include <cstdio>
#include <iostream>
using namespace std;
typedef complex<long long> point;
long double dot(point a, point b) {
// return (a*conj(b)).real();
return a.real() * b.real() + a.imag() * b.imag();
}
long double cross(point a, point b) {
// return (a*conj(b)).imag();
return a.re... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 127,119 | 127,120 | u496999590 | cpp |
p02292 | #include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef complex<double> V;
typedef vector<P> vecP;
typedef pair<P, P> L;
typedef pair<P, P> S;
typedef pair<P, double> C;
const double eps = 1e-8;
const double PI = acos(-1);
const double PI2 = PI * 2.0;
namespace std {
bool operator<(const P &a,... | #include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef complex<double> V;
typedef vector<P> vecP;
typedef pair<P, P> L;
typedef pair<P, P> S;
typedef pair<P, double> C;
const double eps = 1e-8;
const double PI = acos(-1);
const double PI2 = PI * 2.0;
namespace std {
bool operator<(const P &a,... | [
"expression.operation.unary.arithmetic.remove",
"control_flow.branch.if.condition.change"
] | 127,121 | 127,122 | u173012975 | cpp |
p02292 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
typedef long long int ll;
using namespace std;
const int MAX = 5000 + 10;
const double eps = 1e-9;
const double PI = acos(-1.0);
int sgn(do... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
typedef long long int ll;
using namespace std;
const int MAX = 5000 + 10;
const double eps = 1e-9;
const double PI = acos(-1.0);
int sgn(do... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 127,123 | 127,124 | u763287360 | cpp |
p02292 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#define ESP (1e-10)
using namespace std;
typedef struct Point {
double x;
double y;
Point() {}
Point(double x, double y) : x(x), y(y) {}
Point operator+(Point &p) { return Point(x + p.x, y + p.y); }
Point operator-(Point &p) {... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#define ESP (1e-10)
using namespace std;
typedef struct Point {
double x;
double y;
Point() {}
Point(double x, double y) : x(x), y(y) {}
Point operator+(Point &p) { return Point(x + p.x, y + p.y); }
Point operator-(Point &p) {... | [
"expression.operation.unary.arithmetic.remove",
"control_flow.branch.if.condition.change"
] | 127,125 | 127,126 | u106214670 | cpp |
p02292 | ///
// File: cgl_1_c.cpp
// Author: ymiyamoto
//
// Created on Mon Oct 23 00:28:22 2017
//
#include <cmath>
#include <cstdint>
#include <iomanip>
#include <iostream>
using namespace std;
struct vector_t {
double x;
double y;
vector_t(double a, double b) : x(a), y(b) {}
double norm2() { return x * x + y * y... | ///
// File: cgl_1_c.cpp
// Author: ymiyamoto
//
// Created on Mon Oct 23 00:28:22 2017
//
#include <cmath>
#include <cstdint>
#include <iomanip>
#include <iostream>
using namespace std;
struct vector_t {
double x;
double y;
vector_t(double a, double b) : x(a), y(b) {}
double norm2() { return x * x + y * y... | [
"expression.operation.unary.add",
"control_flow.branch.if.condition.change"
] | 127,127 | 127,128 | u827214117 | cpp |
p02292 | #include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const double PI = acos(-1.0);
int sign(double x) { //???????????°???????°???????????¢?
return abs(x) < EPS ? 0 : x < 0 ? -1 : 1;
}
struct Point { //????????????
double x, y;
Point(double x = 0.0, double y = 0.0) : x(x), y(y) {}
Point ope... | #include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const double PI = acos(-1.0);
int sign(double x) { //???????????°???????°???????????¢?
return abs(x) < EPS ? 0 : x < 0 ? -1 : 1;
}
struct Point { //????????????
double x, y;
Point(double x = 0.0, double y = 0.0) : x(x), y(y) {}
Point ope... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 127,129 | 127,130 | u186303402 | cpp |
p02292 | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
... | [
"function.return_value.change",
"expression.operation.binary.change",
"literal.string.change",
"io.output.change"
] | 127,131 | 127,132 | u974101748 | cpp |
p02292 | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
... | [
"literal.string.change",
"io.output.change"
] | 127,133 | 127,132 | u974101748 | cpp |
p02292 | #include <array>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
const double EPSILON = 1e-10;
inline bool equals(double a, double b) { return std::fabs(a - b) < EPSILON; }
struct Point {
double x;
double y;
bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; ... | #include <array>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
const double EPSILON = 1e-10;
inline bool equals(double a, double b) { return std::fabs(a - b) < EPSILON; }
struct Point {
double x;
double y;
bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; ... | [
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 127,137 | 127,138 | u957470671 | cpp |
p02292 | #include <cmath>
#include <iostream>
#include <string>
using namespace std;
int x_0, y_0, x_1, y_1;
int q;
int x, y;
int choice();
int gaiseki(int, int, int, int);
int naiseki(int, int, int, int);
double norm(int, int);
int main() {
cin >> x_0 >> y_0 >> x_1 >> y_1;
cin >> q;
string s[] = {"COUNTER_CLOCKWISE", ... | #include <cmath>
#include <iostream>
#include <string>
using namespace std;
int x_0, y_0, x_1, y_1;
int q;
int x, y;
int choice();
int gaiseki(int, int, int, int);
int naiseki(int, int, int, int);
double norm(int, int);
int main() {
cin >> x_0 >> y_0 >> x_1 >> y_1;
cin >> q;
string s[] = {"COUNTER_CLOCKWISE", ... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 127,139 | 127,140 | u051103505 | cpp |
p02292 | #include <bits/stdc++.h>
using namespace std;
const int SIZE = 210;
const double eps = 1e-10;
typedef complex<double> P;
typedef double P_type;
typedef complex<P_type> P;
const P_type P_eps = 1e-8; //整数の時はゼロ
namespace std {
template <class T> bool operator<(const complex<T> &a, const complex<T> &b) {
return a.re... | #include <bits/stdc++.h>
using namespace std;
const int SIZE = 210;
const double eps = 1e-10;
typedef complex<double> P;
typedef double P_type;
typedef complex<P_type> P;
const P_type P_eps = 1e-8; //整数の時はゼロ
namespace std {
template <class T> bool operator<(const complex<T> &a, const complex<T> &b) {
return a.re... | [
"expression.operation.unary.add",
"control_flow.branch.if.condition.change"
] | 127,143 | 127,144 | u414351000 | cpp |
p02292 | #include <stdio.h>
int main(void) {
int x1, y1, x2, y2, xp, yp;
scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
x2 -= x1, y2 -= y1;
int q, i;
scanf("%d", &q);
for (i = 0; i < q; ++i) {
scanf("%d%d", &xp, &yp);
xp -= x1, yp -= y1;
int op = xp * y2 - yp * x2;
if (op > 0)
printf("CLOCKWISE\n");
... | #include <stdio.h>
int main(void) {
int x1, y1, x2, y2, xp, yp;
scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
x2 -= x1, y2 -= y1;
int q, i;
scanf("%d", &q);
for (i = 0; i < q; ++i) {
scanf("%d%d", &xp, &yp);
xp -= x1, yp -= y1;
int op = xp * y2 - yp * x2;
if (op > 0)
printf("CLOCKWISE\n");
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 127,145 | 127,146 | u428870975 | cpp |
p02292 | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs(a - b) < EPS)
class Point {
public:
double x, y;
Point(double x_ = 0, double y_ = 0) {
x = x_;
y = y_;
}
Point operator+(Point p) { return Point(x + p.x, y + p.y); };
Point... | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs(a - b) < EPS)
class Point {
public:
double x, y;
Point(double x_ = 0, double y_ = 0) {
x = x_;
y = y_;
}
Point operator+(Point p) { return Point(x + p.x, y + p.y); };
Point... | [
"io.output.newline.add"
] | 127,147 | 127,148 | u173597612 | cpp |
p02291 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> pt;
#define X real()
#define Y imag()
void pin(pt &p) {
ld x, y;
cin >> x >> y;
p = {x, y};
}
ostream &operator<<(ostream &os, pt p) {
return os << p.X << " " << p.Y << endl;
}
ld dot(pt p, pt q) { re... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> pt;
#define X real()
#define Y imag()
void pin(pt &p) {
ld x, y;
cin >> x >> y;
p = {x, y};
}
ostream &operator<<(ostream &os, pt p) {
return os << p.X << " " << p.Y << endl;
}
ld dot(pt p, pt q) { re... | [
"call.add",
"call.arguments.change",
"function.return_value.change"
] | 127,757 | 127,758 | u504373005 | cpp |
p02291 | #include <complex>
#include <iomanip>
#include <iostream>
using namespace std;
typedef complex<double> Point;
Point reflection(Point a, Point b) { return conj(b / a) * a; }
int main() {
double x, y;
cin >> x >> y;
complex<double> p1(x, y);
cin >> x >> y;
complex<double> p2(x, y);
int q;
cin >> q;
fo... | #include <complex>
#include <iomanip>
#include <iostream>
using namespace std;
typedef complex<double> Point;
Point reflection(Point a, Point b) { return conj(b / a) * a; }
int main() {
double x, y;
cin >> x >> y;
complex<double> p1(x, y);
cin >> x >> y;
complex<double> p2(x, y);
int q;
cin >> q;
fo... | [
"literal.number.change",
"io.output.change"
] | 127,767 | 127,768 | u823048060 | cpp |
p02291 | #ifndef ___Class_Point
#define ___Class_Point
class Point {
private:
double x_;
double y_;
public:
Point() : x_(0), y_(0) {}
explicit Point(double x, double y) : x_(x), y_(y) {}
explicit Point(double x1, double y1, double x2, double y2)
: x_(x2 - x1), y_(y2 - y1) {}
double x() const { return x_; ... | #ifndef ___Class_Point
#define ___Class_Point
class Point {
private:
double x_;
double y_;
public:
Point() : x_(0), y_(0) {}
explicit Point(double x, double y) : x_(x), y_(y) {}
explicit Point(double x1, double y1, double x2, double y2)
: x_(x2 - x1), y_(y2 - y1) {}
double x() const { return x_; ... | [
"expression.operation.binary.remove"
] | 127,769 | 127,770 | u823513038 | cpp |
p02291 | #include <iomanip>
#include <iostream>
#include <cmath>
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
class Point {
public:
double x, y;
Point(double x = 0, double y = 0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
Point operator-(Poi... | #include <iomanip>
#include <iostream>
#include <cmath>
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
class Point {
public:
double x, y;
Point(double x = 0, double y = 0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
Point operator-(Poi... | [
"identifier.change",
"call.function.change"
] | 127,771 | 127,772 | u554150588 | cpp |
p02291 | #include <fstream>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
template <class T> class _Point {
public:
T x;
T y;
_Point() {}
_Point(T _x, T _y) : x(_x), y(_y) {}
_Point(const _Point &v) : x(v.x), y(v.y) {}
const _Point operator+(const _Point &v) { ret... | #include <fstream>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
template <class T> class _Point {
public:
T x;
T y;
_Point() {}
_Point(T _x, T _y) : x(_x), y(_y) {}
_Point(const _Point &v) : x(v.x), y(v.y) {}
const _Point operator+(const _Point &v) { ret... | [
"identifier.change",
"expression.operation.binary.change"
] | 127,773 | 127,774 | u084809388 | cpp |
p02291 | #include <cstdlib>
#include <iostream>
#include <list>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
class c_main {
private:
public:
c_main();
void f_input();
};
c_main::c_main() {}
void c_main::f_input() {
... | #include <cstdlib>
#include <iostream>
#include <list>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
class c_main {
private:
public:
c_main();
void f_input();
};
c_main::c_main() {}
void c_main::f_input() {
... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 127,775 | 127,776 | u851545257 | cpp |
p02291 | #include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef complex<double> V;
typedef vector<P> vecP;
typedef pair<P, P> L;
typedef pair<P, P> S;
typedef pair<P, double> C;
const double eps = 1e-8;
const double PI = acos(-1);
const double PI2 = PI * 2.0;
namespace std {
bool operator<(const P &a,... | #include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef complex<double> V;
typedef vector<P> vecP;
typedef pair<P, P> L;
typedef pair<P, P> S;
typedef pair<P, double> C;
const double eps = 1e-8;
const double PI = acos(-1);
const double PI2 = PI * 2.0;
namespace std {
bool operator<(const P &a,... | [
"identifier.change",
"call.function.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 127,777 | 127,778 | u173012975 | cpp |
p02291 | #include <complex>
#include <cstdio>
#include <iostream>
#include <utility>
using namespace std;
typedef complex<double> P;
typedef pair<P, P> L;
#define X real()
#define Y imag()
double dot(P a, P b) { return (a.X * b.X + a.Y * b.Y); }
P projection(P a, P b) {
// a???????????????b??????????????????????????£?°???±?... | #include <complex>
#include <cstdio>
#include <iostream>
#include <utility>
using namespace std;
typedef complex<double> P;
typedef pair<P, P> L;
#define X real()
#define Y imag()
double dot(P a, P b) { return (a.X * b.X + a.Y * b.Y); }
P projection(P a, P b) {
// a???????????????b??????????????????????????£?°???±?... | [
"expression.operation.binary.add"
] | 127,779 | 127,780 | u936898312 | cpp |
p02291 | #include <bits/stdc++.h>
#ifndef LOCAL_
#define fprintf \
if (false) \
fprintf
#endif // LOCAL_
// #define dump() fprintf(stderr, "#%s.%d\n", __func__, __LINE__);
#define dumpl(x1) ... | #include <bits/stdc++.h>
#ifndef LOCAL_
#define fprintf \
if (false) \
fprintf
#endif // LOCAL_
// #define dump() fprintf(stderr, "#%s.%d\n", __func__, __LINE__);
#define dumpl(x1) ... | [
"expression.operation.binary.add"
] | 127,781 | 127,782 | u355552770 | cpp |
p02291 | #include <bits/stdc++.h>
using namespace std;
struct Point {
double x, y;
Point() {}
Point(double x, double y) : x(x), y(y) {}
void input() { scanf("%lf %lf", &x, &y); }
void output() { printf("%.10f, %.10f\n", x, y); }
double abs() { return (sqrt(norm())); }
double norm() { return (x * x + y * y); }
... | #include <bits/stdc++.h>
using namespace std;
struct Point {
double x, y;
Point() {}
Point(double x, double y) : x(x), y(y) {}
void input() { scanf("%lf %lf", &x, &y); }
void output() { printf("%.10f %.10f\n", x, y); }
double abs() { return (sqrt(norm())); }
double norm() { return (x * x + y * y); }
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 127,783 | 127,784 | u748663083 | cpp |
p02291 | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
// 2次元ベクトルクラス
class Vector {
public:
double x, y;
Vector() {
x = 0.0;
y = 0.0;
}
Vector(double nx, double ny) {
x = nx;
y = ny;
}
void set(double nx, double ny) {
x = nx;
y = ny;
}
... | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
// 2次元ベクトルクラス
class Vector {
public:
double x, y;
Vector() {
x = 0.0;
y = 0.0;
}
Vector(double nx, double ny) {
x = nx;
y = ny;
}
void set(double nx, double ny) {
x = nx;
y = ny;
}
... | [
"call.arguments.change",
"expression.operation.binary.change",
"call.arguments.add"
] | 127,785 | 127,786 | u283306548 | cpp |
p02292 | #include <complex>
#include <iostream>
#include <string>
#include <vector>
enum INDICES {
COUNTER_CLOCKWISE = 0,
CLOCKWISE,
ONLINE_BACK,
ON_SEGMENT,
ONLINE_FRONT
};
const std::vector<std::string> strLst = {"COUNTER_CLOCKWISE", "CLOCKWISE",
"ONLINE_BACK", "ON_SEGMENT"... | #include <complex>
#include <iostream>
#include <string>
#include <vector>
enum INDICES {
COUNTER_CLOCKWISE = 0,
CLOCKWISE,
ONLINE_BACK,
ON_SEGMENT,
ONLINE_FRONT
};
const std::vector<std::string> strLst = {"COUNTER_CLOCKWISE", "CLOCKWISE",
"ONLINE_BACK", "ON_SEGMENT"... | [
"literal.number.change",
"variable_declaration.value.change"
] | 127,795 | 127,794 | u178205606 | cpp |
p02293 | #include <cmath>
#include <iostream>
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b) < EPS))
class Point {
public:
double x, y;
Point(double x = 0, double y = 0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
Point operator-(Point p) { return Point(x - p.x, y - p.y); }... | #include <cmath>
#include <iostream>
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
class Point {
public:
double x, y;
Point(double x = 0, double y = 0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
Point operator-(Point p) { return Point(x - p.x, y - p.y); }... | [] | 127,820 | 127,821 | u071753419 | cpp |
p02293 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define EPS (1e-10)
struct Point {
Point(double _x = 0, doubl... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define EPS (1e-10)
struct Point {
Point(double _x = 0, doubl... | [
"control_flow.branch.if.condition.change"
] | 127,822 | 127,823 | u222195708 | cpp |
p02293 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define EPS (1e-10)
struct Point {
Point(double _x = 0, doubl... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define EPS (1e-10)
struct Point {
Point(double _x = 0, doubl... | [
"control_flow.branch.if.condition.change"
] | 127,824 | 127,823 | u222195708 | cpp |
p02293 | #include <bits/stdc++.h>
using namespace std;
#define int lint
typedef long long lint;
typedef pair<int, int> P;
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
const double EPS = (double)1e-10;
#define equals(a, b) (fabs((a) - (b)) < EPS)
struct Accelerate_Cin {
Accelerate_Cin() {
cin.tie(0);
ios::sy... | #include <bits/stdc++.h>
using namespace std;
#define int lint
typedef long long lint;
typedef pair<int, int> P;
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
const double EPS = (double)1e-10;
#define equals(a, b) (fabs((a) - (b)) < EPS)
struct Accelerate_Cin {
Accelerate_Cin() {
cin.tie(0);
ios::sy... | [
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 127,825 | 127,826 | u891865669 | cpp |
p02293 | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define fs first
#define sc second
#define pb push_back
using namespace std;
typedef double D;
typedef complex<D> P;
typedef pair<P, P> L; // fs->sc
typedef vector... | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define fs first
#define sc second
#define pb push_back
using namespace std;
typedef double D;
typedef complex<D> P;
typedef pair<P, P> L; // fs->sc
typedef vector... | [
"call.arguments.change",
"control_flow.branch.if.condition.change",
"call.arguments.add"
] | 127,832 | 127,833 | u664278326 | cpp |
p02293 | #include <bits/stdc++.h>
/*
#include<algolithm>
#include<array>
#include<vector>
*/
using namespace std;
typedef double Real;
constexpr Real EPS = 1e-8;
int sign(Real d) {
if (d > EPS) {
return 1;
}
if (d < -EPS) {
return -1;
}
return 0;
}
struct Point {
Real x, y;
Point(Real x_ = 0, Real y_ =... | #include <bits/stdc++.h>
/*
#include<algolithm>
#include<array>
#include<vector>
*/
using namespace std;
typedef double Real;
constexpr Real EPS = 1e-8;
int sign(Real d) {
if (d > EPS) {
return 1;
}
if (d < -EPS) {
return -1;
}
return 0;
}
struct Point {
Real x, y;
Point(Real x_ = 0, Real y_ =... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 127,834 | 127,835 | u361804125 | cpp |
p02293 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b) < EPS))
class Point {
public:
double x, y;
Point(double x = 0, double y = 0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
Point operator-(Point... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
class Point {
public:
double x, y;
Point(double x = 0, double y = 0) : x(x), y(y) {}
Point operator+(Point p) { return Point(x + p.x, y + p.y); }
Point operator-(Point... | [
"identifier.change",
"call.function.change",
"function.return_value.change"
] | 127,838 | 127,839 | u574853191 | cpp |
p02293 | #include <complex>
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long lli;
typedef complex<lli> point;
lli dot(point a, point b) { return (a * conj(b)).real(); }
lli cross(point a, point b) { return (a * conj(b)).imag(); }
int main(void) {
double x, y;
int q;
cin >> q;
while (q--) ... | #include <complex>
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long lli;
typedef complex<lli> point;
lli dot(point a, point b) { return (a * conj(b)).real(); }
lli cross(point a, point b) { return (a * conj(b)).imag(); }
int main(void) {
lli x, y;
int q;
cin >> q;
while (q--) {
... | [
"variable_declaration.type.change"
] | 127,842 | 127,843 | u496999590 | cpp |
p02293 | #include <bits/stdc++.h>
using namespace std;
struct cww {
cww() {
ios::sync_with_stdio(false);
cin.tie(0);
}
} star;
#define P(x) cout << (x) << "\n"
#define p(x) cout << (x)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define vv(type, c, m, n, i) vector<vector<type>> c(m... | #include <bits/stdc++.h>
using namespace std;
struct cww {
cww() {
ios::sync_with_stdio(false);
cin.tie(0);
}
} star;
#define P(x) cout << (x) << "\n"
#define p(x) cout << (x)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define vv(type, c, m, n, i) vector<vector<type>> c(m... | [
"call.add",
"call.arguments.change",
"function.return_value.change"
] | 127,846 | 127,847 | u426534722 | cpp |
p02293 | #include <bits/stdc++.h>
using namespace std;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) begin(r), end(r)
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout << #x << ": " << x << endl
#define fcout(n) cout << fixed << setprecision((... | #include <bits/stdc++.h>
using namespace std;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) begin(r), end(r)
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout << #x << ": " << x << endl
#define fcout(n) cout << fixed << setprecision((... | [
"control_flow.branch.if.condition.change",
"call.add"
] | 127,848 | 127,849 | u073628131 | cpp |
p02290 | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define fs first
#define sc second
#define pb push_back
using namespace std;
typedef double D;
typedef complex<D> P;
typedef pair<P, P> L; // fs->sc
typedef vector... | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define fs first
#define sc second
#define pb push_back
using namespace std;
typedef double D;
typedef complex<D> P;
typedef pair<P, P> L; // fs->sc
typedef vector... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 127,884 | 127,885 | u664278326 | cpp |
p02290 | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define fs first
#define sc second
#define pb push_back
using namespace std;
typedef double D;
typedef complex<D> P;
typedef pair<P, P> L; // fs->sc
typedef vector... | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define fs first
#define sc second
#define pb push_back
using namespace std;
typedef double D;
typedef complex<D> P;
typedef pair<P, P> L; // fs->sc
typedef vector... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 127,886 | 127,885 | u664278326 | cpp |
p02290 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ctype.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ctype.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#includ... | [] | 127,893 | 127,894 | u021233305 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.