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 |
|---|---|---|---|---|---|---|---|
p02243 | #include <iostream>
using namespace std;
#include <cstdio>
#include <queue>
#include <utility>
#include <vector>
typedef vector<pair<int, int>> adj;
struct current_cost {
int index, cost;
bool operator<(const current_cost &cur) const { return cost < cur.cost; }
};
current_cost init(int i, int c) {
current_cost... | #include <iostream>
using namespace std;
#include <cstdio>
#include <queue>
#include <utility>
#include <vector>
typedef vector<pair<int, int>> adj;
struct current_cost {
int index, cost;
bool operator<(const current_cost &cur) const { return cost > cur.cost; }
};
current_cost init(int i, int c) {
current_cost... | [
"misc.opposites",
"expression.operator.compare.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 95,699 | 95,700 | u986478725 | cpp |
p02243 | ///
// File: alds1_12_c.cpp
// Author: ymiyamoto
//
// Created on Wed Oct 18 22:36:29 2017
//
#include <cstdint>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define SIZE 10000
struct route_t {
uint32_t node;
int64_t weight;
bool operator<(const route_t &r) const { return weig... | ///
// File: alds1_12_c.cpp
// Author: ymiyamoto
//
// Created on Wed Oct 18 22:36:29 2017
//
#include <cstdint>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define SIZE 10000
struct route_t {
uint32_t node;
int64_t weight;
bool operator<(const route_t &r) const { return weig... | [
"identifier.change"
] | 95,733 | 95,732 | u827214117 | cpp |
p02243 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 100000
#define EMAX 500000
#define INFTY 2000000000
typedef struct {
int pre, next, x;
} Cost;
int n, d[MAX];
Cost E[EMAX];
void jr(int);
void jr(int cou) {
int i, tmp;
for (i = 0; i < n; i++) {
d[i] = INFTY;
}
d[0] = 0;
tmp = 1;... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 100000
#define EMAX 500000
#define INFTY 2000000000
typedef struct {
int pre, next, x;
} Cost;
int n, d[MAX];
Cost E[EMAX];
void jr(int);
void jr(int cou) {
int i, tmp;
for (i = 0; i < n; i++) {
d[i] = INFTY;
}
d[0] = 0;
tmp = 1;
... | [
"variable_declaration.remove",
"literal.string.change",
"call.arguments.change"
] | 95,734 | 95,735 | u896148161 | cpp |
p02243 | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>> ... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>> ... | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 95,736 | 95,737 | u714252022 | cpp |
p02243 | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
int n;
vector<pair<int, int>> G[MAX];
void dij() {
priority_queue<pair<int, int>> PQ;
int color[MAX], d[MAX], i, j, u, v;
for (i = 0; i < n; i++) {
d[i] = INFTY;
... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
int n;
vector<pair<int, int>> G[MAX];
void dij() {
priority_queue<pair<int, int>> PQ;
int color[MAX], d[MAX], i, j, u, v;
for (i = 0; i < n; i++) {
d[i] = INFTY;
... | [
"control_flow.branch.if.condition.change"
] | 95,738 | 95,739 | u709938732 | cpp |
p02243 | #include <iostream>
#include <queue>
using namespace std;
#define INFTY (1 << 30)
//???????????????
enum Color {
WHITE,
GRAY,
BLACK,
};
// SSSP
void Dijkstra(vector<pair<int, int>> *v_w_m, int verNum) {
//???????¨????
priority_queue<pair<int, int>> pQ;
int distance[10000];
Color color[10000];
int pa... | #include <iostream>
#include <queue>
using namespace std;
#define INFTY (1 << 30)
//???????????????
enum Color {
WHITE,
GRAY,
BLACK,
};
// SSSP
void Dijkstra(vector<pair<int, int>> *v_w_m, int verNum) {
//???????¨????
priority_queue<pair<int, int>> pQ;
int distance[10000];
Color color[10000];
int pa... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 95,744 | 95,745 | u253923767 | cpp |
p02243 | #include <iostream>
#include <queue>
using namespace std;
#define INFTY (1 << 30)
//???????????????
enum Color {
WHITE,
GRAY,
BLACK,
};
// SSSP
void Dijkstra(vector<pair<int, int>> *v_w_m, int verNum) {
//???????¨????
priority_queue<pair<int, int>> pQ;
int distance[10000];
Color color[10000];
int pa... | #include <iostream>
#include <queue>
using namespace std;
#define INFTY (1 << 30)
//???????????????
enum Color {
WHITE,
GRAY,
BLACK,
};
// SSSP
void Dijkstra(vector<pair<int, int>> *v_w_m, int verNum) {
//???????¨????
priority_queue<pair<int, int>> pQ;
int distance[10000];
Color color[10000];
int pa... | [] | 95,746 | 95,745 | u253923767 | cpp |
p02243 |
#include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>... | [
"literal.number.change",
"expression.operation.binary.change",
"identifier.change",
"control_flow.loop.for.condition.change"
] | 95,749 | 95,750 | u001068672 | cpp |
p02243 | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,751 | 95,750 | u001068672 | cpp |
p02243 | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>>... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>>... | [
"variable_declaration.type.widen.change",
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 95,758 | 95,759 | u043039307 | cpp |
p02243 | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>>... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>>... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 95,758 | 95,762 | u043039307 | cpp |
p02243 | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>>... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 20);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX];
void dijkstra() {
priority_queue<pair<int, int>>... | [
"variable_declaration.type.narrow.change",
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 95,763 | 95,762 | u043039307 | cpp |
p02243 | #include <cstdio>
#include <map>
#include <vector>
using namespace std;
int main() {
int n = 0, N, i, j, k, c;
scanf("%d", &N);
vector<map<int, int>> dist(N);
vector<bool> used(N);
vector<int> cost(N);
for (; n < N; n++) {
cost[n] = 9999999;
for (scanf("%d%d", &i, &k); k--; dist[j][i] = c)
sca... | #include <cstdio>
#include <map>
#include <vector>
using namespace std;
int main() {
int n = 0, N, i, j, k, c;
scanf("%d", &N);
vector<map<int, int>> dist(N);
vector<bool> used(N);
vector<int> cost(N);
for (; n < N; n++) {
cost[n] = 9999999;
for (scanf("%d%d", &i, &k); k--; dist[i][j] = c)
sca... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,778 | 95,779 | u300645821 | cpp |
p02242 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
const ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
const ... | [
"io.output.change"
] | 95,794 | 95,795 | u902731901 | cpp |
p02242 | // ALDS1_12B
#include <iostream>
using namespace std;
static const int MAX = 100;
static const int INF = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
int dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = ... | // ALDS1_12B
#include <iostream>
using namespace std;
static const int MAX = 100;
static const int INF = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
int dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = ... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 95,798 | 95,799 | u121040546 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INF = 1 << 21;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, A[MAX][MAX];
void dijkstra() {
int color[MAX], mincost, k, p[MAX], d[MAX];
for (int i = 0; i > n; i++) {
color[i] = WH... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INF = 1 << 21;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, A[MAX][MAX];
void dijkstra() {
int color[MAX], mincost, k, p[MAX], d[MAX];
for (int i = 0; i < n; i++) {
color[i] = WH... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,800 | 95,801 | u600138564 | cpp |
p02242 | #include <iostream>
using namespace std;
#define MAX 100
#define WHITE 0
#define GRAY 1
#define BLACK 2
#define INFTY 99999999
int color[MAX];
int M[MAX][MAX];
int d[MAX];
int p[MAX];
int n;
int dijkstra(int s) {
int mincost;
int u;
for (int i = 0; i < n; i++) {
d[i] = INFTY;
p[i] = -1;
}
d[s] =... | #include <iostream>
using namespace std;
#define MAX 100
#define WHITE 0
#define GRAY 1
#define BLACK 2
#define INFTY 99999999
int color[MAX];
int M[MAX][MAX];
int d[MAX];
int p[MAX];
int n;
int dijkstra(int s) {
int mincost;
int u;
for (int i = 0; i < n; i++) {
d[i] = INFTY;
p[i] = -1;
}
d[s] =... | [
"io.output.change"
] | 95,808 | 95,809 | u699373030 | cpp |
p02242 | #include <iostream>
#include <queue>
#include <utility>
#include <vector>
struct Edge {
int from, to, weight;
Edge(int from, int to, int weight) : from(from), to(to), weight(weight) {}
};
struct Node {
std::vector<Edge> ongoingEdges;
void addEdge(Edge edge) { ongoingEdges.push_back(edge); }
};
class Graph {
... | #include <iostream>
#include <queue>
#include <utility>
#include <vector>
struct Edge {
int from, to, weight;
Edge(int from, int to, int weight) : from(from), to(to), weight(weight) {}
};
struct Node {
std::vector<Edge> ongoingEdges;
void addEdge(Edge edge) { ongoingEdges.push_back(edge); }
};
class Graph {
... | [
"expression.operation.binary.remove"
] | 95,810 | 95,811 | u219436378 | cpp |
p02242 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
struct Edge {
ll t, w;
};
struct State {
ll v;
ll score;
bool operator<(const State &tgt) const { return score > tgt.score; }
};
vector<ll> dijkstra(vector<vector<Edge>> &G, const int start) {
const ll V = G.size();
vector<ll> res(V, I... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
struct Edge {
ll t, w;
};
struct State {
ll v;
ll score;
bool operator<(const State &tgt) const { return score > tgt.score; }
};
vector<ll> dijkstra(vector<vector<Edge>> &G, const int start) {
const ll V = G.size();
vector<ll> res(V, I... | [
"identifier.change",
"io.output.change"
] | 95,812 | 95,813 | u630224637 | cpp |
p02242 | #include <bits/stdc++.h>
using namespace std;
static const int M = 10000;
static const int INF = (1 << 20);
int n;
vector<pair<int, int>> a[M];
void dijkstra() {
priority_queue<pair<int, int>> Q;
int col[M];
int d[M];
for (int i = 0; i < n; i++) {
col[i] = 0;
d[i] = INF;
}
d[0] = 0;
col[0] = 1;
... | #include <bits/stdc++.h>
using namespace std;
static const int M = 10000;
static const int INF = (1 << 20);
int n;
vector<pair<int, int>> a[M];
void dijkstra() {
priority_queue<pair<int, int>> Q;
int col[M];
int d[M];
for (int i = 0; i < n; i++) {
col[i] = 0;
d[i] = INF;
}
d[0] = 0;
col[0] = 1;
... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 95,816 | 95,817 | u962041986 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int color[MAX], d[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int color[MAX], d[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo",
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 95,818 | 95,819 | u722526744 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int color[MAX], d[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int color[MAX], d[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 95,821 | 95,819 | u722526744 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dik() {
int min;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
color... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dik() {
int min;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
color... | [
"control_flow.branch.if.condition.change"
] | 95,826 | 95,827 | u254394411 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,828 | 95,829 | u276118843 | cpp |
p02242 | //#include "stdc++.h"
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <vector>
//#include "my_gettime.hpp"
//#include "my_random.hpp"
//#include "my_util.hpp"
// using namespace std;
struct Edge {
Edge(int f, int s, int w) {
first = f;
second = s;
w... | //#include "stdc++.h"
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <vector>
//#include "my_gettime.hpp"
//#include "my_random.hpp"
//#include "my_util.hpp"
// using namespace std;
struct Edge {
Edge(int f, int s, int w) {
first = f;
second = s;
w... | [
"literal.number.change",
"call.arguments.change",
"io.output.change"
] | 95,832 | 95,833 | u190599201 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int min;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int min;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | [
"identifier.change",
"expression.operation.binary.change",
"control_flow.loop.for.condition.change",
"assignment.variable.change",
"variable_access.subscript.index.change"
] | 95,838 | 95,839 | u054330093 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,840 | 95,841 | u117141367 | cpp |
p02242 | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
#define INF 1000000000
int main() {
long long int min, n, u, k, v, c, dist[100][100], s, cost[100], t[100], l = 1;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
dist[i][j] = INF;
cost[i] = INF;... | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
#define INF 1 << 21
int main() {
long long int min, n, u, k, v, c, dist[100][100], s, cost[100], t[100], l = 1;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
dist[i][j] = INF;
cost[i] = INF;
... | [
"preprocessor.define.value.change",
"literal.integer.change",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,854 | 95,855 | u192534471 | cpp |
p02242 | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
#define INF 1 << 21
int main() {
long long int min, n, u, k, v, c, dist[100][100], s, cost[100], t[100], l = 1;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
dist[i][j] = INF;
cost[i] = INF;
... | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
#define INF 1 << 21
int main() {
long long int min, n, u, k, v, c, dist[100][100], s, cost[100], t[100], l = 1;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
dist[i][j] = INF;
cost[i] = INF;
... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,857 | 95,855 | u192534471 | cpp |
p02242 | #include <algorithm>
#include <iostream>
#include <vector>
#define MAX_V 100
#define INF 1e9
using namespace std;
int cost[MAX_V][MAX_V];
int d[MAX_V];
bool used[MAX_V];
int V;
void dijkstra(int s) {
for (int i = 0; i < V; i++) {
d[i] = INF;
used[i] = false;
}
d[s] = 0;
while (true) {
int v = -1;
... | #include <algorithm>
#include <iostream>
#include <vector>
#define MAX_V 100
#define INF 1e9
using namespace std;
int cost[MAX_V][MAX_V];
int d[MAX_V];
bool used[MAX_V];
int V;
void dijkstra(int s) {
for (int i = 0; i < V; i++) {
d[i] = INF;
used[i] = false;
}
d[s] = 0;
while (true) {
int v = -1;
... | [
"control_flow.loop.for.condition.change"
] | 95,861 | 95,860 | u068682075 | cpp |
p02242 | #include <algorithm>
#include <iostream>
#include <vector>
#define MAX_V 100
#define INF 1e9
using namespace std;
int cost[MAX_V][MAX_V];
int d[MAX_V];
bool used[MAX_V];
int V;
void dijkstra(int s) {
for (int i = 0; i < V; i++) {
d[i] = INF;
used[i] = false;
}
d[s] = 0;
while (true) {
int v = -1;
... | #include <algorithm>
#include <iostream>
#include <vector>
#define MAX_V 100
#define INF 1e9
using namespace std;
int cost[MAX_V][MAX_V];
int d[MAX_V];
bool used[MAX_V];
int V;
void dijkstra(int s) {
for (int i = 0; i < V; i++) {
d[i] = INF;
used[i] = false;
}
d[s] = 0;
while (true) {
int v = -1;
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,871 | 95,872 | u068682075 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int white = 01;
static const int gray = 1;
static const int black = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int white = 0;
static const int gray = 1;
static const int black = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | [
"literal.number.change",
"variable_declaration.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 95,881 | 95,882 | u633823896 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int white = 0;
static const int gray = 1;
static const int black = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int white = 0;
static const int gray = 1;
static const int black = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | [
"identifier.change",
"expression.operation.binary.change"
] | 95,884 | 95,882 | u633823896 | cpp |
p02242 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[MAX][MAX];
void dijkstra() {
int minv;
int d[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INFTY;
... | [
"control_flow.branch.if.condition.change"
] | 95,887 | 95,888 | u004129073 | cpp |
p02244 | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
// info
int board[8][8];
int res[8];
void fillBoard(int row, int col, int cnt);
void printBoard();
void recur(int row);
int main() {
fill(res, res + 8, -1);
// rep(i, 8){
// fill(b... | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
// info
int board[8][8];
int res[8];
void fillBoard(int row, int col, int cnt);
void printBoard();
void recur(int row);
int main() {
fill(res, res + 8, -1);
// rep(i, 8){
// fill(b... | [
"literal.string.change",
"io.output.change"
] | 95,898 | 95,899 | u406276395 | cpp |
p02244 | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
// info
int board[8][8];
int res[8];
void fillBoard(int row, int col, int cnt);
void printBoard();
void recur(int row);
int main() {
fill(res, res + 8, -1);
// rep(i, 8){
// fill(b... | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
// info
int board[8][8];
int res[8];
void fillBoard(int row, int col, int cnt);
void printBoard();
void recur(int row);
int main() {
fill(res, res + 8, -1);
// rep(i, 8){
// fill(b... | [
"literal.string.change",
"io.output.change"
] | 95,900 | 95,899 | u406276395 | cpp |
p02244 | #include <iostream>
using namespace std;
#define N 8
#define FREE -1
#define NOT_FREE 1
int row[N], col[N], dpos[2 * N - 1], dneg[2 * N - 1];
bool X[N][N];
void initialize() {
for (int i = 0; i < N; i++) {
row[i] = FREE;
col[i] = FREE;
}
for (int i = 0; i < 2 * N - 1; i++) {
dpos[i] = FREE;
d... |
#include <iostream>
using namespace std;
#define N 8
#define FREE -1
#define NOT_FREE 1
int row[N], col[N], dpos[2 * N - 1], dneg[2 * N - 1];
bool X[N][N];
void initialize() {
for (int i = 0; i < N; i++) {
row[i] = FREE;
col[i] = FREE;
}
for (int i = 0; i < 2 * N - 1; i++) {
dpos[i] = FREE;
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 95,901 | 95,902 | u626935725 | cpp |
p02248 | #include <bits/stdc++.h>
using namespace std;
string S, T;
main() {
cin >> S >> T;
if (S.size() >= T.size()) {
for (int i = 0; i <= S.size() - T.size(); i++) {
if (T == S.substr(i, T.size())) {
printf("%d", i);
}
}
}
} | #include <bits/stdc++.h>
using namespace std;
string S, T;
int main() {
cin >> S >> T;
if (S.size() >= T.size()) {
for (int i = 0; i <= S.size() - T.size(); i++) {
if (T == S.substr(i, T.size())) {
printf("%d\n", i);
}
}
}
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 96,081 | 96,082 | u852311840 | cpp |
p02248 | #include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << (o) << " "; ... | #include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << (o) << " "; ... | [
"expression.operation.binary.remove"
] | 96,083 | 96,084 | u160041984 | cpp |
p02248 | #include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << (o) << " "; ... | #include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << (o) << " "; ... | [
"assignment.change",
"expression.operation.binary.remove"
] | 96,085 | 96,084 | u160041984 | cpp |
p02248 | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string T, P;
int Tlen, Plen;
cin >> T >> P;
Tlen = T.size();
Plen = P.size();
for (int i = 0; i <= Tlen - Plen; i++) {
if (T[i] == P[0]) {
if (P == T.substr(i... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string T, P;
int Tlen, Plen;
cin >> T >> P;
Tlen = T.size();
Plen = P.size();
for (int i = 0; i <= Tlen - Plen; i++) {
if (T[i] == P[0]) {
if (P == T.substr(i... | [
"literal.string.change",
"io.output.change"
] | 96,088 | 96,089 | u327778409 | cpp |
p02248 | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string T, P;
int Tlen, Plen;
cin >> T >> P;
Tlen = T.size();
Plen = P.size();
for (int i = 0; i <= Tlen - Plen; i++) {
if (T[i] == P[0]) {
if (P == T.substr(i... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string T, P;
int Tlen, Plen;
cin >> T >> P;
Tlen = T.size();
Plen = P.size();
for (int i = 0; i <= Tlen - Plen; i++) {
if (T[i] == P[0]) {
if (P == T.substr(i... | [
"literal.string.change",
"io.output.change"
] | 96,090 | 96,089 | u327778409 | cpp |
p02245 | #include <cstdio>
#include <iostream>
#include <map>
#include <queue>
using namespace std;
queue<pair<string, int>> Q;
void Sw(string st, int x) {
int i;
int pos, npos;
int d[4] = {-3, 3, -1, 1};
string st1;
for (i = 0; i <= 8; i++) {
if (st[i] == '0') {
pos = i;
break;
}
}
for (i = ... | #include <cstdio>
#include <iostream>
#include <map>
#include <queue>
using namespace std;
queue<pair<string, int>> Q;
void Sw(string st, int x) {
int i;
int pos, npos;
int d[4] = {-3, 3, -1, 1};
string st1;
for (i = 0; i <= 8; i++) {
if (st[i] == '0') {
pos = i;
break;
}
}
for (i = ... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 96,093 | 96,094 | u951145380 | cpp |
p02245 | #include <bits/stdc++.h>
using namespace std;
#define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repl(i, 0, n)
#define INF INT_MAX / 3
#define N 3
typedef pair<int, int> P;
struct State {
int g, h;
string state;
P blank;
string path;
bool operator<(const State &a) const { retu... | #include <bits/stdc++.h>
using namespace std;
#define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repl(i, 0, n)
#define INF INT_MAX / 3
#define N 3
typedef pair<int, int> P;
struct State {
int g, h;
string state;
P blank;
string path;
bool operator<(const State &a) const { retu... | [
"identifier.change",
"call.arguments.change"
] | 96,095 | 96,096 | u534752820 | cpp |
p02245 | #include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 3
#define N2 9
struct Puzzle {
int f[N2];
int space;
string path;
bool operator<(const Puzzle &p) const {
for (int i = 0; i < N2; i++) {
if (f[i] == p.f[i])
continue;
r... | #include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 3
#define N2 9
struct Puzzle {
int f[N2];
int space;
string path;
bool operator<(const Puzzle &p) const {
for (int i = 0; i < N2; i++) {
if (f[i] == p.f[i])
continue;
r... | [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 96,100 | 96,101 | u043039307 | cpp |
p02245 | #include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 3
#define N2 9
struct Puzzle {
int f[N2];
int space;
string path;
bool operator<(const Puzzle &p) const {
for (int i = 0; i < N2; i++) {
if (f[i] == p.f[i])
continue;
r... | #include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 3
#define N2 9
struct Puzzle {
int f[N2];
int space;
string path;
bool operator<(const Puzzle &p) const {
for (int i = 0; i < N2; i++) {
if (f[i] == p.f[i])
continue;
r... | [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 96,100 | 96,102 | u043039307 | cpp |
p02245 | #include <cassert>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#define N 3
#define N2 8
#define LIMIT 100
using namespace std;
static const int dx[4] = {0, -1, 0, 1};
static const int dy[4] = {1, 0, -1, 0};
static const char dir[4] = {'r', 'u', 'l', 'd'};
int MDT[N2][N2];
struct Puzzle... | #include <cassert>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#define N 3
#define N2 9
#define LIMIT 100
using namespace std;
static const int dx[4] = {0, -1, 0, 1};
static const int dy[4] = {1, 0, -1, 0};
static const char dir[4] = {'r', 'u', 'l', 'd'};
int MDT[N2][N2];
struct Puzzle... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 96,105 | 96,106 | u061424208 | cpp |
p02245 | #include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 3
#define N2 9
struct Puzzle {
int f[N2];
int space;
string path;
bool operator<(const Puzzle &p) const {
for (int i = 0; i < N2; i++) {
if (f[i] == p.f[i])
continue;
r... | #include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 3
#define N2 9
struct Puzzle {
int f[N2]; //??????????????????????????°???
int space; // 0?????\??£???????????????
string path; //???????????§?????????????????????
bool operator<(const Puz... | [
"expression.operator.arithmetic.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 96,194 | 96,195 | u564420347 | cpp |
p02245 | #include <algorithm>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
using namespace std;
set<long long> s;
int map1[10][10];
int k[10];
int t;
queue<long long> x, y;
void input() {
int g = 0;
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
cin >> map1[i][j];
g = g... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
using namespace std;
set<long long> s;
int map1[10][10];
int k[10];
int t;
queue<long long> x, y;
void input() {
int g = 0;
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
cin >> map1[i][j];
g = g... | [
"assignment.change"
] | 96,198 | 96,199 | u604511850 | cpp |
p02245 | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#define N 3
#define N2 9
using namespace std;
struct Puzzle {
int f[N2];
int space;
string path;
bool operator<(const Puzzle &p) const {
for (int i = 0; i < N2; ++i) {
if (f[i] == p.f[i])
continue;
return f[i] < p.f... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#define N 3
#define N2 9
using namespace std;
struct Puzzle {
int f[N2];
int space;
string path;
bool operator<(const Puzzle &p) const {
for (int i = 0; i < N2; ++i) {
if (f[i] == p.f[i])
continue;
return f[i] < p.f... | [
"literal.number.change",
"assignment.value.change"
] | 96,200 | 96,201 | u443587731 | cpp |
p02245 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 3
#define N2 9
const int dx[4]{-1, 0, 1, 0};
const int dy[4]{0, -1, 0, 1};
const char dir[4]{'u', 'l', 'd', 'r'};
struct Puzzle {
int f[N2], space;
string path;
bool oper... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 3
#define N2 9
const int dx[4]{-1, 0, 1, 0};
const int dy[4]{0, -1, 0, 1};
const char dir[4]{'u', 'l', 'd', 'r'};
struct Puzzle {
int f[N2], space;
string path;
bool oper... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 96,202 | 96,203 | u574853191 | cpp |
p02244 | #include <cassert>
#include <iostream>
using namespace std;
const long N = 8;
const long FREE = -1;
const long NOT_FREE = 1;
long row[N], col[N], dpos[2 * N - 1], dneg[2 * N - 1];
bool X[N][N];
void initialize() {
for (long i = 0; i < N; i++) {
row[i] = FREE;
col[i] = FREE;
}
for (long i = 0; i < 2 * N... | #include <cassert>
#include <iostream>
using namespace std;
const long N = 8;
const long FREE = -1;
const long NOT_FREE = 1;
long row[N], col[N], dpos[2 * N - 1], dneg[2 * N - 1];
bool X[N][N];
void initialize() {
for (long i = 0; i < N; i++) {
row[i] = FREE;
col[i] = FREE;
}
for (long i = 0; i < 2 * N... | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 96,212 | 96,213 | u564420347 | cpp |
p02244 | #include <iostream>
using namespace std;
const int MAXN = 10;
int map[MAXN][MAXN], jilu[100][MAXN][MAXN];
int lie[10], zuoxie[20], youxie[20];
int v[100], q[100];
int tot = 0;
void wwq() {
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++)
jilu[tot][i][j] = map[i][j];
}
tot++;
}
void dfs(int i) {... | #include <iostream>
using namespace std;
const int MAXN = 10;
int map[MAXN][MAXN], jilu[100][MAXN][MAXN];
int lie[10], zuoxie[20], youxie[20];
int v[100], q[100];
int tot = 0;
void wwq() {
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++)
jilu[tot][i][j] = map[i][j];
}
tot++;
}
void dfs(int i) {... | [
"io.output.change"
] | 96,216 | 96,217 | u604511850 | cpp |
p02244 | #include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <string.h>
namespace {
const int N = 8;
// the positions of k-queens are fixed.
// Once initialized, the values remain unchanged.
bool row[N] = {false};
bool col[N] = {false};
bool down[2 * N - 1] = {false};
bool up[2 * N - 1] = {false};
int pos[N];
... | #include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <string.h>
namespace {
const int N = 8;
// the positions of k-queens are fixed.
// Once initialized, the values remain unchanged.
bool row[N] = {false};
bool col[N] = {false};
bool down[2 * N - 1] = {false};
bool up[2 * N - 1] = {false};
int pos[N];
... | [] | 96,220 | 96,221 | u280745724 | cpp |
p02244 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int inf = 1000000000;
int dx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int dy[8] = {1, 1, 0, -1, -1, -1, 0, 1};
vector<vector<int>> ans;
vector<vector<int>> check(vector<vector<... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int inf = 1000000000;
int dx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int dy[8] = {1, 1, 0, -1, -1, -1, 0, 1};
vector<vector<int>> ans;
vector<vector<int>> check(vector<vector<... | [
"identifier.change",
"io.output.change"
] | 96,224 | 96,225 | u991537731 | cpp |
p02244 | #include <cassert>
#include <iostream>
using namespace std;
#define N 8
#define FREE -1
#define NOT_FREE 1
int row[N], col[N], dpos[2 * N - 1], dneg[2 * N - 1];
bool X[N][N];
void init() {
for (int i = 0; i < N; i++) {
row[i] = FREE;
col[i] = FREE;
}
for (int i = 0; i < 2 * N - 1; i++) {
dpos[i] = ... | #include <cassert>
#include <iostream>
using namespace std;
#define N 8
#define FREE -1
#define NOT_FREE 1
int row[N], col[N], dpos[2 * N - 1], dneg[2 * N - 1];
bool X[N][N];
void init() {
for (int i = 0; i < N; i++) {
row[i] = FREE;
col[i] = FREE;
}
for (int i = 0; i < 2 * N - 1; i++) {
dpos[i] = ... | [
"assignment.value.change",
"identifier.change"
] | 96,228 | 96,229 | u228579910 | cpp |
p02244 | #include <iostream>
#include <string.h>
using namespace std;
int eight_queen[8];
int final = 0;
bool check(int row, int value) {
int data;
for (int i = 0; i < 8; i++) {
if (eight_queen[i] != -1) {
data = eight_queen[i];
if (value == data)
return false;
if ((value + row) == (data + i))... | #include <iostream>
#include <string.h>
using namespace std;
int eight_queen[8];
int final = 0;
bool check(int row, int value) {
int data;
for (int i = 0; i < 8; i++) {
if (eight_queen[i] != -1) {
data = eight_queen[i];
if (value == data)
return false;
if ((value + row) == (data + i))... | [
"literal.number.change",
"assignment.value.change"
] | 96,230 | 96,231 | u774648665 | cpp |
p02244 | // ALDS1_13_A.cpp
// Heuristic Search - 8 Queens Problem
#include <cstdio>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
const int N = 8;
vector<int> row(N);
vector<int> col(N);
vector<int> md(2 * N - 1); // main diagonal
vector<int> ad(2 * N - 1); // anti-diagnoal
vector<int> res(N);
// v... | // ALDS1_13_A.cpp
// Heuristic Search - 8 Queens Problem
#include <cstdio>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
const int N = 8;
vector<int> row(N);
vector<int> col(N);
vector<int> md(2 * N - 1); // main diagonal
vector<int> ad(2 * N - 1); // anti-diagnoal
vector<int> res(N);
// v... | [] | 96,232 | 96,233 | u283553540 | cpp |
p02250 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#pragma warning(disable : 4996)
using namespace std;
vector<int> dat;
vector<int> tmp;
int doubles, lengths;
bool compare_suffix(int i, int j) {
if (dat[i] == dat[j]) {
int ri = (i + doubles <= lengths ? dat[i + doubles] : -1);
... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#pragma warning(disable : 4996)
using namespace std;
vector<int> dat;
vector<int> tmp;
int doubles, lengths;
bool compare_suffix(int i, int j) {
if (dat[i] == dat[j]) {
int ri = (i + doubles <= lengths ? dat[i + doubles] : -1);
... | [
"call.add"
] | 96,234 | 96,235 | u823513038 | cpp |
p02250 | #include <bits/stdc++.h>
using namespace std;
int Rank[1000005];
int Tmp[1000005];
int kc, len;
bool compare_sa(int i, int j) {
return Rank[i] == Rank[j] ? Rank[i] < Rank[j]
: (i + kc <= len ? Rank[i + kc] : -1) <
(j + kc <= len ? Rank[j + kc] : -1);
}
... | #include <bits/stdc++.h>
using namespace std;
int Rank[1000005];
int Tmp[1000005];
int kc, len;
bool compare_sa(int i, int j) {
return Rank[i] != Rank[j] ? Rank[i] < Rank[j]
: (i + kc <= len ? Rank[i + kc] : -1) <
(j + kc <= len ? Rank[j + kc] : -1);
}
... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 96,250 | 96,251 | u923320778 | cpp |
p02250 | #include <algorithm>
#include <iostream>
#include <string.h>
using namespace std;
char str[1000001];
int k, len;
int sa[1000001], Rank[1000001], temp[1000001];
bool compare_sa(int i, int j) {
if (Rank[i] == Rank[j]) {
int t1 = -1, t2 = -1;
if (i + k <= len) {
t1 = Rank[i + k];
}
if (j + k <= ... | #include <algorithm>
#include <iostream>
#include <string.h>
using namespace std;
char str[1000001];
int k, len;
int sa[1000001], Rank[1000001], temp[1000001];
bool compare_sa(int i, int j) {
if (Rank[i] == Rank[j]) {
int t1 = -1, t2 = -1;
if (i + k <= len) {
t1 = Rank[i + k];
}
if (j + k <= ... | [
"identifier.change",
"variable_access.subscript.index.change",
"io.output.change"
] | 96,254 | 96,255 | u327778409 | cpp |
p02250 | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | [] | 96,256 | 96,257 | u924665348 | cpp |
p02250 | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | [] | 96,258 | 96,257 | u924665348 | cpp |
p02250 | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | [] | 96,259 | 96,257 | u924665348 | cpp |
p02250 | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | [
"expression.operator.compare.change",
"assignment.value.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 96,260 | 96,261 | u924665348 | cpp |
p02250 | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 96,262 | 96,261 | u924665348 | cpp |
p02250 | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 96,263 | 96,261 | u924665348 | cpp |
p02250 | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
sa.clear();
lcp.clear();
sa.resize(n + 1, 0);
lcp.re... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 96,265 | 96,261 | u924665348 | cpp |
p02250 | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
build_sa();
// build_lcp();
// build_rmq();
}
void b... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// BEGIN CUT HERE
struct SuffixArray {
int n, k;
string S;
vector<int> sa, lcp;
SuffixArray() {}
SuffixArray(string S) : S(S) { init(); }
void init() {
n = S.length();
build_sa();
// build_lcp();
// build_rmq();
}
void b... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 96,266 | 96,267 | u924665348 | cpp |
p02246 | #include <algorithm>
#include <functional>
#include <iostream>
#include <istream>
#include <map>
#include <ostream>
#include <queue>
#include <random>
#include <stack>
#include <tuple>
#include <utility>
using namespace std;
// puzzle ?????¶?????????key (ULL) ??§??¨?????????
// priority_que ?????£????????????stack<ke... | #include <algorithm>
#include <functional>
#include <iostream>
#include <istream>
#include <map>
#include <ostream>
#include <queue>
#include <random>
#include <stack>
#include <tuple>
#include <utility>
using namespace std;
// puzzle ?????¶?????????key (ULL) ??§??¨?????????
// priority_que ?????£????????????stack<ke... | [] | 96,465 | 96,466 | u766807750 | cpp |
p02246 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 200
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
i... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 9600
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 96,472 | 96,471 | u852311840 | cpp |
p02246 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 600
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
i... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 9600
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 96,473 | 96,471 | u852311840 | cpp |
p02246 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 200
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
i... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 7200
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 96,472 | 96,476 | u852311840 | cpp |
p02246 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 600
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
i... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 7200
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 96,473 | 96,476 | u852311840 | cpp |
p02246 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 200
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
i... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 7125
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 96,472 | 96,478 | u852311840 | cpp |
p02246 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 600
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
i... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 7125
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 96,473 | 96,478 | u852311840 | cpp |
p02246 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 200
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
i... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 7100
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH * 4];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 96,472 | 96,483 | u852311840 | cpp |
p02246 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 600
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
i... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define MAX_T 50
#define WIDTH 7100
pair<int, vector<vector<int>>> E[MAX_T][WIDTH], D[WIDTH * 4];
vector<vector<int>> X;
int hantei(vector<vector<int>> a) {
int sum = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 96,473 | 96,483 | u852311840 | cpp |
p02246 | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
using namespace std;
const int num = 16, ud[] = {-1, 0, 11, 0}, lr[] = {0, 1, 0, -1}, nd = 4;
int md[num][num];
struct puzzle {
int sp, p[num], mdp, cost;
bool operator<(const puzzle &pu) c... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
using namespace std;
const int num = 16, ud[] = {-1, 1, 0, 0}, lr[] = {0, 0, -1, 1}, nd = 4;
int md[num][num];
struct puzzle {
int sp, p[num], mdp, cost;
bool operator<(const puzzle &pu) co... | [
"literal.number.change"
] | 96,491 | 96,492 | u660370248 | cpp |
p02246 | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
using namespace std;
const int num = 16, ud[] = {-1, 0, 11, 0}, lr[] = {0, 1, 0, -1}, nd = 4;
int md[num][num];
struct puzzle {
int sp, p[num], mdp, cost;
bool operator<(const puzzle &pu) c... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
using namespace std;
const int num = 16, ud[] = {-1, 1, 0, 0}, lr[] = {0, 0, 1, -1}, nd = 4;
int md[num][num];
struct puzzle {
int sp, p[num], mdp, cost;
bool operator<(const puzzle &pu) co... | [
"literal.number.change"
] | 96,491 | 96,494 | u660370248 | cpp |
p02246 | #include <assert.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <cmath>
#include <set>
#include <stack>
#include <string>
#define N 4
#define N2 16
using namespace std;
// const int N = 4;
// const int N2 = 16;
static const int dx[4] = {0, -1, 0, 1};
static const int dy[4... | #include <assert.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <cmath>
#include <set>
#include <stack>
#include <string>
#define N 4
#define N2 16
using namespace std;
// const int N = 4;
// const int N2 = 16;
static const int dx[4] = {0, -1, 0, 1};
static const int dy[4... | [
"control_flow.return.add"
] | 96,502 | 96,503 | u864527629 | cpp |
p02246 | #include <assert.h>
#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <climits>
#include <cmath>
#include <set>
#include <stack>
#include <string>
#define N 4
#define N2 16
using namespace std;
// const int N = 4;
// const int N2 = 16;
static const int dx[4] = {0, -1, 0, 1};
st... | #include <assert.h>
#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <climits>
#include <cmath>
#include <set>
#include <stack>
#include <string>
#define N 4
#define N2 16
using namespace std;
// const int N = 4;
// const int N2 = 16;
static const int dx[4] = {0, -1, 0, 1};
st... | [
"expression.operation.unary.reference.add"
] | 96,504 | 96,505 | u864527629 | cpp |
p02246 | #include <array>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
const int N = 4;
const int N2 = N * N;
int MDT[N2][N2];
struct Puzzle {
array<char, N2> board;
int empty;
int cost;
int rank;
bool operator<(const Puzzle &other) const {
return... | #include <array>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
const int N = 4;
const int N2 = N * N;
int MDT[N2][N2];
struct Puzzle {
array<char, N2> board;
int empty;
int cost;
int rank;
bool operator<(const Puzzle &other) const {
return... | [
"assignment.add"
] | 96,514 | 96,515 | u957470671 | cpp |
p02246 |
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 4
#define N2 16
#define LIMIT 100
static const int dx[4] = {0, -1, 0, 1};
static const int dy[4] = {1, 0, -1, 0};
static const char dir[4] = {'r', 'u', 'l', 'd'};
int MDT[N2][N2];
struct Puzzle {
... | #include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 4
#define N2 16
#define LIMIT 100
static const int dx[4] = {0, -1, 0, 1};
static const int dy[4] = {1, 0, -1, 0};
static const char dir[4] = {'r', 'u', 'l', 'd'};
int MDT[N2][N2];
struct Puzzle {
... | [] | 96,530 | 96,531 | u626935725 | cpp |
p02246 | #include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 4
#define N2 16
#define LIMIT 100
static const int dx[4] = {0, -1, 0, 1};
static const int dy[4] = {1, 0, -1, 0};
static const char dir[4] = {'r', 'u', 'l', 'd'};
int MDT[N2][N2];
struct Puzzle {
... | #include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define N 4
#define N2 16
#define LIMIT 100
static const int dx[4] = {0, -1, 0, 1};
static const int dy[4] = {1, 0, -1, 0};
static const char dir[4] = {'r', 'u', 'l', 'd'};
int MDT[N2][N2];
struct Puzzle {
... | [] | 96,532 | 96,531 | u626935725 | cpp |
p02255 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int n;
vector<int> a(n);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
int v = a[i];
int j = i - 1;
while (j >= 0 && a[j... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int n;
vector<int> a(100);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
int v = a[i];
int j = i - 1;
while (j >= 0 && a... | [] | 97,009 | 97,010 | u015145321 | cpp |
p02255 | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int n;
vector<int> a(n);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
int v = a[i];
int j = i - 1;
while (j >= 0 && a[j... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int n;
vector<int> a(100);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++) {
int v = a[i];
int j = i - 1;
while (j >= 0 && a... | [] | 97,011 | 97,010 | u015145321 | cpp |
p02255 | #include <iostream>
using namespace std;
int main() {
int n, a[101];
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
for (int j = i; j > 0; --j) {
if (a[i - 1] > a[i]) {
int b = a[i];
a[i] = a[i - 1];
a[i - 1] = b;
}
}
f... | #include <iostream>
using namespace std;
int main() {
int n, a[101];
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
for (int j = i; j > 0; --j) {
if (a[j - 1] > a[j]) {
int b = a[j];
a[j] = a[j - 1];
a[j - 1] = b;
}
}
f... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"assignment.variable.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 97,014 | 97,015 | u934356503 | cpp |
p02255 |
#include <iostream>
#include <vector>
using namespace std;
void insortionSort(vector<int> A) {
for (int i = 0; i < A.size(); i++) {
int v = A[i];
int j = i - 1;
while (j >= 0 && A[j] > v) {
A[j + 1] = A[j];
j--;
}
A[j + 1] = v;
for (int i = 0; i < A.size(); i++) {
cout << ... |
#include <iostream>
#include <vector>
using namespace std;
void insortionSort(vector<int> A) {
for (int i = 0; i < A.size(); i++) {
int v = A[i];
int j = i - 1;
while (j >= 0 && A[j] > v) {
A[j + 1] = A[j];
j--;
}
A[j + 1] = v;
for (int i = 0; i < A.size(); i++) {
cout << ... | [] | 97,016 | 97,017 | u229973939 | cpp |
p02255 | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v(n, 0);
for (auto &&x : v) {
cin >> x;
}
for (int i = 1; i < n; ++i) {
int x = v[i];
int j = i - 1;
while (j >= 0 and v[j] > x) {
v[j + 1] = v[j];
--j;
}
v[j + 1] = x;
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v(n, 0);
for (auto &&x : v) {
cin >> x;
}
for (int i = 0; i < n; ++i) {
int x = v[i];
int j = i - 1;
while (j >= 0 and v[j] > x) {
v[j + 1] = v[j];
--j;
}
v[j + 1] = x;
... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 97,019 | 97,020 | u539796523 | cpp |
p02255 | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
void print(int A[], int N) {
for (int i = 0; i < N; i++) {
if (N != N - 1)
printf("%d ", A[i]);
else
printf("%d... | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
void print(int A[], int N) {
for (int i = 0; i < N; i++) {
if (i != N - 1)
printf("%d ", A[i]);
else
printf("%d... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 97,022 | 97,023 | u553771371 | cpp |
p02255 | #include <iostream>
#include <string>
using namespace std;
int main() {
int q, i, j, k, key;
int array[100];
cin >> q;
for (i = 0; i < q; i++)
cin >> array[i];
for (i = 1; i < q; i++) {
for (int j = 0; j < q; j++) {
cout << array[j];
if (j == q - 1)
cout << endl;
else
... | #include <iostream>
#include <string>
using namespace std;
int main() {
int q, i, j, k, key;
int array[100];
cin >> q;
for (i = 0; i < q; i++)
cin >> array[i];
for (i = 1; i < q; i++) {
for (int j = 0; j < q; j++) {
cout << array[j];
if (j == q - 1)
cout << endl;
else
... | [] | 97,024 | 97,025 | u017200929 | cpp |
p02255 | #include <iostream>
using namespace std;
int main() {
int n, i, j, key, ary[101];
cin >> n;
for (i = 0; i < n; i++) {
cin >> ary[i];
}
for (i = 1; i < n; i++) {
key = ary[i];
j = i - 1;
while (j >= 0 && key < ary[j]) {
ary[j + 1] = ary[j];
j--;
}
ary[j + 1] = key;
f... | #include <iostream>
using namespace std;
int main() {
int n, i, j, key, ary[101];
cin >> n;
for (i = 0; i < n; i++) {
cin >> ary[i];
}
for (i = 0; i < n; i++) {
key = ary[i];
j = i - 1;
while (j >= 0 && key < ary[j]) {
ary[j + 1] = ary[j];
j--;
}
ary[j + 1] = key;
f... | [
"literal.number.change",
"assignment.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 97,026 | 97,027 | u300946041 | cpp |
p02255 | #include <iostream>
using namespace std;
#define MAX 100
void trace(int A[], int N) {
int i, j;
for (j = 0; j < N; j++) {
if (j > 0)
cout << " ";
cout << A[j];
}
cout << endl;
}
void insertionSort(int A[], int N) {
int i, j, v;
for (i = 1; i < N - 1; i++) {
v = A[i];
j = i - 1;
w... | #include <iostream>
using namespace std;
#define MAX 100
void trace(int A[], int N) {
int i, j;
for (j = 0; j < N; j++) {
if (j > 0)
cout << " ";
cout << A[j];
}
cout << endl;
}
void insertionSort(int A[], int N) {
int i, j, v;
for (i = 1; i < N; i++) {
v = A[i];
j = i - 1;
while... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 97,029 | 97,030 | u460034312 | cpp |
p02255 | #include <iostream>
using namespace std;
int n, v, j, A[100];
void trace() {
for (int i = 0; i < n; i++) {
if (i)
cout << " ";
cout << A[i];
}
cout << endl;
}
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> A[i];
trace();
for (int i = 0; i < n; i++) {
v = A[i];
j = i... | #include <iostream>
using namespace std;
int n, v, j, A[100];
void trace() {
for (int i = 0; i < n; i++) {
if (i)
cout << " ";
cout << A[i];
}
cout << endl;
}
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> A[i];
trace();
for (int i = 0; i < n; i++) {
v = A[i];
j = i... | [
"control_flow.branch.if.add"
] | 97,031 | 97,032 | u965663991 | cpp |
p02255 | #include <stdio.h>
void insertionSort(int *, int);
int main() {
int A[101], N, n;
scanf("%d", &N);
for (n = 0; n <= N - 1; n++)
scanf("%d", &A[n]);
insertionSort(A, N);
return 0;
}
void insertionSort(int *a, int n) {
int x;
for (x = 0; x <= n - 2; x++)
printf("%d ", a[x]);
printf("%d\n", a[n -... | #include <stdio.h>
void insertionSort(int *, int);
int main() {
int A[101], N, n;
scanf("%d", &N);
for (n = 0; n <= N - 1; n++)
scanf("%d", &A[n]);
insertionSort(A, N);
return 0;
}
void insertionSort(int *a, int n) {
int x;
for (x = 0; x <= n - 2; x++)
printf("%d ", a[x]);
printf("%d\n", a[n -... | [
"identifier.change",
"control_flow.loop.condition.change",
"literal.number.change"
] | 97,038 | 97,039 | u192037914 | cpp |
p02255 | #include <iostream>
#include <vector>
void printVector(std::vector<int> &vec) {
int size = vec.size();
for (int i = 0; i < size; ++i) {
std::cout << (i ? "" : " ") << vec[i];
}
std::cout << std::endl;
}
int main() {
int nums;
std::cin >> nums;
std::vector<int> v(nums);
for (int i = 0; i < nums; ++... | #include <iostream>
#include <vector>
void printVector(std::vector<int> &vec) {
int size = vec.size();
for (int i = 0; i < size; ++i) {
std::cout << (i ? " " : "") << vec[i];
}
std::cout << std::endl;
}
int main() {
int nums;
std::cin >> nums;
std::vector<int> v(nums);
for (int i = 0; i < nums; ++... | [
"literal.string.change",
"expression.operation.binary.change"
] | 97,040 | 97,041 | u367089509 | cpp |
p02255 | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void dump(int *a, int N) {
cout << a[0];
for (int i = 0; i < N; i++) {
cout << " " << a[i];
}
cout << endl;
}
int sort(int *a, int N) {
dump(a, N);
for (int i = 1; i < N; i++) {
int k = a[i];
int j;
for (j = i - ... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void dump(int *a, int N) {
cout << a[0];
for (int i = 1; i < N; i++) {
cout << " " << a[i];
}
cout << endl;
}
int sort(int *a, int N) {
dump(a, N);
for (int i = 1; i < N; i++) {
int k = a[i];
int j;
for (j = i - ... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"control_flow.return.add",
"control_flow.return.0.add"
] | 97,048 | 97,049 | u078643778 | cpp |
p02255 | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void dump(int *a, int N) {
cout << a[0];
for (int i = 0; i < N; i++) {
cout << " " << a[i];
}
cout << endl;
}
int sort(int *a, int N) {
dump(a, N);
for (int i = 1; i < N; i++) {
int k = a[i];
int j;
for (j = i - ... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void dump(int *a, int N) {
cout << a[0];
for (int i = 1; i < N; i++) {
cout << " " << a[i];
}
cout << endl;
}
int sort(int *a, int N) {
dump(a, N);
for (int i = 1; i < N; i++) {
int k = a[i];
int j;
for (j = i - ... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 97,051 | 97,049 | u078643778 | cpp |
p02255 | #include <iostream>
#include <vector>
using namespace std;
void i_sort(vector<int> a, int n) {
int i, j;
for (i = 0; i < n; ++i) {
for (j = 0; j < i; ++j) {
if (a[j] > a[i]) {
a[j] ^= a[i];
a[i] ^= a[j];
a[j] ^= a[i];
}
for (int k = 0; k < n - 1; ++k) {
cout <<... | #include <iostream>
#include <vector>
using namespace std;
void i_sort(vector<int> a, int n) {
int i, j;
for (i = 0; i < n; ++i) {
for (j = 0; j < i; ++j) {
if (a[j] > a[i]) {
a[j] ^= a[i];
a[i] ^= a[j];
a[j] ^= a[i];
}
}
for (int k = 0; k < n - 1; ++k) {
cout ... | [] | 97,052 | 97,053 | u822202919 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.