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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
#ifdef HIRO
#define d(f_, ...) printf((f_), ##__VA_ARGS__)
#else
#define d(f_, ...)
#endif
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pllll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vec... | #include <bits/stdc++.h>
#ifdef HIRO
#define d(f_, ...) printf((f_), ##__VA_ARGS__)
#else
#define d(f_, ...)
#endif
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pllll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vec... | replace | 95 | 96 | 95 | 96 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
long n;
cin >> n;
long res = 0;
for (long i = 1; i * i <= n; ++i) {
if ((n - i) % i > 0)
continue;
auto m = (n - i) / i;
if (n / m == n % m)
res += m;
}
cout << res << endl;
}
| #include <algorithm>
#include <iostream>
using namespace std;
int main() {
long n;
cin >> n;
long res = 0;
for (long i = 1; i * i <= n; ++i) {
if ((n - i) % i > 0)
continue;
auto m = (n - i) / i;
if (m > 0 and n / m == n % m)
res += m;
}
cout << res << endl;
}
| replace | 12 | 13 | 12 | 13 | 0 | |
p03050 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define RREP(i, n) for (int i = n - 1; i >= 0; i--)
#define ALL(v) v.beg... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define RREP(i, n) for (int i = n - 1; i >= 0; i--)
#define ALL(v) v.beg... | replace | 60 | 61 | 60 | 61 | 0 | |
p03050 | C++ | Runtime Error | #include <cmath>
#include <iostream>
using namespace std;
typedef long long ll;
int main(void) {
ll n, m, ans = 0;
cin >> n;
for (ll k = 1; k < sqrt(n) + 1; k++) {
if (n % k == 0) {
m = n / k - 1;
if (n % m == k)
ans += m;
}
}
cout << ans << endl;
return 0;
} | #include <cmath>
#include <iostream>
using namespace std;
typedef long long ll;
int main(void) {
ll n, m, ans = 0;
cin >> n;
for (ll k = 1; k < sqrt(n) + 1; k++) {
if (n % k == 0) {
m = n / k - 1;
if (m > 0 && n % m == k)
ans += m;
}
}
cout << ans << endl;
return 0;
}
| replace | 11 | 12 | 11 | 12 | 0 | |
p03050 | C++ | Runtime Error | #pragma region
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef ... | #pragma region
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef ... | replace | 96 | 97 | 96 | 98 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
using Graph = vector<vector<int>>;
signed main() {
int N;
cin >> N;
int ans = 0;
for (int i = 1; i <= sqrt(N); i++) {
if (N % i == 0) {
int A = N / i - 1;
int B = N / A;
if (B == N % A)
ans += A;
if (i == ... | #include <bits/stdc++.h>
#define int long long
using namespace std;
using Graph = vector<vector<int>>;
signed main() {
int N;
cin >> N;
int ans = 0;
for (int i = 1; i <= sqrt(N); i++) {
if (N % i == 0) {
int A = N / i - 1;
if (A == 0)
continue;
int B = N / A;
if (B == N % ... | insert | 14 | 14 | 14 | 16 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define MOD 1000000007
#define el endl
#define INF 1e8
typedef long long ll;
typedef long double ld;
int main() {
ll n;
cin >> n;
ll ans = 0;
for (ll k = 1; k * k <= n; k++) {
if (n % k == 0) {
ll m = (n / k... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define MOD 1000000007
#define el endl
#define INF 1e8
typedef long long ll;
typedef long double ld;
int main() {
ll n;
cin >> n;
ll ans = 0;
for (ll k = 1; k * k < n; k++) {
if (n % k == 0) {
ll m = (n / k)... | replace | 15 | 16 | 15 | 16 | 0 | |
p03050 | C++ | Runtime Error | #include <iostream>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(0);
ll N;
cin >> N;
ll odp = 0;
for (ll d1 = 1; d1 * d1 <= N; ++d1) {
if (N % d1 == 0) {
ll d2 = N / d1 - 1;
if (N / d2 == N % d2)
odp += d2;
if (d1 * d1 != N)
if (d1 ... | #include <iostream>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(0);
ll N;
cin >> N;
ll odp = 0;
for (ll d1 = 1; d1 * d1 <= N; ++d1) {
if (N % d1 == 0) {
ll d2 = N / d1 - 1;
if (d2 != 0 && N / d2 == N % d2)
odp += d2;
if (d1 * d1 != N)
... | replace | 14 | 15 | 14 | 15 | 0 | |
p03050 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long ones[2000001];
int now;
void it(long long x) {
for (long long i = 2; i * i <= x; i++) {
if (x % i == 0) {
if (i * i != x)
ones[now++] = i, ones[now++] = x / i;
else
ones[now++] = i;
}
}
}
long long cnt;
int main() {
long l... | #include <bits/stdc++.h>
using namespace std;
long long ones[2000001];
int now;
void it(long long x) {
for (long long i = 2; i * i <= x; i++) {
if (x % i == 0) {
if (i * i != x)
ones[now++] = i, ones[now++] = x / i;
else
ones[now++] = i;
}
}
}
long long cnt;
int main() {
long l... | replace | 21 | 22 | 21 | 22 | 0 | |
p03050 | Python | Runtime Error | import math
N = int(input())
ans = 0
for i in range(1, math.ceil(math.sqrt(N)) + 1):
if N % i:
continue
n = N // i - 1
if N % n == N // n:
ans += n
print(ans)
| import math
N = int(input())
ans = 0
for i in range(1, math.ceil(math.sqrt(N)) + 1):
if N % i:
continue
n = N // i - 1
if n and N % n == N // n:
ans += n
print(ans)
| replace | 8 | 9 | 8 | 9 | 0 | |
p03051 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
// #include "boost/multiprecision/cpp_int.hpp"
// typedef boost::multiprecision::cpp_int LL;
typedef long double dd;
#define i_7 (ll)(1E9 + 7)
// #define i_7 998244353
#define i_5 i_7 - 2
ll mod(ll a) {
ll c = a % i_7;
... | #include <bits/stdc++.h>
// #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
// #include "boost/multiprecision/cpp_int.hpp"
// typedef boost::multiprecision::cpp_int LL;
typedef long double dd;
#define i_7 (ll)(1E9 + 7)
// #define i_7 998244353
#define i_5 i_7 - 2
ll mod(ll a) {
ll c = a % i_7;
... | replace | 70 | 72 | 70 | 72 | 0 | |
p03051 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int M = int(1e9 + 7);
signed main() {
ios::sync_with_stdio(false);
int N;
cin >> N;
vector<int> A(N);
for (int i = 0; i < N; ++i)
cin >> A[i];
vector<int> pre(N + 1);
{
for (int i = 0; i < N; ++i) {
pre[i + 1] = pre[i] ^ A[i];
}
... | #include <bits/stdc++.h>
using namespace std;
const int M = int(1e9 + 7);
signed main() {
ios::sync_with_stdio(false);
int N;
cin >> N;
vector<int> A(N);
for (int i = 0; i < N; ++i)
cin >> A[i];
vector<int> pre(N + 1);
{
for (int i = 0; i < N; ++i) {
pre[i + 1] = pre[i] ^ A[i];
}
... | replace | 21 | 24 | 21 | 22 | TLE | |
p03051 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ADD(a, b) a = (a + ll(b)) % mod
#define MUL(a, b) a = (a * ll(b)) % mod
#define MAX(a, b) a = max(a, b)
#define MIN(a, b) a = min(a, b)
#define rep(i, a, b) for (int i = int(a); i < int(b); i++)
#define rer(i, a, b) for (int i = int(a) - 1; i >= int(b); i--)
#define all(a) (a).begin(), ... | #include <bits/stdc++.h>
#define ADD(a, b) a = (a + ll(b)) % mod
#define MUL(a, b) a = (a * ll(b)) % mod
#define MAX(a, b) a = max(a, b)
#define MIN(a, b) a = min(a, b)
#define rep(i, a, b) for (int i = int(a); i < int(b); i++)
#define rer(i, a, b) for (int i = int(a) - 1; i >= int(b); i--)
#define all(a) (a).begin(), ... | replace | 42 | 43 | 42 | 43 | 0 | Time elapsed: 0.087168 s.
|
p03051 | C++ | Runtime Error | #include <bits/stdc++.h>
#define PII pair<int, int>
#define LL long long
using namespace std;
const int MAXN = 500005;
const LL INF = (LL)1e9 + 5;
const LL MOD = 1000000007;
LL N, a[MAXN], sum[MAXN], dp[MAXN], ans;
LL dp_sum[1 << 20], cntz[MAXN], pre[MAXN];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
... | #include <bits/stdc++.h>
#define PII pair<int, int>
#define LL long long
using namespace std;
const int MAXN = 500005;
const LL INF = (LL)1e9 + 5;
const LL MOD = 1000000007;
LL N, a[MAXN], sum[MAXN], dp[MAXN], ans;
LL dp_sum[1 << 20], cntz[MAXN], pre[1 << 20];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0)... | replace | 9 | 10 | 9 | 10 | 0 | |
p03051 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// #define FILE_IO
const int VMAX = (1 << 20) + 5;
const int NMAX = 5e2 + 5;
const int mod = 1e9 + 7;
int N;
int v[NMAX], sum[NMAX], dp[NMAX], cnt0[NMAX];
int sumdp[VMAX], sumdpcnt[VMAX];
vector<int> pos[VMAX];
int power(int x, int y) {
if (x == 0)
return 0;
if... | #include <bits/stdc++.h>
using namespace std;
// #define FILE_IO
const int VMAX = (1 << 20) + 5;
const int NMAX = 5e5 + 5;
const int mod = 1e9 + 7;
int N;
int v[NMAX], sum[NMAX], dp[NMAX], cnt0[NMAX];
int sumdp[VMAX], sumdpcnt[VMAX];
vector<int> pos[VMAX];
int power(int x, int y) {
if (x == 0)
return 0;
if... | replace | 7 | 8 | 7 | 8 | 0 | |
p03051 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <math.h>
#inclu... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <math.h>
#inclu... | replace | 83 | 84 | 83 | 93 | -6 | e082ea97-66f2-4a60-b7bf-480b17d215af.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03051/C++/s894172899.cpp:88: int main(): Assertion `0 == 1' failed.
|
p03051 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstdint>
#include <deque>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef lo... | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstdint>
#include <deque>
#include <iomanip>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef lo... | replace | 201 | 202 | 201 | 202 | 0 | |
p03051 | C++ | Runtime Error | #include <iostream>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
int a[500005];
ll dp1[2100000];
ll dp2[2100000];
ll s[500005];
ll last[500005];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
ll x = 0;
for (int i = 0; i < 2100000; i++)
dp2[i] = 1;
... | #include <iostream>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
int a[500005];
ll dp1[2100000];
ll dp2[2100000];
ll s[500005];
ll last[2100000];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
ll x = 0;
for (int i = 0; i < 2100000; i++)
dp2[i] = 1;
... | replace | 10 | 11 | 10 | 11 | 0 | |
p03051 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <tr1/unordered_map>
#define ll long long
#define maxn 100010
#define maxa (1 << 21)
#define mod 1000000007
using namespace std;
using namespace tr1;
inline int getint() {
char c = getchar();
int x = 0;
bool p = 0;
while ((c >... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <tr1/unordered_map>
#define ll long long
#define maxn 500050
#define maxa (1 << 21)
#define mod 1000000007
using namespace std;
using namespace tr1;
inline int getint() {
char c = getchar();
int x = 0;
bool p = 0;
while ((c >... | replace | 6 | 7 | 6 | 7 | -11 | |
p03051 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define ll long long
#define MOD 1000000007
int n;
int a[500001];
int b[500002];
int zerob[500003];
vector<int> xat[1 << 20];
map<... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define ll long long
#define MOD 1000000007
int n;
int a[500001];
int b[500002];
int zerob[500003];
vector<int> xat[1 << 20];
map<... | delete | 55 | 57 | 55 | 55 | 1 | |
p03051 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MN 1001000
#define MOD 1000000007
using namespace std;
typedef long long ll;
ll n, ans, a[MN], txor, ac[MN], dp[MN], adp[MN];
vector<int> occ[MN];
ll zs(int l, int r) {
int L = lower_bound(occ[0].begin(), occ[0].end(), l) - occ[0].begin();
int R = lower_bound(occ[0].begin(), occ... | #include <bits/stdc++.h>
#define MN 2001000
#define MOD 1000000007
using namespace std;
typedef long long ll;
ll n, ans, a[MN], txor, ac[MN], dp[MN], adp[MN];
vector<int> occ[MN];
ll zs(int l, int r) {
int L = lower_bound(occ[0].begin(), occ[0].end(), l) - occ[0].begin();
int R = lower_bound(occ[0].begin(), occ... | replace | 2 | 3 | 2 | 3 | 0 | |
p03051 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int add(int x, int y) {
x += y;
if (x >= mod)
x -= mod;
return x;
}
int sub(int x, int y) {
x -= y;
if (x < 0)
x += mod;
return x;
}
int mul(int x, int y) { return (x * 1LL * y) % mod; }
int n;
int arr[500005];
int sum[500005];
... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int add(int x, int y) {
x += y;
if (x >= mod)
x -= mod;
return x;
}
int sub(int x, int y) {
x -= y;
if (x < 0)
x += mod;
return x;
}
int mul(int x, int y) { return (x * 1LL * y) % mod; }
int n;
int arr[500005];
int sum[500005];
... | replace | 21 | 23 | 21 | 23 | 0 | |
p03051 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
// std::vector Declaration
t... | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
// std::vector Declaration
t... | replace | 285 | 286 | 285 | 286 | 0 | |
p03051 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
#define fo(i, j, l) for (int i = j; i <= l; ++i)
#define fd(i, j, l) for (int i = j; i >= l; --i)
using namespace std;
typedef long long ll;
const ll N = 12e4, mo = 1e9 + 7;
int a[N], n, b[N], c[N], d[N];... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
#define fo(i, j, l) for (int i = j; i <= l; ++i)
#define fd(i, j, l) for (int i = j; i >= l; --i)
using namespace std;
typedef long long ll;
const ll N = 12e5, mo = 1e9 + 7;
int a[N], n, b[N], c[N], d[N];... | replace | 12 | 13 | 12 | 13 | 0 | |
p03052 | C++ | Runtime Error | #include <bits/stdc++.h>
#define mod 1000000007
#define mk make_pair
#define ll long long
#define fi first
#define se second
#define pb push_back
using namespace std;
const int N = 21, M = 410;
int n, m, T, S, cnt[1 << N], mul[M][M], e[1 << N];
typedef pair<int, int> pii;
pii dp[1 << N];
vector<pii> G[N];
void inc(int ... | #include <bits/stdc++.h>
#define mod 1000000007
#define mk make_pair
#define ll long long
#define fi first
#define se second
#define pb push_back
using namespace std;
const int N = 21, M = 410;
int n, m, T, S, cnt[1 << N], mul[M][M], e[1 << N];
typedef pair<int, int> pii;
pii dp[1 << N];
vector<pii> G[N];
void inc(int ... | replace | 34 | 36 | 34 | 36 | -11 | |
p03052 | C++ | Time Limit Exceeded | #pragma GCC target("avx") // CPU 処理並列化
#pragma GCC optimize("O3") // CPU 処理並列化
#pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす
// #define BEGIN_STACK_EXTEND(size) void * stack_extend_memory_ =
// malloc(size);void * stack_extend_origin_memory_;char *
// stack_extend_dummy_memory_ = (char*)all... | #pragma GCC target("avx") // CPU 処理並列化
#pragma GCC optimize("O3") // CPU 処理並列化
#pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす
// #define BEGIN_STACK_EXTEND(size) void * stack_extend_memory_ =
// malloc(size);void * stack_extend_origin_memory_;char *
// stack_extend_dummy_memory_ = (char*)all... | replace | 180 | 182 | 180 | 184 | TLE | |
p03052 | C++ | Runtime Error | #include <bits/stdc++.h>
#define debug(...) fprintf(stderr, __VA_ARGS__)
#ifndef AT_HOME
#define getchar() IO::myGetchar()
#define putchar(x) IO::myPutchar(x)
#endif
namespace IO {
static const int IN_BUF = 1 << 23, OUT_BUF = 1 << 23;
inline char myGetchar() {
static char buf[IN_BUF], *ps = buf, *pt = buf;
if (... | #include <bits/stdc++.h>
#define debug(...) fprintf(stderr, __VA_ARGS__)
#ifndef AT_HOME
#define getchar() IO::myGetchar()
#define putchar(x) IO::myPutchar(x)
#endif
namespace IO {
static const int IN_BUF = 1 << 23, OUT_BUF = 1 << 23;
inline char myGetchar() {
static char buf[IN_BUF], *ps = buf, *pt = buf;
if (... | replace | 104 | 105 | 104 | 105 | 0 | |
p03052 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, x, y) for (int i = (x); i <= (y); i++)
#define ll long long
using namespace std;
const int N = 25, M = (1 << 20) + 10, mod = 1e9 + 7;
int n, m, len, a[M], cnt, head[N], x, y, val[N], f[2][M], g[2][M];
struct edge {
int to, nxt, i;
} e[N * N];
inline void upd(int &x, int y) {... | #include <bits/stdc++.h>
#define rep(i, x, y) for (int i = (x); i <= (y); i++)
#define ll long long
using namespace std;
const int N = 25, M = (1 << 20) + 10, mod = 1e9 + 7;
int n, m, len, a[M], cnt, head[N], x, y, val[N], f[2][M], g[2][M];
struct edge {
int to, nxt, i;
} e[N * N];
inline void upd(int &x, int y) {... | replace | 50 | 53 | 50 | 57 | TLE | |
p03052 | C++ | Runtime Error | /* cerberus97 - Hanit Banga */
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define pb push_back
#define fa... | /* cerberus97 - Hanit Banga */
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define pb push_back
#define fa... | replace | 32 | 33 | 32 | 33 | 0 | |
p03053 | C++ | Time Limit Exceeded | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define lfs cout << fixed << setprecision(10)
#define ALL(a) (a).begin(), (a).end()
#define ALLR(a) (a).rbegin(), (a).rend()
#define spa << " " <<
#define fi first
#define se second
#define MP make_pair
#define MT make_tuple
#de... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define lfs cout << fixed << setprecision(10)
#define ALL(a) (a).begin(), (a).end()
#define ALLR(a) (a).rbegin(), (a).rend()
#define spa << " " <<
#define fi first
#define se second
#define MP make_pair
#define MT make_tuple
#de... | replace | 143 | 144 | 143 | 149 | TLE | |
p03053 | C++ | Runtime Error | #include <cassert>
#include <climits>
#include <cstdio>
#include <queue>
#include <vector>
using namespace std;
class Point {
public:
int x;
int y;
int v;
Point(int _x, int _y, int _v) {
x = _x;
y = _y;
v = _v;
}
Point(const Point &p) {
x = p.x;
y = p.y;
v = p.v;
}
};
int main()... | #include <cassert>
#include <climits>
#include <cstdio>
#include <queue>
#include <vector>
using namespace std;
class Point {
public:
int x;
int y;
int v;
Point(int _x, int _y, int _v) {
x = _x;
y = _y;
v = _v;
}
Point(const Point &p) {
x = p.x;
y = p.y;
v = p.v;
}
};
int main()... | replace | 31 | 32 | 31 | 32 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int h, w;
cin >> h >> w;
vector<vector<char>> hw(h, vector<char>(w));
int reach_cnt[h][w];
queue<pair<int, int>> que;
rep(i, h) rep(j, w) {
cin >> hw[i][j];... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int h, w;
cin >> h >> w;
vector<vector<char>> hw(h, vector<char>(w));
int reach_cnt[h][w];
queue<pair<int, int>> que;
rep(i, h) rep(j, w) {
cin >> hw[i][j];... | replace | 45 | 58 | 45 | 57 | TLE | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<vector<int>> data;
queue<pair<int, int>> que;
vector<pair<int, int>> diff;
diff.emplace_back(0, 1);
diff.emplace_back(1, 0);
diff.emplace_back(0, -1);
diff.emplace_back(-1, 0);
for (int i = 0; i < H; i++) {... | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<vector<int>> data(H, vector<int>(W, -1));
queue<pair<int, int>> que;
vector<pair<int, int>> diff;
diff.emplace_back(0, 1);
diff.emplace_back(1, 0);
diff.emplace_back(0, -1);
diff.emplace_back(-1, 0);
for (... | replace | 6 | 7 | 6 | 8 | -11 | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define MOD 1000000007
using namespace std;
typedef long long int ll;
const ll INF = (ll)1e18;
int dx... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define MOD 1000000007
using namespace std;
typedef long long int ll;
const ll INF = (ll)1e18;
int dx... | replace | 48 | 49 | 48 | 49 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define _repargs(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#defi... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define _repargs(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#defi... | insert | 63 | 63 | 63 | 64 | TLE | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
#define int ll
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<vvc> vvvc;
typedef pair<int, int> pii;
typedef pair<pii, pii> piii;
typedef pair<ll, ll> pll;
typedef ... | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
#define int ll
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<vvc> vvvc;
typedef pair<int, int> pii;
typedef pair<pii, pii> piii;
typedef pair<ll, ll> pll;
typedef ... | replace | 107 | 108 | 107 | 108 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long
#define mp make_pair
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long
#define mp make_pair
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | replace | 65 | 66 | 65 | 66 | TLE | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
int main() {
int h, w;
cin >> h >> w;
vector<string> a(h);
for (auto &e : a)
cin >> e;
vector<vector<int>> d(h, vector<int>(w, 1e9));
queue<pair<int, int>> q;
for (int i = 0; i < h; i++) {
... | #include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
int main() {
int h, w;
cin >> h >> w;
vector<string> a(h);
for (auto &e : a)
cin >> e;
vector<vector<int>> d(h, vector<int>(w, 1e9));
queue<pair<int, int>> q;
for (int i = 0; i < h; i++) {
... | replace | 30 | 31 | 30 | 31 | TLE | |
p03053 | C++ | Runtime Error | // #includes {{{
#ifdef MY_DEBUG
#include "header/header.hpp"
#else
#include <bits/stdc++.h>
#endif
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define RREP(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define FOR(i, c) \... | // #includes {{{
#ifdef MY_DEBUG
#include "header/header.hpp"
#else
#include <bits/stdc++.h>
#endif
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define RREP(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define FOR(i, c) \... | replace | 95 | 97 | 95 | 97 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int H, W;
queue<pair<int, int>> search;
cin >> H >> W;
int a[1010][1010]; // 距離
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
char tmp;
cin >> tmp;
if (tmp == '#') {
a[i][j] = 0;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int H, W;
queue<pair<int, int>> search;
cin >> H >> W;
int a[1010][1010]; // 距離
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
char tmp;
cin >> tmp;
if (tmp == '#') {
a[i][j] = 0;
... | replace | 28 | 29 | 28 | 29 | TLE | |
p03053 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string... | replace | 47 | 48 | 47 | 48 | TLE | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (b); i >= (a); i--)
#define pb push_back
#define mp make_pair
#define b... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (b); i >= (a); i--)
#define pb push_back
#define mp make_pair
#define b... | replace | 46 | 47 | 46 | 47 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
int ans = 0;
cin >> h >> w;
char a[h][w];
queue<pair<int, int>> q;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> a[i][j];
if (a[i][j] == '#') {
q.push(pair<int, int>(i, j));
}
}
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
int ans = 0;
cin >> h >> w;
char a[h][w];
queue<pair<int, int>> q;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> a[i][j];
if (a[i][j] == '#') {
q.push(pair<int, int>(i, j));
}
}
}
... | replace | 27 | 28 | 27 | 29 | TLE | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <queue>
#include <vector>
using namespace std;
#define INF 10000000
#define MOD 1000000007
typedef long long ll;
typedef pair<int, pair<int, int>> P;
int H, W, ans = 0;
char C[60][60];
int dx[4] =... | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <queue>
#include <vector>
using namespace std;
#define INF 10000000
#define MOD 1000000007
typedef long long ll;
typedef pair<int, pair<int, int>> P;
int H, W, ans = 0;
char C[1100][1100];
int dx[... | replace | 15 | 16 | 15 | 16 | 0 | |
p03053 | Python | Runtime Error | from collections import deque
H, W = map(int, input().split())
A = [list("#" * (W + 2))]
q = deque()
A_append = A.append
q_append = q.append
for _ in range(H):
a = input()
A_append(list("#" + a + "#"))
A.append(list("#" * (W + 2)))
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]
for i in range(1, H + 1):
for j in ... | from collections import deque
H, W = map(int, input().split())
A = [list("#" * (W + 2))]
q = deque()
A_append = A.append
q_append = q.append
for _ in range(H):
a = input()
A_append(list("#" + a + "#"))
A.append(list("#" * (W + 2)))
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]
for i in range(1, H + 1):
for j in ... | replace | 25 | 27 | 25 | 27 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
int main() {
int h, w;
cin >> h >> w;
vector<string> a(h);
for (int i = 0; i < h; i++)
cin >> a[i];
// 多点スタート
// スタートから0距離で到達できる場合には距離配列に0を格納
vector<vector<int>> dist(h, vector<int>(w, -1));
queue... | #include <bits/stdc++.h>
using namespace std;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
int main() {
int h, w;
cin >> h >> w;
vector<string> a(h);
for (int i = 0; i < h; i++)
cin >> a[i];
// 多点スタート
// スタートから0距離で到達できる場合には距離配列に0を格納
vector<vector<int>> dist(h, vector<int>(w, -1));
queue... | replace | 33 | 34 | 33 | 34 | 0 | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class ... | #include <algorithm>
#include <climits>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class ... | replace | 56 | 57 | 56 | 57 | 0 | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define pb push_back
#define mk make_pair
#define eb emplace_back
#define eps 1e-8
#define fi first
#def... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define pb push_back
#define mk make_pair
#define eb emplace_back
#define eps 1e-8
#define fi first
#def... | replace | 39 | 40 | 39 | 40 | 0 | |
p03053 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
char A;
int B[100][100];
int wcnt = 0;
int wcnt2 = 0;
int ans = 0;
int i, j;
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {
cin >> A;
if (A == '#')
B[i][j] = 0;
else
... | #include <iostream>
#include <string>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
char A;
int B[1000][1000];
int wcnt = 0;
int wcnt2 = 0;
int ans = 0;
int i, j;
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {
cin >> A;
if (A == '#')
B[i][j] = 0;
else
... | replace | 9 | 10 | 9 | 10 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int di[] = {-1, 0, 1, 0};
int dj[] = {0, -1, 0, 1};
int main() {
int h, w;
cin >> h >> w;
vector<string> a(h);
vector<vector<int>> dist(h, vector<int>(w, 1e9));
vector<pair<int, int>> p;
rep... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int di[] = {-1, 0, 1, 0};
int dj[] = {0, -1, 0, 1};
int main() {
int h, w;
cin >> h >> w;
vector<string> a(h);
vector<vector<int>> dist(h, vector<int>(w, 1e9));
vector<pair<int, int>> p;
rep... | replace | 18 | 19 | 18 | 19 | TLE | |
p03053 | C++ | Runtime Error | ////////////////////////////////////////
/// tu3 pro-con template ///
////////////////////////////////////////
#include "bits/stdc++.h"
using namespace std;
// -- loop macros -- //
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define FOR(i, s, n) for (... | ////////////////////////////////////////
/// tu3 pro-con template ///
////////////////////////////////////////
#include "bits/stdc++.h"
using namespace std;
// -- loop macros -- //
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define FOR(i, s, n) for (... | replace | 193 | 194 | 193 | 194 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fr(i, n) for (int i = 0; i < n; i++)
#define ifr(i, n) for (int i = n - 1; i >= 0; i--)
int main() {
int h, w;
int x = 0;
cin >> h >> w;
string kari[h];
int a[h + 2][w + 2];
fr(i, h + 2) {
fr(j, w + 2) { a[... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fr(i, n) for (int i = 0; i < n; i++)
#define ifr(i, n) for (int i = n - 1; i >= 0; i--)
int main() {
int h, w;
int x = 0;
cin >> h >> w;
string kari[h];
int a[h + 2][w + 2];
fr(i, h + 2) {
fr(j, w + 2) { a[... | insert | 50 | 50 | 50 | 72 | TLE | |
p03053 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <unordered_set>
#include <vector>
// #include <bits/stdc++.h>
using namespace std;
typedef long ... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <unordered_set>
#include <vector>
// #include <bits/stdc++.h>
using namespace std;
typedef long ... | delete | 60 | 61 | 60 | 60 | TLE | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _repi(i, a, b) \
for (int i = int(a), i##_hoge = int(b); i < i##_hoge; ++i)
#define _rep(i, n) _repi(i, 0, n)
#define overload4(_1, _2, _3, _4, name, ...) name
... | #include <bits/stdc++.h>
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _repi(i, a, b) \
for (int i = int(a), i##_hoge = int(b); i < i##_hoge; ++i)
#define _rep(i, n) _repi(i, 0, n)
#define overload4(_1, _2, _3, _4, name, ...) name
... | replace | 69 | 72 | 69 | 72 | 0 | |
p03053 | Python | Time Limit Exceeded | import sys
import collections
def solve():
readline = sys.stdin.buffer.readline
h, w = list(map(int, readline().split()))
a = [[True] * w for _ in range(h)]
ql = []
ql = collections.deque(ql)
for i in range(h):
s = str(readline().rstrip().decode("utf-8"))
for j in range(w):
... | import sys
import collections
def solve():
readline = sys.stdin.buffer.readline
h, w = list(map(int, readline().split()))
a = [[True] * w for _ in range(h)]
ql = []
ql = collections.deque(ql)
for i in range(h):
s = str(readline().rstrip().decode("utf-8"))
for j in range(w):
... | replace | 26 | 27 | 26 | 27 | TLE | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
typedef pair<ll, ll> cp2;
type... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
typedef pair<ll, ll> cp2;
type... | replace | 39 | 40 | 39 | 40 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define ddrep(i, n) for (int i = n; i > 0; --i)
#define srep(i, s, t) for (in... | #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define ddrep(i, n) for (int i = n; i > 0; --i)
#define srep(i, s, t) for (in... | replace | 62 | 63 | 62 | 63 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef pair<int, int> P;
typedef long long ll;
int dp[200][200];
vector<int> dx = {1, 0, -1, 0};
vector<int> dy = {0, 1, 0, -1};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef pair<int, int> P;
typedef long long ll;
int dp[2000][2000];
vector<int> dx = {1, 0, -1, 0};
vector<int> dy = {0, 1, 0, -1};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
in... | replace | 5 | 6 | 5 | 6 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define rep(i, s, n) for (int i = s; i < n; i++)
#define rrep(i, s, n) for (int i = (n)-1; i >= (s); i--)
#define all(a) a.begin(), a.end()
typedef pair<int, int> pint;
typedef vector<int> vint;
t... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define rep(i, s, n) for (int i = s; i < n; i++)
#define rrep(i, s, n) for (int i = (n)-1; i >= (s); i--)
#define all(a) a.begin(), a.end()
typedef pair<int, int> pint;
typedef vector<int> vint;
t... | replace | 97 | 98 | 97 | 98 | TLE | |
p03053 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<int> a(h * w);
vector<int> q;
vector<int> next_q;
char tmp;
for (int i = 0; i < h * w; i++) {
cin >> tmp;
if (tmp == '#') {
a[i] = 0;
q.push_back(i);
} else {
a[i] = 1;
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<int> a(h * w);
vector<int> q;
vector<int> next_q;
char tmp;
for (int i = 0; i < h * w; i++) {
cin >> tmp;
if (tmp == '#') {
a[i] = 0;
q.push_back(i);
} else {
a[i] = 1;
... | replace | 23 | 25 | 23 | 25 | TLE | |
p03053 | C++ | Runtime Error | #include <queue>
#include <stdio.h>
#include <utility>
// #define large 1001
#define large 50
using namespace std;
int h, w;
char a[large][large];
int visited[large][large] = {}; // 黒からのユークリッド距離を保有
int vecx[] = {1, -1, 0, 0};
int vecy[] = {0, 0, 1, -1};
queue<pair<int, int>> que; //<x,y>
void bfs(int x, int y) {
... | #include <queue>
#include <stdio.h>
#include <utility>
#define large 1001
// #define large 50
using namespace std;
int h, w;
char a[large][large];
int visited[large][large] = {}; // 黒からのユークリッド距離を保有
int vecx[] = {1, -1, 0, 0};
int vecy[] = {0, 0, 1, -1};
queue<pair<int, int>> que; //<x,y>
void bfs(int x, int y) {
... | replace | 3 | 5 | 3 | 5 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define sz size
#define pb push_back
#define mper make_pair
#define all(x) x.begin(), x.end()
#define fe first
#define se second
#define erba continue
using namespace std;
const ll MAXN = 1e3 + 403;
int n, m;
vector<pair<int, int>> g[MAXN];
bool used[MAXN][MAXN];
strin... | #include <bits/stdc++.h>
#define ll long long
#define sz size
#define pb push_back
#define mper make_pair
#define all(x) x.begin(), x.end()
#define fe first
#define se second
#define erba continue
using namespace std;
const ll MAXN = 1e3 + 1403;
int n, m;
vector<pair<int, int>> g[MAXN];
bool used[MAXN][MAXN];
stri... | replace | 11 | 12 | 11 | 12 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int h, w;
vector<string> s(1024);
queue<pair<int, int>> calc(queue<pair<int, int>> que) {
int n = que.size();
for (int _ = 0; _ < n; _++) {
pair<int, int> p = que.front();
que.pop();
if (p.first > 0) {
if (s[p.first - 1][p.second] == '.')
que.p... | #include <bits/stdc++.h>
using namespace std;
int h, w;
vector<string> s(1024);
queue<pair<int, int>> calc(queue<pair<int, int>> que) {
int n = que.size();
for (int _ = 0; _ < n; _++) {
pair<int, int> p = que.front();
que.pop();
if (s[p.first][p.second] != '#')
continue;
s[p.first][p.second] =... | insert | 9 | 9 | 9 | 12 | TLE | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
string grid[1001];
int mem[1001][1001][4];
int di[2] = {1, -1};
int n, m;
bool valid(int i, int j) { return i >= 0 && i < n && j >= 0 && j < m; }
int solve(int i, int j, int d1, int d2) {
if (!valid(i, j)) {
return 1e9;
}
if (grid[i][j] == '#')
return 0;
... | #include <bits/stdc++.h>
using namespace std;
string grid[1001];
int mem[1001][1001][4];
int di[2] = {1, -1};
int n, m;
bool valid(int i, int j) { return i >= 0 && i < n && j >= 0 && j < m; }
int solve(int i, int j, int d1, int d2) {
if (!valid(i, j)) {
return 1e9;
}
if (grid[i][j] == '#')
return 0;
... | replace | 28 | 29 | 28 | 29 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iostream>
#include <limits>
#include <list>
#include <numeric>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_set>
#include <vector>
using namespace std;
using INT = long long;
using UINT = unsigned long ... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iostream>
#include <limits>
#include <list>
#include <numeric>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_set>
#include <vector>
using namespace std;
using INT = long long;
using UINT = unsigned long ... | replace | 44 | 45 | 44 | 45 | TLE | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int A = 0;
// int cnt=0;
int W, H;
vector<string> s(1100);
int cost[1100][1100];
void bfs(int a, int b) {
int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
queue<pair<int, int>> que;
que.push(make_pair(a, b));
c... | #include <bits/stdc++.h>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int A = 0;
// int cnt=0;
int W, H;
vector<string> s(1100);
int cost[1100][1100];
void bfs(int a, int b) {
int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
queue<pair<int, int>> que;
que.push(make_pair(a, b));
c... | replace | 29 | 30 | 29 | 30 | 0 | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#inclu... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#inclu... | replace | 167 | 168 | 167 | 168 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
bool toB(char c) {
if (c == '#') {
return true;
} else {
return false;
... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
bool toB(char c) {
if (c == '#') {
return true;
} else {
return false;
... | replace | 86 | 87 | 86 | 88 | TLE | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll INF64 = 1LL << 60;
const int INF32 = 1 << 29;
const int MOD = 1000000007;
const int dx[] = {0, 0, 1, -1};
const int dy[] = {1, -1, 0, 0};
int h, w, n;
vector<string> s;
vector<vector<int>> steps;
void bfs(vector<... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll INF64 = 1LL << 60;
const int INF32 = 1 << 29;
const int MOD = 1000000007;
const int dx[] = {0, 0, 1, -1};
const int dy[] = {1, -1, 0, 0};
int h, w, n;
vector<string> s;
vector<vector<int>> steps;
void bfs(vector<... | replace | 37 | 38 | 37 | 38 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
#define mp make_pair
int main() {
int n, m;
cin >> n >> m;
int a[n][m];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
a[i][j] = -1;
}
}
char s[n][m];
for (int i = 0; i < n; i++) {
for (int j... | #include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
#define mp make_pair
int main() {
int n, m;
cin >> n >> m;
int a[n][m];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
a[i][j] = -1;
}
}
char s[n][m];
for (int i = 0; i < n; i++) {
for (int j... | replace | 22 | 23 | 22 | 23 | 0 | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <string>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int h, w;
char a[1000][1000];
int d[1000][1000] = {};
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
queue<P> que;
int dmax = 0;
void bfs() {
while ... | #include <algorithm>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <string>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int h, w;
char a[1000][1000];
int d[1000][1000] = {};
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
queue<P> que;
int dmax = 0;
void bfs() {
while ... | replace | 23 | 24 | 23 | 24 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
struct coord {
int x;
int y;
};
int H, W;
char map[1005][1005];
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int ans;
long long blackcount... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
struct coord {
int x;
int y;
};
int H, W;
char map[1005][1005];
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int ans;
long long blackcount... | insert | 27 | 27 | 27 | 28 | TLE | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using llong = long long;
using ldbl = long double;
using P = pair<llong, llong>;
#define ALL(x) x.begin(), x.end()
const llong inf = 1100100100100100ll;
const llong mod = 1e9 + 7;
int nw[9] = {0, 1, 0, -1, -1, 1, 1, -1, 0};
int nh[9] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
i... | #include <bits/stdc++.h>
using namespace std;
using llong = long long;
using ldbl = long double;
using P = pair<llong, llong>;
#define ALL(x) x.begin(), x.end()
const llong inf = 1100100100100100ll;
const llong mod = 1e9 + 7;
int nw[9] = {0, 1, 0, -1, -1, 1, 1, -1, 0};
int nh[9] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
i... | delete | 50 | 54 | 50 | 50 | TLE | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define MOD 1000000000 + 7
#define INF 1000000000
typedef long long ll;
using name... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define MOD 1000000000 + 7
#define INF 1000000000
typedef long long ll;
using name... | replace | 18 | 20 | 18 | 20 | 0 | |
p03053 | C++ | Runtime Error | #include <ctype.h>
#include <stdio.h>
#include <string.h>
#ifndef LL
#define LL long long
#endif
#ifndef uLL
#define uLL unsigned long long
#endif
#ifndef uL
#define uL unsigned int
#endif
#ifndef iL
#define iL int
#endif
#ifndef iS
#define iS short
#endif
#ifndef uS
#define uS unsigned short
#endif
#ifndef uC
#define ... | #include <ctype.h>
#include <stdio.h>
#include <string.h>
#ifndef LL
#define LL long long
#endif
#ifndef uLL
#define uLL unsigned long long
#endif
#ifndef uL
#define uL unsigned int
#endif
#ifndef iL
#define iL int
#endif
#ifndef iS
#define iS short
#endif
#ifndef uS
#define uS unsigned short
#endif
#ifndef uC
#define ... | replace | 30 | 31 | 30 | 31 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, m, x, a, b, c;
bool arr[10005][10005];
char y;
queue<pair<pair<int, int>, int>> q;
int main() {
memset(arr, -1, sizeof(arr));
cin >> n >> m;
x = n * m;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> y;
if (y == '#') {
... | #include <bits/stdc++.h>
using namespace std;
int n, m, x, a, b, c;
bool arr[10005][10005];
char y;
queue<pair<pair<int, int>, int>> q;
int main() {
cin >> n >> m;
x = n * m;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> y;
if (y == '#') {
arr[i][j] = 1;
q.... | delete | 9 | 10 | 9 | 9 | 127 | /tmp/b4adf72a-cc36-4868-b576-a714ec175ebf.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
|
p03053 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int v[4][2] = {
{0, 1},
{1, 0},
{-1, 0},
{0, -1},
};
int main() {
int h, w;
cin >> h >> w;
char a[h][w];
for (int i = 0; i < h; i++) {
f... | #include <algorithm>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int v[4][2] = {
{0, 1},
{1, 0},
{-1, 0},
{0, -1},
};
int main() {
int h, w;
cin >> h >> w;
char a[h][w];
for (int i = 0; i < h; i++) {
f... | replace | 63 | 69 | 63 | 69 | TLE | |
p03053 | C++ | Time Limit Exceeded | // #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c... | // #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(3)
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC target("sse3","sse2","sse")
// #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
// #pragma GCC target("f16c... | delete | 197 | 201 | 197 | 197 | TLE | |
p03053 | C++ | Runtime Error | #include <queue>
#include <stdio.h>
// #define large 1005
#define large 50
using namespace std;
int h, w;
char a[large][large];
int vecx[] = {1, -1, 0, 0};
int vecy[] = {0, 0, 1, -1};
int visited[large][large] = {};
queue<int> que;
void bfs(int x, int y) {
// if(visited[x][y]>0) return;
for (int i = 0; i < 4; i... | #include <queue>
#include <stdio.h>
#define large 1005
// #define large 50
using namespace std;
int h, w;
char a[large][large];
int vecx[] = {1, -1, 0, 0};
int vecy[] = {0, 0, 1, -1};
int visited[large][large] = {};
queue<int> que;
void bfs(int x, int y) {
// if(visited[x][y]>0) return;
for (int i = 0; i < 4; i... | replace | 2 | 4 | 2 | 4 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int INF = 100000000;
typedef pair<int, int> P;
const int MAX_H = 50, MAX_W = 50;
int H, W;
int sy, sx;
int gy, gx;
char maze[MAX_H][MAX_W];
int d[MAX_H][MAX_W];
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
void bfs(int y, int x);
int main() {
cin >> H >> W... | #include <bits/stdc++.h>
using namespace std;
const int INF = 100000000;
typedef pair<int, int> P;
const int MAX_H = 1000, MAX_W = 1000;
int H, W;
int sy, sx;
int gy, gx;
char maze[MAX_H][MAX_W];
int d[MAX_H][MAX_W];
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
void bfs(int y, int x);
int main() {
cin >> H ... | replace | 5 | 6 | 5 | 6 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen("./a.in", "r", stdin);
freopen("./a.out", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
int h, w;
cin >> h >> w;
vector<string> grid(h);
for (int i = 0; i < h; i++) {
cin >> grid[... | #include <bits/stdc++.h>
using namespace std;
int main() {
// #ifndef ONLINE_JUDGE
// freopen("./a.in","r",stdin);
// freopen("./a.out","w",stdout);
// #endif
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
int h, w;
cin >> h >> w;
vector<string> grid(h);
for (int i = 0; i < h; i++) {
... | replace | 4 | 8 | 4 | 8 | -6 | terminate called after throwing an instance of 'std::length_error'
what(): cannot create std::vector larger than max_size()
|
p03053 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#define MOD 998244353
#define INF 100000000
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | #define _CRT_SECURE_NO_WARNINGS
#define MOD 998244353
#define INF 100000000
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | insert | 399 | 399 | 399 | 400 | TLE | |
p03053 | C++ | Runtime Error | #include <cstdio>
#include <queue>
#include <tuple>
using namespace std;
int main(int argc, char const *argv[]) {
int h, w;
scanf("%d %d\n", h, w);
char maze[h][w + 1];
for (int i = 0; i < h; i++) {
scanf("%s\n", maze[i]);
}
int ans = 0;
queue<tuple<int, int, int>> que;
for (int i = 0; i < h; i++)... | #include <cstdio>
#include <queue>
#include <tuple>
using namespace std;
int main(int argc, char const *argv[]) {
int h, w;
scanf("%d %d\n", &h, &w);
char maze[h][w + 1];
for (int i = 0; i < h; i++) {
scanf("%s\n", maze[i]);
}
int ans = 0;
queue<tuple<int, int, int>> que;
for (int i = 0; i < h; i+... | replace | 8 | 9 | 8 | 9 | -11 | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define reps(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define all(x) (x).begin(), (x).end()
#define bit(n) (1LL << (n))
typedef vector<int> vint;
typedef pair<int, int> pint;
constexpr double PI = ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define reps(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define all(x) (x).begin(), (x).end()
#define bit(n) (1LL << (n))
typedef vector<int> vint;
typedef pair<int, int> pint;
constexpr double PI = ... | delete | 56 | 58 | 56 | 56 | TLE | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
#define dunk(a) cout << (a) << endl
#define rall(a) (a).rbegin(), (a).rend()
const int INF = 2e9;
using namespace std;
using Graph = vector<vector<int>>;
typedef pair<int, int> P;
typedef long long ll;
char G[... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
#define dunk(a) cout << (a) << endl
#define rall(a) (a).rbegin(), (a).rend()
const int INF = 2e9;
using namespace std;
using Graph = vector<vector<int>>;
typedef pair<int, int> P;
typedef long long ll;
char G[... | replace | 11 | 13 | 11 | 13 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
char s[1005][1005];
int d[1005][1005];
int x[1005], y[1005];
int h, w;
int dx[4] = {0, 0, -1, 1};
int dy[4] = {1, -1, 0, 0};
int main() {
scanf("%d%d", &h, &w);
getchar();
int t = 0;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
scanf("%c",... | #include <bits/stdc++.h>
using namespace std;
char s[1005][1005];
int d[1005][1005];
int x[1000005], y[1000005];
int h, w;
int dx[4] = {0, 0, -1, 1};
int dy[4] = {1, -1, 0, 0};
int main() {
scanf("%d%d", &h, &w);
getchar();
int t = 0;
for (int i = 1; i <= h; i++) {
for (int j = 1; j <= w; j++) {
scanf... | replace | 4 | 5 | 4 | 5 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define CPP_STR(x) CPP_STR_I(x)
#define CPP_CAT(x, y) CPP_CAT_I(x, y)
#define CPP_STR_I(args...) #args
#define CPP_CAT_I(x, y) x##y
using i8 = int8_t;
using u8 = uint8_t;
using i16 = int16_t;
using u16 = uint16_t;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int... | #include <bits/stdc++.h>
using namespace std;
#define CPP_STR(x) CPP_STR_I(x)
#define CPP_CAT(x, y) CPP_CAT_I(x, y)
#define CPP_STR_I(args...) #args
#define CPP_CAT_I(x, y) x##y
using i8 = int8_t;
using u8 = uint8_t;
using i16 = int16_t;
using u16 = uint16_t;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int... | replace | 90 | 91 | 90 | 91 | 0 | |
p03053 | 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 = 1000000007;
const int INF = numeric_limits<int>::max() / 2;
typedef pair<int, int> P;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
signed main() {
ios::sync_w... | #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 = 1000000007;
const int INF = numeric_limits<int>::max() / 2;
typedef pair<int, int> P;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
signed main() {
ios::sync_w... | replace | 22 | 23 | 22 | 23 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
struct S {
int x, y, num;
};
char in[105][105];
int N, M, A[105][105], ans;
int dx[4] = {1, -1, 0, 0}, dy[4] = {0, 0, 1, -1};
queue<S> q;
bool safe(int x, int y) {
if (0 < x && x <= N && 0 < y && y <= M)
return 1;
retur... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
struct S {
int x, y, num;
};
char in[1005][1005];
int N, M, A[1005][1005], ans;
int dx[4] = {1, -1, 0, 0}, dy[4] = {0, 0, 1, -1};
queue<S> q;
bool safe(int x, int y) {
if (0 < x && x <= N && 0 < y && y <= M)
return 1;
r... | replace | 11 | 13 | 11 | 13 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<vector<char>> Masu(H, vector<char>(W));
vector<vector<int>> Map(H, vector<int>(W, -1));
deque<int> queY;
deque<int> queX;
getchar();
for (int i = 0; i < W; i++) {
for (int j = 0; j < H; j++) {
Masu[i][j]... | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<vector<char>> Masu(H, vector<char>(W));
vector<vector<int>> Map(H, vector<int>(W, -1));
deque<int> queY;
deque<int> queX;
getchar();
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
Masu[i][j]... | replace | 10 | 12 | 10 | 12 | 0 | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include ... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include ... | replace | 144 | 146 | 144 | 146 | 0 | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, x, n) for (int i = x; i < (int)n; i++)
#define rep(i, n) REP(i, 0, n)
#define sp(p) cout << setprecision(16) << fixed << p << endl;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, x, n) for (int i = x; i < (int)n; i++)
#define rep(i, n) REP(i, 0, n)
#define sp(p) cout << setprecision(16) << fixed << p << endl;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(... | replace | 107 | 109 | 107 | 109 | 0 | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <vector>
using namespace std;
typedef pair<int, int> P;
int DYX[4][2]{{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
int H, W;
int ans = 0;
string graph[50];
int seen[50][50];
queue<P> que;
void bfs();
int m... | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <vector>
using namespace std;
typedef pair<int, int> P;
int DYX[4][2]{{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
int H, W;
int ans = 0;
string graph[1000];
int seen[1000][1000];
queue<P> que;
void bfs();
... | replace | 16 | 18 | 16 | 18 | 0 | |
p03053 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
#define ran 1011
const int go[4][2] = {0, 1, 1, 0, 0, -1, -1, 0};
int n, m;
char s[ran][ran];
int d[ran][ran];
int q[ran * ran], l, r;
int main() {
scanf("%d%d", &n, &m);
memset(d, -1, sizeof d);
l = r = 0;
for (int i = 0; i < n;... | #include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
#define ran 1011
const int go[4][2] = {0, 1, 1, 0, 0, -1, -1, 0};
int n, m;
char s[ran][ran];
int d[ran][ran];
int q[ran * ran * 2], l, r;
int main() {
scanf("%d%d", &n, &m);
memset(d, -1, sizeof d);
l = r = 0;
for (int i = 0; i ... | replace | 12 | 13 | 12 | 13 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#define REP(i, x, y) for (int i = (x); i < (y); i++)
#define RREP(i, x, y) for (int i = (y)-1; i >= (x); i--)
#define all(x) (x).begin(), (x).end()
// #define int long long
using namespace std;
// conversion
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v... | #include "bits/stdc++.h"
#define REP(i, x, y) for (int i = (x); i < (y); i++)
#define RREP(i, x, y) for (int i = (y)-1; i >= (x); i--)
#define all(x) (x).begin(), (x).end()
// #define int long long
using namespace std;
// conversion
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v... | replace | 40 | 41 | 40 | 43 | TLE | |
p03053 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int h, w;
vector<string> a;
inline bool can(int x, int y, vector<vector<int>> dist) {
return x >= 0 && x < h && y >= 0 && y < w && dist[x][y] == -1;
}
int vectormax(vector<vector<int>> dist) {
int ans = 0;
for (int i = 0; i < dist.size(); i++) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int h, w;
vector<string> a;
bool can(int x, int y, vector<vector<int>> &dist) {
return x >= 0 && x < h && y >= 0 && y < w && dist[x][y] == -1;
}
int vectormax(vector<vector<int>> dist) {
int ans = 0;
for (int i = 0; i < dist.size(); i++) {
... | replace | 6 | 7 | 6 | 7 | TLE | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef int Int;
typedef pair<Int, Int> pii;
typedef pair<Int, double> pid;
typedef pair<double, double> pdd;
typedef pair<Int, pii> pip;
typedef pair<double, Int> pdp;
#define A first
#define B second
#define pb(x) push... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef int Int;
typedef pair<Int, Int> pii;
typedef pair<Int, double> pid;
typedef pair<double, double> pdd;
typedef pair<Int, pii> pip;
typedef pair<double, Int> pdp;
#define A first
#define B second
#define pb(x) push... | replace | 38 | 40 | 38 | 40 | 0 | |
p03053 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
using LL = long long;
using VLL = std::vector<LL>;
using VVLL = std::vector<VLL>;
using VVVLL = std::vector<VVLL>;
using LD = long double;
using VLD = std::vector<LD>;
using VVLD = std::vector<VLD>;
using VVVLD = std::vector<VVL... | #include "bits/stdc++.h"
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
using LL = long long;
using VLL = std::vector<LL>;
using VVLL = std::vector<VLL>;
using VVVLL = std::vector<VVLL>;
using LD = long double;
using VLD = std::vector<LD>;
using VVLD = std::vector<VLD>;
using VVVLD = std::vector<VVL... | insert | 66 | 66 | 66 | 122 | TLE | |
p03053 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace ... | replace | 76 | 77 | 76 | 78 | TLE | |
p03053 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#ifdef ENABLE_DEBUG
#define dump(a) cerr << #a << "=" << a << endl
#define dumparr(a, n) cerr << #a << "[" << n << "]=" << a[n] << endl
#else
#define dump(a)
#define dumparr(a, n)
#endif
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define For(i, a) FOR(i, 0, a)
#define... | #include <bits/stdc++.h>
using namespace std;
#ifdef ENABLE_DEBUG
#define dump(a) cerr << #a << "=" << a << endl
#define dumparr(a, n) cerr << #a << "[" << n << "]=" << a[n] << endl
#else
#define dump(a)
#define dumparr(a, n)
#endif
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define For(i, a) FOR(i, 0, a)
#define... | replace | 72 | 73 | 72 | 73 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.