problem_id stringlengths 6 6 | language stringclasses 2
values | original_status stringclasses 3
values | original_src stringlengths 19 243k | changed_src stringlengths 19 243k | change stringclasses 3
values | i1 int64 0 8.44k | i2 int64 0 8.44k | j1 int64 0 8.44k | j2 int64 0 8.44k | error stringclasses 270
values | stderr stringlengths 0 226k |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define loop(i, x, n) for (int i = (x); i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define int long long
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e10;
template <typename T> void cmax(T &a, T b) { a = max(a, b); }
tem... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define loop(i, x, n) for (int i = (x); i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define int long long
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e10;
template <typename T> void cmax(T &a, T b) { a = max(a, b); }
tem... | replace | 17 | 18 | 17 | 18 | 0 | |
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
if (y == 0)
return x;
return gcd(y, x % y);
}
int main() {
int n, x;
cin >> n >> x;
vector<int> y(n);
y[0] = x;
for (int i = 1; i <= n; i++) {
cin >> y[i];
}
sort(y.begin(), y.end());
vector<int> dif(n);
for (int i = ... | #include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
if (y == 0)
return x;
return gcd(y, x % y);
}
int main() {
int n, x;
cin >> n >> x;
vector<int> y(n + 1);
y[0] = x;
for (int i = 1; i <= n; i++) {
cin >> y[i];
}
sort(y.begin(), y.end());
vector<int> dif(n);
for (int ... | replace | 12 | 13 | 12 | 13 | 0 | |
p03262 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, m, n) for (int i = m; i < (n); i++)
#define print(x) cout << (x) << endl;
#define printv(x) \
for (int i = 0; i < x.size(); i++) { \
cout << (x[i]) << " "; ... | #include <bits/stdc++.h>
#define rep(i, m, n) for (int i = m; i < (n); i++)
#define print(x) cout << (x) << endl;
#define printv(x) \
for (int i = 0; i < x.size(); i++) { \
cout << (x[i]) << " "; ... | replace | 53 | 54 | 53 | 62 | TLE | |
p03262 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <list>
#include <map>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
int main() {
vector<int> vi;
int N, X, dummy, ans;
dummy = scanf("%d %d", &N, &X);
... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <list>
#include <map>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
int main() {
vector<int> vi;
int N, X, dummy, ans;
dummy = scanf("%d %d", &N, &X);
... | insert | 33 | 33 | 33 | 34 | TLE | |
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
int r;
while (b != 0) {
r = a % b;
a = b;
b = r;
}
return a;
}
int main() {
long long n, x, i, ans, dif[10009];
vector<long long> a;
cin >> n >> x;
a.push_back(x);
for (i = 0; i < n; i++) {
cin >> x;
a.push_bac... | #include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
int r;
while (b != 0) {
r = a % b;
a = b;
b = r;
}
return a;
}
int main() {
long long n, x, i, ans, dif[100090];
vector<long long> a;
cin >> n >> x;
a.push_back(x);
for (i = 0; i < n; i++) {
cin >> x;
a.push_ba... | replace | 14 | 15 | 14 | 15 | 0 | |
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
int n, xxxx;
cin >> n >> xxxx;
vector<int> x(n + 1);
x.at(0) = xxxx;
for (int i = 1; i < n + 1; i++)
cin >> x.at(i);
sort(x.begin(), x.end());
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
int n, xxxx;
cin >> n >> xxxx;
vector<int> x(n + 1);
x.at(0) = xxxx;
for (int i = 1; i < n + 1; i++)
cin >> x.at(i);
sort(x.begin(), x.end());
... | replace | 19 | 23 | 19 | 21 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 4) >= this->size() (which is 4)
|
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int z, n, x, a[10000], b[10000];
scanf("%I64d%I64d", &n, &x);
for (int i = 0; i < n; i++) {
scanf("%I64d", &a[i]);
b[i] = abs(a[i] - x);
}
sort(b, b + n);
z = b[0];
for (int i = 1; i < n; i++) {
z = __gcd(z, b[i]);
}
pr... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int z, n, x, a[100009], b[100009];
scanf("%I64d%I64d", &n, &x);
for (int i = 0; i < n; i++) {
scanf("%I64d", &a[i]);
b[i] = abs(a[i] - x);
}
sort(b, b + n);
z = b[0];
for (int i = 1; i < n; i++) {
z = __gcd(z, b[i]);
}
... | replace | 5 | 6 | 5 | 6 | 0 | |
p03262 | C++ | Time Limit Exceeded | #include <cmath>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int gcd(int a, int b) {
if (a <= 0 || b <= 0)
return -1;
if (a < b)
gcd(b, a);
int r = a % b;
while (r) {
a = b;
b = r;
}
return b;
}
int main() {
int N, X;
cin >> N >> X;
int D;
vector<i... | #include <cmath>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int gcd(int a, int b) {
if (a <= 0 || b <= 0)
return -1;
if (a < b)
gcd(b, a);
int r = a % b;
while (r) {
a = b;
b = r;
r = a % b;
}
return b;
}
int main() {
int N, X;
cin >> N >> X;
in... | insert | 17 | 17 | 17 | 18 | TLE | |
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
while (!b) {
a %= b;
swap(a, b);
}
return a;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, x;
cin >> n >> x;
int g = 0;
while (n--) {
int y;
cin >> y;
g = gcd(abs(x - y), g);
}
cout << g << '\n... | #include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
while (b) {
a %= b;
swap(a, b);
}
return a;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, x;
cin >> n >> x;
int g = 0;
while (n--) {
int y;
cin >> y;
g = gcd(abs(x - y), g);
}
cout << g << '\n'... | replace | 4 | 5 | 4 | 5 | -8 | |
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
#define ALL(a) a.begin(), a.end()
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
ll n, x;
cin >> n >> x;
ll c[x];
for (int i = 0; i < n; i++)
cin ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
#define ALL(a) a.begin(), a.end()
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
ll n, x;
cin >> n >> x;
ll c[n];
for (int i = 0; i < n; i++)
cin ... | replace | 13 | 14 | 13 | 14 | 0 | |
p03262 | C++ | Runtime Error | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
long long int gcd(long long int a, long long int b) {
long long int r;
if (a % b == 0)
return b;
else {
r = a % b;
return gcd(b, r);
}
}
int main() {
int N;
long long int X;
cin >> N >> X;
vector<long long int> c... | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
long long int gcd(long long int a, long long int b) {
long long int r;
if (a % b == 0)
return b;
else {
r = a % b;
return gcd(b, r);
}
}
int main() {
int N;
long long int X;
cin >> N >> X;
vector<long long int> c... | insert | 30 | 30 | 30 | 34 | 0 | |
p03262 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int euclid_gcd(int a, int b) {
int tmp_a, tmp_b; // tmp_a>tmp_b
if (a < b) {
tmp_a = b;
tmp_b = a;
} else {
tmp_a = a;
tmp_b = b;
}
if (tmp_b == 0) {
retur... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int euclid_gcd(int a, int b) {
int tmp_a, tmp_b; // tmp_a>tmp_b
if (a < b) {
tmp_a = b;
tmp_b = a;
} else {
tmp_a = a;
tmp_b = b;
}
if (tmp_b == 0) {
retur... | insert | 30 | 30 | 30 | 34 | 0 | |
p03262 | C++ | Runtime Error | /**
* Problem: C.
* Author: hkxadpall.
* Date: 2018-09-01.
* Upload: AtCoder.
*/
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
namespace AuthorName {
template <typename _TpInt> inline _TpInt rea... | /**
* Problem: C.
* Author: hkxadpall.
* Date: 2018-09-01.
* Upload: AtCoder.
*/
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
namespace AuthorName {
template <typename _TpInt> inline _TpInt rea... | replace | 22 | 23 | 22 | 23 | 0 | |
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
int gcd(int a, int b) {
int c = a / b;
int d = a % b;
if (d > 0)
return gcd(b, d);
else
return b;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, x;
cin >> n >> x;
vector<int> A(n + 1... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
int gcd(int a, int b) {
int c = a / b;
int d = a % b;
if (d > 0)
return gcd(b, d);
else
return b;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, x;
cin >> n >> x;
vector<int> A(n + 1... | replace | 29 | 30 | 29 | 34 | 0 | |
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define rep(X, N) for (int X = 0; X < N; X++)
#define repvin(V, N) \
for (int i = 0; i < N; i++) { \
int tmp; ... | #include <bits/stdc++.h>
#define ll long long
#define rep(X, N) for (int X = 0; X < N; X++)
#define repvin(V, N) \
for (int i = 0; i < N; i++) { \
int tmp; ... | replace | 40 | 41 | 40 | 47 | 0 | |
p03262 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n + 1; i++)
#define sort(A) sort(A.begin(), A.end())
#define reverse(A) reverse(A.begin(), A.end());
typedef long long ll;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n + 1; i++)
#define sort(A) sort(A.begin(), A.end())
#define reverse(A) reverse(A.begin(), A.end());
typedef long long ll;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd... | replace | 19 | 20 | 19 | 20 | TLE | |
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int a[10005];
int main() {
int n, s, l;
scanf("%d", &n);
for (register int i = 1; i <= n + 1; i++)
scanf("%d", &a[i]);
sort(a + 1, a + n + 2);
for (register int i = 1; i <= n; i++)
a[i] = a[i + 1] - a[i];
a[n + 1] = 0;
sort(a + 1, a + n + 1);
s = a[1... | #include <bits/stdc++.h>
using namespace std;
int a[100005];
int main() {
int n, s, l;
scanf("%d", &n);
for (register int i = 1; i <= n + 1; i++)
scanf("%d", &a[i]);
sort(a + 1, a + n + 2);
for (register int i = 1; i <= n; i++)
a[i] = a[i + 1] - a[i];
a[n + 1] = 0;
sort(a + 1, a + n + 1);
s = a[... | replace | 2 | 3 | 2 | 3 | 0 | |
p03262 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <stdio.h>
#include <vector>
using namespace std;
#define int long long
#define rep(s, i, n) for (int i = s; i < n; i++)
#define c(n) cout << n << endl;
#define ic(n) \
int... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <stdio.h>
#include <vector>
using namespace std;
#define int long long
#define rep(s, i, n) for (int i = s; i < n; i++)
#define c(n) cout << n << endl;
#define ic(n) \
int... | replace | 67 | 68 | 67 | 72 | 0 | |
p03262 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#define ll long long int
using namespace std;
int n, x, f[100005], top, pd, d[100005];
ll ans = 0x3f3f3f3f;
ll gcd(int a, int b) {
if (b == 0)
return a;
else
return (long long)gcd(b, a % b);
}
int m... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#define ll long long int
using namespace std;
int n, x, f[100005], top, pd, d[100005];
ll ans = 0x3f3f3f3f;
ll gcd(int a, int b) {
if (b == 0)
return a;
else
return (long long)gcd(b, a % b);
}
int m... | replace | 28 | 31 | 28 | 30 | TLE | |
p03262 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int a[10005];
int n, x, ans = 1e9;
int main() {
cin >> n >> x;
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] = abs(a[i] - x);
ans = min(a[i], ans);
}
for (int i = 1; i <= n; i++)
ans = __gcd(ans, a[i]);
cout << ans;
return... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int a[100005];
int n, x, ans = 1e9;
int main() {
cin >> n >> x;
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] = abs(a[i] - x);
ans = min(a[i], ans);
}
for (int i = 1; i <= n; i++)
ans = __gcd(ans, a[i]);
cout << ans;
retur... | replace | 3 | 4 | 3 | 4 | 0 | |
p03262 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | replace | 125 | 129 | 125 | 138 | 0 | |
p03263 | Python | Runtime Error | h, w = map(int, input().split())
a = [list(map(int, input().split())) for i in range(h)]
r, c, d = 0, 0, 3
ret = []
for y in range(h * w - 1):
if y % w == 0 or y % w == w - 1:
d = (d + 1) % 4
dy, dx = [(0, 1), (1, 0), (0, -1), (1, 0)][d]
if a[r][c] % 2 != 0:
ret.append((r, c, r + dy, c + dx)... | h, w = map(int, input().split())
a = [list(map(int, input().split())) for i in range(h)]
r, c, d = 0, 0, 3
ret = []
for y in range(h * w - 1):
if y % w == 0:
d = (d + 1) % 4
if y % w == w - 1:
d = (d + 1) % 4
dy, dx = [(0, 1), (1, 0), (0, -1), (1, 0)][d]
if a[r][c] % 2 != 0:
ret.... | replace | 5 | 6 | 5 | 8 | 0 | |
p03263 | Python | Runtime Error | # -*- coding: utf-8 -*-
def main():
h, w = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(h)]
operations = list()
# See:
# https://atcoder.jp/contests/abc109/submissions/3154532
for row in range(h):
for col in range(w - 1):
if a[row][col] % 2... | # -*- coding: utf-8 -*-
def main():
h, w = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(h)]
operations = list()
# See:
# https://atcoder.jp/contests/abc109/submissions/3154532
for row in range(h):
for col in range(w - 1):
if a[row][col] % 2... | replace | 19 | 20 | 19 | 20 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
struct node {
int a, b, c, d;
} re[10000];
int a[550][550];
int main() {
int h, w;
scanf("%d%d", &h, &w);
for (int i = 1; i <= h; i++)
for (int j = 1; j <= w; j++)
scanf("%d", &a[i][j]);
int cnt = 0;
... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
struct node {
int a, b, c, d;
} re[250050];
int a[550][550];
int main() {
int h, w;
scanf("%d%d", &h, &w);
for (int i = 1; i <= h; i++)
for (int j = 1; j <= w; j++)
scanf("%d", &a[i][j]);
int cnt = 0;
... | replace | 7 | 8 | 7 | 8 | 0 | |
p03263 | Python | Runtime Error | H, W = map(int, input().split())
G = [list(map(int, input().split())) for i in range(H)]
N = 0
ans = []
for h in range(H):
for w in range(W - 1):
if G[h][w] % 2 == 1:
N += 1
ans.append((h, w, h, w + 1))
G[h][w + 1] += 1
G[h][w] -= 1
for h in range(H - 1):
... | H, W = map(int, input().split())
G = [list(map(int, input().split())) for i in range(H)]
N = 0
ans = []
for h in range(H):
for w in range(W - 1):
if G[h][w] % 2 == 1:
N += 1
ans.append((h, w, h, w + 1))
G[h][w + 1] += 1
G[h][w] -= 1
for h in range(H - 1):
... | replace | 16 | 17 | 16 | 17 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
using name... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
using name... | replace | 240 | 241 | 240 | 241 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, p, q) for (int i = p; i < q; i++)
... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, p, q) for (int i = p; i < q; i++)
... | replace | 57 | 59 | 57 | 59 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 500 + 10;
int a[N][N], h, w, cnt;
int ans[N][N];
int main() {
cin >> h >> w;
cnt = 0;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= h - 1; i++) {
for (int j = 1; j <= w; j++... | #include <bits/stdc++.h>
using namespace std;
const int N = 500 + 10;
int a[N][N], h, w, cnt;
int ans[N * N][4];
int main() {
cin >> h >> w;
cnt = 0;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= h - 1; i++) {
for (int j = 1; j <= w;... | replace | 5 | 6 | 5 | 6 | 0 | |
p03263 | C++ | Runtime Error | #include <iostream>
#include <tuple>
#include <vector>
using map_t = std::vector<std::vector<size_t>>;
using ans_t = std::vector<std::tuple<size_t, size_t, size_t, size_t>>;
void move(size_t y1, size_t x1, size_t y2, size_t x2, map_t &A, ans_t &ans) {
A[y1 - 1][x1 - 1]--;
A[y2 - 1][x2 - 1]++;
ans.push_back(std:... | #include <iostream>
#include <tuple>
#include <vector>
using map_t = std::vector<std::vector<size_t>>;
using ans_t = std::vector<std::tuple<size_t, size_t, size_t, size_t>>;
void move(size_t y1, size_t x1, size_t y2, size_t x2, map_t &A, ans_t &ans) {
A[y1 - 1][x1 - 1]--;
A[y2 - 1][x2 - 1]++;
ans.push_back(std:... | replace | 40 | 41 | 40 | 41 | 0 | |
p03263 | Python | Runtime Error | h, w = map(int, input().split())
a = []
for _ in range(h):
a.append = list(map(int, input().split()))
ans = []
for i in range(h):
for j in range(w - 1):
if a[i][j] % 2 == 1:
ans.append([i + 1, j + 1, i + 1, j + 2])
a[i][j + 1] += 1
for i in range(h - 1):
if a[i][w - 1] % ... | h, w = map(int, input().split())
a = []
for _ in range(h):
a.append(list(map(int, input().split())))
ans = []
for i in range(h):
for j in range(w - 1):
if a[i][j] % 2 == 1:
ans.append([i + 1, j + 1, i + 1, j + 2])
a[i][j + 1] += 1
for i in range(h - 1):
if a[i][w - 1] % 2... | replace | 4 | 5 | 4 | 5 | AttributeError: 'list' object attribute 'append' is read-only | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03263/Python/s852811802.py", line 5, in <module>
a.append = list(map(int, input().split()))
AttributeError: 'list' object attribute 'append' is read-only
|
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e18 + 7;
int H, W;
int a[505][505];
int go[2505][5];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> a[i][j];
}
}
in... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e18 + 7;
int H, W;
int a[505][505];
int go[300000][5];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> a[i][j];
}
}
... | replace | 7 | 8 | 7 | 8 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> i_i;
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define int ll
int h, w;
int a[250][251];
int cnt;
vector<int> ans[4];
signed main() {
cin >> h >> w;
for (int i = 0; i < h; i++) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> i_i;
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define int ll
int h, w;
int a[500][501];
int cnt;
vector<int> ans[4];
signed main() {
cin >> h >> w;
for (int i = 0; i < h; i++) {
... | replace | 11 | 12 | 11 | 12 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
vector<vector<int>> a(510, vector<int>(510));
int sum = 0;
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> a[i][j];
sum += a[i][j];
}
}
vector<vector<int>> ans;
for (int i = 0; ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
vector<vector<int>> a(510, vector<int>(510));
int sum = 0;
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> a[i][j];
sum += a[i][j];
}
}
vector<vector<int>> ans;
for (int i = 0; ... | replace | 39 | 40 | 39 | 40 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <chrono>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
using lli = long long int;
using Vint = std::vector<int>;
using Vlli = std::vector<lli>;
using Wint = std:... | #include <algorithm>
#include <chrono>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
using lli = long long int;
using Vint = std::vector<int>;
using Vlli = std::vector<lli>;
using Wint = std:... | replace | 124 | 125 | 124 | 125 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef l... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef l... | replace | 73 | 74 | 73 | 74 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
#define each(i, c) for (auto &i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
template <typename P, typename Q>
ostream &operator<<(ostream &os, pair<P, Q> p) {
os << "(" << p.first << ... | #include <bits/stdc++.h>
#define each(i, c) for (auto &i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
template <typename P, typename Q>
ostream &operator<<(ostream &os, pair<P, Q> p) {
os << "(" << p.first << ... | replace | 48 | 49 | 48 | 49 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using namespace boost::multiprecision;
typedef long long int ll;
typedef long double ld;
#define MOD 1000000007
#define ALL(obj) (obj).begin(), (obj).end()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using namespace boost::multiprecision;
typedef long long int ll;
typedef long double ld;
#define MOD 1000000007
#define ALL(obj) (obj).begin(), (obj).end()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | replace | 70 | 72 | 70 | 72 | 0 | |
p03263 | C++ | Runtime Error | #include <cstdio>
using namespace std;
int vv[505][505];
int v[50005][5];
int count = 0;
int main() {
int h, w;
scanf("%d%d", &h, &w);
for (int i = 1; i <= h; i++)
for (int j = 1; j <= w; j++)
scanf("%d", &vv[i][j]);
for (int i = 1; i <= h; i++)
for (int j = 1; j <= w; j++) {
if (vv[i][j] % ... | #include <cstdio>
using namespace std;
int vv[505][505];
int v[250005][5];
int count = 0;
int main() {
int h, w;
scanf("%d%d", &h, &w);
for (int i = 1; i <= h; i++)
for (int j = 1; j <= w; j++)
scanf("%d", &vv[i][j]);
for (int i = 1; i <= h; i++)
for (int j = 1; j <= w; j++) {
if (vv[i][j] %... | replace | 3 | 4 | 3 | 4 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e9 + 7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
int H, W;
cin >> H >> W;
vector<vector<int>> a(H, vector<int>(W));
vector<vector<int>> ans(H * W, vector<int>(4));
for (int i =... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e9 + 7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
int H, W;
cin >> H >> W;
vector<vector<int>> a(H, vector<int>(W));
vector<vector<int>> ans(H * W, vector<int>(4));
for (int i =... | replace | 42 | 43 | 42 | 43 | 0 | |
p03263 | C++ | Runtime Error | #include "iostream"
using namespace std;
int main() {
int h, w;
cin >> h >> w;
int a[510][510];
int check[30000][4];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> a[i][j];
}
}
int ans = 0;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w - 1; j++) {
if (... | #include "iostream"
using namespace std;
int main() {
int h, w;
cin >> h >> w;
int a[510][510];
int check[250250][4];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> a[i][j];
}
}
int ans = 0;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w - 1; j++) {
if ... | replace | 7 | 8 | 7 | 8 | 0 | |
p03263 | C++ | Runtime Error | // abc109_d.cpp
// Sun Apr 21 19:49:14 2019
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#define INTINF 2147483647
#define LLINF 9223372036854775807
using namespace std;
using ll = long long;
typed... | // abc109_d.cpp
// Sun Apr 21 19:49:14 2019
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#define INTINF 2147483647
#define LLINF 9223372036854775807
using namespace std;
using ll = long long;
typed... | replace | 55 | 59 | 55 | 59 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 250001;
int he, le, a[501][501] = {0}, i, j, q[maxn], w[maxn], e[maxn], r[maxn],
now = 0;
int main() {
cin >> he >> le;
for (i = 1; i <= he; i++) {
for (j = 1; j <= le; j++) {
cin >> a[i][j];
}
}
for (i = 1; i <= he; i++)... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 300001;
int he, le, a[501][501] = {0}, i, j, q[maxn], w[maxn], e[maxn], r[maxn],
now = 0;
int main() {
cin >> he >> le;
for (i = 1; i <= he; i++) {
for (j = 1; j <= le; j++) {
cin >> a[i][j];
}
}
for (i = 1; i <= he; i++)... | replace | 2 | 3 | 2 | 3 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define erep(i, n) for (int i = 0; i <= n; i++)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define erep1(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
#define vint vector<int>
#define vvint vector<vector<int>>
#de... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define erep(i, n) for (int i = 0; i <= n; i++)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define erep1(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
#define vint vector<int>
#define vvint vector<vector<int>>
#de... | replace | 25 | 26 | 25 | 26 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
using namespace std;
int main(void) {
int i, j, h, w, a[501][501], q[25000][2], p1, p2, p3, x, y, x1, y1;
int n, xy[25000][4];
scanf("%d %d", &h, &w);
for (i = 1; i <= h; i++) {
for (j = 1; j <= w; j++) {
scanf("%d", &a[i]... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
using namespace std;
int main(void) {
int i, j, h, w, a[501][501], q[250000][2], p1, p2, p3, x, y, x1, y1;
int n, xy[250000][4];
scanf("%d %d", &h, &w);
for (i = 1; i <= h; i++) {
for (j = 1; j <= w; j++) {
scanf("%d", &a[... | replace | 6 | 8 | 6 | 8 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w, a[50005], i, j, cnt = 0;
bool odd = false, t = false;
scanf("%d%d", &h, &w);
for (i = 0; i < h; i++)
for (j = 0; j < w; j++)
scanf("%d", &a[i * w + (i % 2 ? j : w - 1 - j)]);
for (i = 0; i < h * w; i++) {
if (odd)
cnt++;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w, a[250005], i, j, cnt = 0;
bool odd = false, t = false;
scanf("%d%d", &h, &w);
for (i = 0; i < h; i++)
for (j = 0; j < w; j++)
scanf("%d", &a[i * w + (i % 2 ? j : w - 1 - j)]);
for (i = 0; i < h * w; i++) {
if (odd)
cnt++... | replace | 4 | 5 | 4 | 5 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
const int maxn = 510;
int n, m;
int a[maxn][maxn], b[maxn][5];
int main() {
int ans = 0;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
scanf("%d", &a[i][j]);
for (int i = 1; i <= n; i++)... | #include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
const int maxn = 510;
int n, m;
int a[maxn][maxn], b[maxn * maxn][5];
int main() {
int ans = 0;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
scanf("%d", &a[i][j]);
for (int i = 1; i <= ... | replace | 6 | 7 | 6 | 7 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr int Inf = 1000000000;
constexpr ll INF = 1e18;
constexpr ll MOD = 1000000007;
const double PI = 3.1415926535897;
typedef pair<int, int> P;
int main() {
int H, W;
cin >> H >> W;
vector<vector<int>> vec(H, vector<int>(W));
for (int i =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr int Inf = 1000000000;
constexpr ll INF = 1e18;
constexpr ll MOD = 1000000007;
const double PI = 3.1415926535897;
typedef pair<int, int> P;
int main() {
int H, W;
cin >> H >> W;
vector<vector<int>> vec(H, vector<int>(W));
for (int i =... | replace | 29 | 30 | 29 | 30 | 0 | |
p03263 | Python | Runtime Error | import sys
sys.setrecursionlimit(10**6)
INF = float("inf")
MOD = 10**9 + 7
def input():
return sys.stdin.readline().strip()
def main():
H, W = map(int, input().split())
A = []
cnt = 0
for _ in range(H):
a = list(map(int, input().split()))
cnt += sum(a)
A.append(a)
a... | import sys
sys.setrecursionlimit(10**6)
INF = float("inf")
MOD = 10**9 + 7
def input():
return sys.stdin.readline().strip()
def main():
H, W = map(int, input().split())
A = []
cnt = 0
for _ in range(H):
a = list(map(int, input().split()))
cnt += sum(a)
A.append(a)
a... | replace | 27 | 28 | 27 | 28 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define VI vector<int>
#define VVI vector<vector<int>>
#define MOD 1000000007
using ll = long long int;
using P = pair<int, int>;
template <class T> ... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define VI vector<int>
#define VVI vector<vector<int>>
#define MOD 1000000007
using ll = long long int;
using P = pair<int, int>;
template <class T> ... | insert | 47 | 47 | 47 | 52 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int H, W;
bool used[500][500];
int coin[500][500];
int mov[250000][4];
int vecidx = 0;
pair<int, int> vec[4] = {make_pair(0, 1), make_pair(1, 0), make_pair(0, -1),
make_pair(-1, ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int H, W;
bool used[500][500];
int coin[500][500];
int mov[250000][4];
int vecidx = 0;
pair<int, int> vec[4] = {make_pair(0, 1), make_pair(1, 0), make_pair(0, -1),
make_pair(-1, ... | replace | 22 | 24 | 22 | 24 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> ... | #include <algorithm>
#include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> ... | replace | 84 | 87 | 84 | 87 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define PRINT(V) cout << V << "\n"
#define SORT(V... | #include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define PRINT(V) cout << V << "\n"
#define SORT(V... | replace | 44 | 45 | 44 | 45 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(n) for (int i = 0; i < n; i++)
#define repp(j, n) for (int j = 0; j < n; j++)
#define reppp(i, m, n) for (int i = m; i < n; i++)
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define debug(x) cerr << #x << ": " << x << endl
using namespace std;
typedef lo... | #include <bits/stdc++.h>
#define rep(n) for (int i = 0; i < n; i++)
#define repp(j, n) for (int j = 0; j < n; j++)
#define reppp(i, m, n) for (int i = m; i < n; i++)
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define debug(x) cerr << #x << ": " << x << endl
using namespace std;
typedef lo... | replace | 27 | 28 | 27 | 28 | 0 | |
p03263 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> a(h + 1, vector<int>(w + 1, 0));
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
cin >> a[i][j];
}
}
int count = 0;
int y_prev[25000] = {}, x_prev[25000] = {},... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> a(h + 1, vector<int>(w + 1, 0));
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
cin >> a[i][j];
}
}
int count = 0;
int y_prev[250000] = {}, x_prev[250000] = {... | replace | 15 | 17 | 15 | 17 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FOR(i, s, e) for (int i = (s); i < (e); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
int a[510][510];
int step[30000][4];
int ma... | #include <bits/stdc++.h>
#define FOR(i, s, e) for (int i = (s); i < (e); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
int a[510][510];
int step[250000][4];
int m... | replace | 11 | 12 | 11 | 12 | 0 | |
p03263 | Python | Runtime Error | def solve(string):
ins = string.split("\n")
h, w = map(int, ins[0].split(" "))
cells = [list(map(lambda x: int(x) % 2 == 1, _i.split(" "))) for _i in ins[1:]]
command = []
for i in range(h):
for j in range(w):
if cells[i][j]:
if j < w - 1:
cel... | h, w = map(int, input().split(" "))
a = [list(map(lambda x: int(x) % 2 == 1, input().split(" "))) for _i in range(h)]
move = []
for i in range(h):
for j in range(w):
if not a[i][j]:
continue
if j < w - 1:
a[i][j + 1] ^= True
move.append("{} {} {} {}".format(i + 1,... | replace | 0 | 52 | 0 | 15 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, s, e) for (int(i) = (s); (i) <= (e); (i)++)
#define rrep(i, s, e) for (int(i) = (s); (i) >= (e); (i)--)
int a[505][505];
vector<int> px;
vector<int> py;
vector<int> mx;
vector<int> my;
signed main() {
int h, w;
cin >> h >> w;
if... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, s, e) for (int(i) = (s); (i) <= (e); (i)++)
#define rrep(i, s, e) for (int(i) = (s); (i) >= (e); (i)--)
int a[505][505];
vector<int> px;
vector<int> py;
vector<int> mx;
vector<int> my;
signed main() {
int h, w;
cin >> h >> w;
if... | replace | 43 | 44 | 43 | 44 | 0 | |
p03263 | C++ | Runtime Error | #include <iostream>
using namespace std;
typedef long long ll;
#define rep(i, s, n) for (ll i = s; i < n; i++)
#define repe(i, s, n) for (ll i = s; i <= n; i++)
static const double PI = 3.1415926535897932384626433;
static const ll LL_MAX = (ll)1 << 62;
static const ll MOD = 1000000007;
ll y_1[100000];
ll x1[100000];
l... | #include <iostream>
using namespace std;
typedef long long ll;
#define rep(i, s, n) for (ll i = s; i < n; i++)
#define repe(i, s, n) for (ll i = s; i <= n; i++)
static const double PI = 3.1415926535897932384626433;
static const ll LL_MAX = (ll)1 << 62;
static const ll MOD = 1000000007;
ll y_1[300000];
ll x1[300000];
l... | replace | 9 | 13 | 9 | 13 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int map[501][501];
int ans[501][4];
typedef pair<int, int> P;
int N, H, W;
vector<P> odd_point;
int main() {
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> map[i][j];
}
}
vect... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int map[501][501];
int ans[250001][4];
typedef pair<int, int> P;
int N, H, W;
vector<P> odd_point;
int main() {
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> map[i][j];
}
}
v... | replace | 6 | 7 | 6 | 7 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
// created [2020/02/02] 21:33:37
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wsign-conversion"
using i32 = int32_t;
using i64 = int64_t;
using u32 = uint32_t;
using u64 = uint64_t;
using uint = unsigned int;
using usize = std::size_t;
using ll = long long;
... | #include <bits/stdc++.h>
// created [2020/02/02] 21:33:37
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wsign-conversion"
using i32 = int32_t;
using i64 = int64_t;
using u32 = uint32_t;
using u64 = uint64_t;
using uint = unsigned int;
using usize = std::size_t;
using ll = long long;
... | replace | 173 | 174 | 173 | 175 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int H, W;
int a[100000][4];
int main() {
cin >> H >> W;
int map[H][W];
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
cin >> map[i][j];
int s = 0, u = 0;
for (int i = 0; i < H; i++) {
if (i % 2 == 0) {
for (int j = 0; j < W; j++) {
... | #include <bits/stdc++.h>
using namespace std;
int H, W;
int a[1000000][4];
int main() {
cin >> H >> W;
int map[H][W];
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
cin >> map[i][j];
int s = 0, u = 0;
for (int i = 0; i < H; i++) {
if (i % 2 == 0) {
for (int j = 0; j < W; j++) {
... | replace | 4 | 5 | 4 | 5 | 0 | |
p03263 | C++ | Runtime Error | // Created by conan1024hao in 2019.
// Copyright © 2019 conan1024hao. All rights reserved.
// 専用ライブラリです、自由にコピーして構いません。
// 感谢看我的代码!Wechat:conan1024hao QQ:810396815
#pragma GCC optimize("O3")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctim... | // Created by conan1024hao in 2019.
// Copyright © 2019 conan1024hao. All rights reserved.
// 専用ライブラリです、自由にコピーして構いません。
// 感谢看我的代码!Wechat:conan1024hao QQ:810396815
#pragma GCC optimize("O3")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctim... | replace | 91 | 92 | 91 | 92 | 0 | |
p03263 | C++ | Runtime Error | #include <iostream>
using namespace std;
int AftermoveLogX[2600];
int AftermoveLogY[2600];
int BeforemoveLogX[2600];
int BeforemoveLogY[2600];
int main(void) {
int h, w;
int n = 0;
cin >> h >> w;
int a[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> a[i][j];
}
}
in... | #include <iostream>
using namespace std;
int AftermoveLogX[250000];
int AftermoveLogY[250000];
int BeforemoveLogX[250000];
int BeforemoveLogY[250000];
int main(void) {
int h, w;
int n = 0;
cin >> h >> w;
int a[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> a[i][j];
}
... | replace | 3 | 7 | 3 | 7 | 0 | |
p03263 | C++ | Runtime Error | #include <iostream>
using namespace std;
static const int MAX = 500;
static const int MAX_ANS = 2500;
bool a[MAX][MAX];
bool change(bool t) { return t ? false : true; }
int main(void) {
int h, w;
cin >> h >> w;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
int f;
cin >> f;
... | #include <iostream>
using namespace std;
static const int MAX = 500;
static const int MAX_ANS = 2e5 + 5;
bool a[MAX][MAX];
bool change(bool t) { return t ? false : true; }
int main(void) {
int h, w;
cin >> h >> w;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
int f;
cin >> f;
... | replace | 3 | 4 | 3 | 4 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, m, n) for (int i = (m); i < (n); i++)
#define rrep(i, m, n) for (int i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define print2(x, y) cout << (x) << " " << (y) << endl;
#define printa(x, n) \
for (int ... | #include <bits/stdc++.h>
#define rep(i, m, n) for (int i = (m); i < (n); i++)
#define rrep(i, m, n) for (int i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define print2(x, y) cout << (x) << " " << (y) << endl;
#define printa(x, n) \
for (int ... | replace | 33 | 34 | 33 | 34 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int INF = 1e9;
int grid[505][505];
int ans[25005][4];
int main() {
int h, w;
cin >> h >> w;
rep(i, h) rep(j, w) ci... | #include <algorithm>
#include <bits/stdc++.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int INF = 1e9;
int grid[505][505];
int ans[250005][4];
int main() {
int h, w;
cin >> h >> w;
rep(i, h) rep(j, w) c... | replace | 11 | 12 | 11 | 12 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> a(h, vector<int>(w));
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
cin >> a[i][j];
vector<int> x1, y1, x2, y2;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> a(h, vector<int>(w));
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
cin >> a[i][j];
vector<int> x1, y1, x2, y2;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
... | replace | 16 | 17 | 16 | 17 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define MX 505
using namespace std;
int arr[MX][MX];
int opr[MX * 4][4], num;
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
scanf("%d", &arr[i][j]);
for (int i = 1... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define MX 505
using namespace std;
int arr[MX][MX];
int opr[MX * MX][4], num;
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
scanf("%d", &arr[i][j]);
for (int i = ... | replace | 9 | 10 | 9 | 10 | 0 | |
p03263 | C++ | Runtime Error | // #include "bits/stdc++.h"
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <tuple>
#i... | // #include "bits/stdc++.h"
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <tuple>
#i... | replace | 118 | 121 | 118 | 122 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int a[510][510];
struct move {
int srx, sry, tx, ty;
} mv[2510];
int main() {
// freopen("matrix.in","r",stdin);
// freopen("matrix.out","w",stdout);
int n, m, k = 0, i, j, count = 0;
cin >> n >> m;
for (i = 1; i <= n; i++)
for (j = 1; j <= m; j++)
cin... | #include <bits/stdc++.h>
using namespace std;
int a[510][510];
struct move {
int srx, sry, tx, ty;
} mv[250010];
int main() {
// freopen("matrix.in","r",stdin);
// freopen("matrix.out","w",stdout);
int n, m, k = 0, i, j, count = 0;
cin >> n >> m;
for (i = 1; i <= n; i++)
for (j = 1; j <= m; j++)
c... | replace | 5 | 6 | 5 | 6 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
const ll MOD_CONST = 1000000007;
const ll BIG_NUM = 1000000000000000000;
int ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
const ll MOD_CONST = 1000000007;
const ll BIG_NUM = 1000000000000000000;
int ... | replace | 41 | 42 | 41 | 42 | 0 | |
p03263 | Python | Runtime Error | import sys
def input():
return sys.stdin.readline().strip()
sys.setrecursionlimit(20000000)
def main():
H, W = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]
answer = []
for h in range(H):
for w in range(W):
if A[h][w] % 2 == 0:
... | import sys
def input():
return sys.stdin.readline().strip()
sys.setrecursionlimit(20000000)
def main():
H, W = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]
answer = []
for h in range(H):
for w in range(W):
if A[h][w] % 2 == 0:
... | replace | 19 | 20 | 19 | 20 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<vector<int>> a(H + 1, vector<int>(W + 1)), ans;
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; j++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= H; i++) {
for (int j = 1; j < W; j++) {
i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<vector<int>> a(H + 1, vector<int>(W + 1)), ans;
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; j++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= H; i++) {
for (int j = 1; j < W; j++) {
i... | replace | 21 | 22 | 21 | 22 | 0 | |
p03263 | C++ | Runtime Error | // #define _GLIBCXX_DEBUG
#include <algorithm>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
// using Graph = vector<vector<pair<ll,ll>>>;
const int mod = 1e+9 + 7;
const int d... | // #define _GLIBCXX_DEBUG
#include <algorithm>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
// using Graph = vector<vector<pair<ll,ll>>>;
const int mod = 1e+9 + 7;
const int d... | replace | 52 | 53 | 52 | 53 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sta... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sta... | replace | 187 | 188 | 187 | 188 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vec... | #include <algorithm>
#include <cassert>
#include <climits>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vec... | replace | 69 | 70 | 69 | 70 | 0 | sh: 1: pause: not found
|
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_... | replace | 27 | 28 | 27 | 28 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_... | replace | 16 | 17 | 16 | 17 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int h, w, bor[510][510], cnt = 0, v[26000][4];
cin >> h >> w;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++)
cin >> bor[i][j... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int h, w, bor[510][510], cnt = 0, v[260000][4];
cin >> h >> w;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++)
cin >> bor[i][... | replace | 11 | 12 | 11 | 12 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int MOD = 1e9 + 7;
ll INF = 1e18;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int main() {
int h, w;
cin >> h >> w;
int a[510][510];
bool visited[510][510];
for (int i = 1; i <= h; i++) {
for (int j =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int MOD = 1e9 + 7;
ll INF = 1e18;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int main() {
int h, w;
cin >> h >> w;
int a[510][510];
bool visited[510][510];
for (int i = 1; i <= h; i++) {
for (int j =... | replace | 34 | 35 | 34 | 35 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cinttypes>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
#define countof(a) (sizeof(a) / sizeof(*a))
#define vi vector<int>
#define vvi vector<vector<int>>
#define vpi vector<pi>
#define ... | #include <bits/stdc++.h>
#include <cinttypes>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
#define countof(a) (sizeof(a) / sizeof(*a))
#define vi vector<int>
#define vvi vector<vector<int>>
#define vpi vector<pi>
#define ... | insert | 166 | 166 | 166 | 168 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
/*
*/
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll func2(ll n) {
ll res = 0;
while (n % 2 == 0) {
n /= 2;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
/*
*/
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll func2(ll n) {
ll res = 0;
while (n % 2 == 0) {
n /= 2;
... | replace | 107 | 108 | 107 | 111 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> a(h, vector<int>(w));
vector<vector<int>> b(h, vector<int>(w));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
int x;
cin >> x;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> a(h + 1, vector<int>(w + 1));
vector<vector<int>> b(h + 1, vector<int>(w + 1));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
int x;... | replace | 8 | 10 | 8 | 10 | 0 | |
p03263 | C++ | Runtime Error | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a[505][505];
int H, W;
vector<string> ans;
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> a[i][j];
}
}
int x = 0, y = 0;
int dx = 1;
while (true) {
i... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a[505][505];
int H, W;
vector<string> ans;
cin >> H >> W;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> a[i][j];
}
}
int x = 0, y = 0;
int dx = 1;
while (true) {
i... | insert | 25 | 25 | 25 | 26 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
//-... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
//-... | replace | 92 | 93 | 92 | 93 | 0 | |
p03263 | Python | Runtime Error | from functools import partial
from itertools import islice
def take(n, iterable):
return list(islice(iterable, n))
def chunked(iterable, n):
return iter(partial(take, n, iter(iterable)), [])
def solve(s):
h, w, *a = map(int, s.split())
(*a,) = chunked(a, w)
ans = []
for i in range(h):
... | from functools import partial
from itertools import islice
def take(n, iterable):
return list(islice(iterable, n))
def chunked(iterable, n):
return iter(partial(take, n, iter(iterable)), [])
def solve(s):
h, w, *a = map(int, s.split())
(*a,) = chunked(a, w)
ans = []
for i in range(h):
... | replace | 25 | 27 | 25 | 26 | TypeError: can only concatenate str (not "list") to str | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03263/Python/s379988073.py", line 31, in <module>
print(solve('{} {}\n'.format(n, m) + '\n'.join([input() for _ in range(n)])))
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03263/Pytho... |
p03263 | C++ | Runtime Error | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int A[510][510];
int B[25100][4];
int main() {
int h, w;
cin >> h >> w;
int x;
rep(i, h) {
rep(j, w) {
cin >> x;
A[i + 1][j + 1] = x % 2;... | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int A[510][510];
int B[251000][4];
int main() {
int h, w;
cin >> h >> w;
int x;
rep(i, h) {
rep(j, w) {
cin >> x;
A[i + 1][j + 1] = x % 2... | replace | 8 | 9 | 8 | 9 | 0 | |
p03263 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
/* include ***********************/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* define *************************/
// for
#define REP(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define REPS(i, n) for (int i = 1, i##_len = (int)(n); i ... | #define _CRT_SECURE_NO_WARNINGS
/* include ***********************/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* define *************************/
// for
#define REP(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define REPS(i, n) for (int i = 1, i##_len = (int)(n); i ... | replace | 30 | 31 | 30 | 31 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repc(i, s, n) for (int i = (s); i <= (n); i++)
#d... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repc(i, s, n) for (int i = (s); i <= (n); i++)
#d... | replace | 54 | 55 | 54 | 55 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int Matriz[505][505];
int Resultados[505][4];
int main() {
int H, W;
int aux;
scanf("%d %d", &H, &W);
for (int i = 0; i < H; ++i) {
for (int j = 0; j < W; ++j) {
scanf("%d", &aux);
Matriz[i][j] = aux;
}
}
int contador = 0;
for (int i = 0;... | #include <bits/stdc++.h>
using namespace std;
int Matriz[505][505];
int Resultados[250005][4];
int main() {
int H, W;
int aux;
scanf("%d %d", &H, &W);
for (int i = 0; i < H; ++i) {
for (int j = 0; j < W; ++j) {
scanf("%d", &aux);
Matriz[i][j] = aux;
}
}
int contador = 0;
for (int i =... | replace | 4 | 5 | 4 | 5 | 0 | |
p03263 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <unordered_map>
#incl... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <unordered_map>
#incl... | replace | 193 | 196 | 193 | 196 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct Edge {
int to; // 辺の行き先
int weight; // 辺の重み
Edge(int t, int w) : to(t), weight(w) {}
};
using Graph = vector<vector<Edge>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reprep(i, j, h, w) rep(i, h) rep(j, w)
#define rrep(i, m, n) for (int i ... | #include <bits/stdc++.h>
using namespace std;
struct Edge {
int to; // 辺の行き先
int weight; // 辺の重み
Edge(int t, int w) : to(t), weight(w) {}
};
using Graph = vector<vector<Edge>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reprep(i, j, h, w) rep(i, h) rep(j, w)
#define rrep(i, m, n) for (int i ... | replace | 48 | 49 | 48 | 49 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
const int MOD = 1e9 + 7;
signed main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int H, W;
cin >> H >> W;
int A[H][W];
rep(i, H) {
rep(j, W) { cin >> A[i][j]; }
}
int ans... | #include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
const int MOD = 1e9 + 7;
signed main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int H, W;
cin >> H >> W;
int A[H][W];
rep(i, H) {
rep(j, W) { cin >> A[i][j]; }
}
int ans... | replace | 17 | 18 | 17 | 18 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define a first
#define b second
#define mp make_pair
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep1(i, n) for (ll i = 1; i <= n; i++)
ll H, W;
P change(ll x) {
P p;
if (((x + W - 1) / W) % 2 == 1)
p = mp((x ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define a first
#define b second
#define mp make_pair
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep1(i, n) for (ll i = 1; i <= n; i++)
ll H, W;
P change(ll x) {
P p;
if (((x + W - 1) / W) % 2 == 1)
p = mp((x ... | replace | 16 | 17 | 16 | 17 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
using ll = long long;
using P = pair<int, int>;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> A(h, vector<i... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
using ll = long long;
using P = pair<int, int>;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> A(h, vector<i... | replace | 24 | 25 | 24 | 25 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int main() {
int x1[maxn], x2[maxn];
int y1[maxn], y2[maxn];
int h, w, a[500][500], i, j, n = 0;
scanf("%d%d", &h, &w);
for (i = 1; i <= h; i++) {
for (j = 1; j <= w; j++)
scanf("%d", &a[i][j]);
}
for (i = 1; i <= h; i++) {... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int main() {
int x1[maxn], x2[maxn];
int y1[maxn], y2[maxn];
int h, w, a[550][550], i, j, n = 0;
scanf("%d%d", &h, &w);
for (i = 1; i <= h; i++) {
for (j = 1; j <= w; j++)
scanf("%d", &a[i][j]);
}
for (i = 1; i <= h; i++) {... | replace | 7 | 8 | 7 | 8 | 0 | |
p03263 | C++ | Runtime Error | #include <bits/stdc++.h>
#define dum(x) cout << #x << '=' << x << endl
#define ll long long
using namespace std;
bool check(int x) {
if (x % 2 == 0) {
return true;
} else {
return false;
}
}
int main() {
int h, w;
cin >> h >> w;
int v[h][w];
for (int i = 0; i < h; ++i) {
for (int j = 0; j <... | #include <bits/stdc++.h>
#define dum(x) cout << #x << '=' << x << endl
#define ll long long
using namespace std;
bool check(int x) {
if (x % 2 == 0) {
return true;
} else {
return false;
}
}
int main() {
int h, w;
cin >> h >> w;
int v[h][w];
for (int i = 0; i < h; ++i) {
for (int j = 0; j <... | replace | 25 | 27 | 25 | 27 | 0 | |
p03263 | C++ | Runtime Error | #pragma GCC optimize("O3")
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
using QWORD = unsigned long long;
using SQWORD = long long;
using DWORD = unsigned int;
using SDWORD = int;
using WORD = unsigned short;
using SWORD = short;
using DOUBLE = double;
using FLOA... | #pragma GCC optimize("O3")
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
using QWORD = unsigned long long;
using SQWORD = long long;
using DWORD = unsigned int;
using SDWORD = int;
using WORD = unsigned short;
using SWORD = short;
using DOUBLE = double;
using FLOA... | replace | 93 | 101 | 93 | 103 | 0 | |
p03263 | C++ | Runtime Error | #include <iostream>
#include <stdio.h>
// #include <bits/stdc++.h>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <float.h>
#include <iomanip>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
... | #include <iostream>
#include <stdio.h>
// #include <bits/stdc++.h>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <float.h>
#include <iomanip>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
... | replace | 54 | 55 | 54 | 55 | 0 | |
p03263 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
ld EPS = 1e-12;
int INF = numeric_limits<int>::max() / 2;
int MOD = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(obj) (obj).begin(... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
ld EPS = 1e-12;
int INF = numeric_limits<int>::max() / 2;
int MOD = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(obj) (obj).begin(... | replace | 26 | 27 | 26 | 27 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.