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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03013 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
#include <vector>
int main(void) {
int n, m;
std::cin >> n >> m;
std::vector<int> broken(n + 1);
for (int i = 0; i < n; i++) {
int a;
std::cin >> a;
broken.at(a) = 1;
}
std::vector<int> dp(n + 2);
const int mod = 1000000007;
dp.at(n) = 1;
for (int ... | #include <cstdio>
#include <iostream>
#include <vector>
int main(void) {
int n, m;
std::cin >> n >> m;
std::vector<int> broken(n + 1);
for (int i = 0; i < m; i++) {
int a;
std::cin >> a;
broken.at(a) = 1;
}
std::vector<int> dp(n + 2);
const int mod = 1000000007;
dp.at(n) = 1;
for (int ... | replace | 9 | 10 | 9 | 10 | 0 | |
p03013 | C++ | Runtime Error | #include <iostream>
#include <vector>
int main() {
int n, m;
std::cin >> n >> m;
std::vector<int> broken(n + 1);
for (int i = 0; i < n + 1; i++) {
int a;
std::cin >> a;
broken[a] = 1;
}
std::vector<int> dp(n + 2);
const int mod = 1000000007;
dp[n] = 1;
for (int i = n - 1; i >= 0; i--) ... | #include <iostream>
#include <vector>
int main() {
int n, m;
std::cin >> n >> m;
std::vector<int> broken(n + 1);
for (int i = 0; i < m; i++) {
int a;
std::cin >> a;
broken[a] = 1;
}
std::vector<int> dp(n + 2);
const int mod = 1000000007;
dp[n] = 1;
for (int i = n - 1; i >= 0; i--) {
... | replace | 7 | 8 | 7 | 8 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long i64;
#define MOD 1000000007
int main(void) {
i64 n, m;
cin >> n >> m;
vector<bool> a(m, false);
vector<i64> dp(n + 1, 0);
for (i64 i = 0; i < m; i++) {
i64 x;
cin >> x;
a[x] = true;
}
dp[0] = 1;
for (i64 i = 1; i <= n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long i64;
#define MOD 1000000007
int main(void) {
i64 n, m;
cin >> n >> m;
vector<bool> a(n, false);
vector<i64> dp(n + 1, 0);
for (i64 i = 0; i < m; i++) {
i64 x;
cin >> x;
a[x] = true;
}
dp[0] = 1;
for (i64 i = 1; i <= n; i++) {
... | replace | 8 | 9 | 8 | 9 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<pair<ll, ll>> vp;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define all(v) v.begin(), v.end()
#define inputv(v, n) \
rep(i, n) { ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<pair<ll, ll>> vp;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define all(v) v.begin(), v.end()
#define inputv(v, n) \
rep(i, n) { ... | insert | 21 | 21 | 21 | 23 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PI acos(-1)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using LP = pair<ll, ll>;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PI acos(-1)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using LP = pair<ll, ll>;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class ... | insert | 32 | 32 | 32 | 34 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
#define LL long long
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPA(i, n) for (int i = 1; i < (n); ++i)
#define PII pair<int, int>
#define PLI pair<long long, int>
#define PLL pair<long long, long long>
#define MOD ((int)1e9 + 7)
#define INF ((int)1e9)
#define INFLL ((LL)1e18)
#de... | #include <bits/stdc++.h>
#define LL long long
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPA(i, n) for (int i = 1; i < (n); ++i)
#define PII pair<int, int>
#define PLI pair<long long, int>
#define PLL pair<long long, long long>
#define MOD ((int)1e9 + 7)
#define INF ((int)1e9)
#define INFLL ((LL)1e18)
#de... | replace | 62 | 63 | 62 | 63 | 0 | |
p03013 | 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;
using P = pair<int, int>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int mod = 1e9 + 7;
int n, m;
cin >> n >> m;
vector<int> v(n + 1, 0), a(m);
rep(i, m) {
cin >> a[i];
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int mod = 1e9 + 7;
int n, m;
cin >> n >> m;
vector<int> v(n + 1, 0), a(m + 1, -1);
rep(i, m) {
cin >>... | replace | 16 | 17 | 16 | 17 | 0 | |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string>
#include <vector>
const int INT_INF = 1e9;
const long long LONG_INF = 1e18;
const long long MOD = 1e9 + 7;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> v(m);... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iostream>
#include <map>
#include <stdio.h>
#include <string>
#include <vector>
const int INT_INF = 1e9;
const long long LONG_INF = 1e18;
const long long MOD = 1e9 + 7;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> v(m +... | replace | 18 | 19 | 18 | 19 | 0 | |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define BEGIN(x) x.begin(... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define BEGIN(x) x.begin(... | replace | 60 | 61 | 60 | 61 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, m;
cin >> n >> m;
vector<long long> a(m);
for (long long i = 0; i < m; i++)
cin >> a[i];
vector<long long> ans(n + 1);
ans[0] = 1;
long long cnt = 0;
if (a[0] == 1) {
ans[1] = 0;
cnt++;
} else
ans[1] = 1;
for (... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, m;
cin >> n >> m;
vector<long long> a(m + 1);
for (long long i = 0; i < m; i++)
cin >> a[i];
vector<long long> ans(n + 1);
ans[0] = 1;
long long cnt = 0;
if (a[0] == 1) {
ans[1] = 0;
cnt++;
} else
ans[1] = 1;
f... | replace | 6 | 7 | 6 | 7 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
long long mod = 1e9 + 7;
cin >> n >> m;
vector<bool> hole(m + 1, 0);
for (int i = 0; i < m; i++) {
int a;
cin >> a;
hole[a] = true;
}
vector<long long int> count(n + 1, 0);
count[0] = 1;
for (int i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
long long mod = 1e9 + 7;
cin >> n >> m;
vector<bool> hole(n + 1, 0);
for (int i = 0; i < m; i++) {
int a;
cin >> a;
hole[a] = true;
}
vector<long long int> count(n + 1, 0);
count[0] = 1;
for (int i = 0; i < n; i++) {
... | replace | 6 | 7 | 6 | 7 | 0 | |
p03013 | Python | Runtime Error | def typical_stairs():
n, m, *dangerous = map(int, open(0).read().split())
dangerous = set(*dangerous)
mod = 1000000007
dp = [0] * (n + 1)
dp[0] = 1
if 1 not in dangerous:
dp[1] = 1
for i in range(2, n + 1):
if i not in dangerous:
dp[i] = (dp[i - 2] + dp[i - 1]) % ... | def typical_stairs():
n, m, *dangerous = map(int, open(0).read().split())
dangerous = set(dangerous)
mod = 1000000007
dp = [0] * (n + 1)
dp[0] = 1
if 1 not in dangerous:
dp[1] = 1
for i in range(2, n + 1):
if i not in dangerous:
dp[i] = (dp[i - 2] + dp[i - 1]) % m... | replace | 2 | 3 | 2 | 3 | TypeError: 'int' object is not iterable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03013/Python/s774157765.py", line 16, in <module>
typical_stairs()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03013/Python/s774157765.py", line 3, in typical_stairs
dangerous = s... |
p03013 | 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++)
const ll MAX = 1e6;
const ll MOD = 1e9 + 7;
ll fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
f... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const ll MAX = 1e6;
const ll MOD = 1e9 + 7;
ll fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
f... | replace | 42 | 44 | 42 | 48 | 0 | |
p03013 | C++ | Runtime Error | #include <iostream>
#include <vector>
typedef long long ll;
const ll mod = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
signed main() {
int n, m;
cin >> n >> m;
vector<int> broken(n);
rep(i, n) {
int a;
cin >> a;
broken[a] = 1; // 1 ~= true
}
vector<int> dp(n + 2... | #include <iostream>
#include <vector>
typedef long long ll;
const ll mod = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
signed main() {
int n, m;
cin >> n >> m;
vector<int> broken(n);
rep(i, m) {
int a;
cin >> a;
broken[a] = 1; // 1 ~= true
}
vector<int> dp(n + 2... | replace | 11 | 12 | 11 | 12 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using pint = pair<int, int>;
ll mod = 1000000007, mod2 = 998244353;
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using pint = pair<int, int>;
ll mod = 1000000007, mod2 = 998244353;
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> i... | replace | 43 | 44 | 43 | 44 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, m;
cin >> n >> m;
vector<long long int> ans(n + 1);
vector<int> a(m);
for (int i = 0; i < m; i++) {
cin >> a[i];
}
int atenji = 0;
ans[0] = 1;
if (1 == a[atenji]) {
ans[1] = 0;
atenji++;
atenji = atenji > m - 1... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, m;
cin >> n >> m;
vector<long long int> ans(n + 1);
if (m == 0) {
ans[0] = 1;
ans[1] = 1;
for (int i = 2; i <= n; i++) {
ans[i] = ans[i - 1] + ans[i - 2];
ans[i] = ans[i] % 1000000007;
}
cout << ans[n] % ... | insert | 6 | 6 | 6 | 16 | 0 | |
p03013 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define ALL(v) (v).begin(), (v).end()
const int mod = 1e9 + 7;
int main() {
int N, M;
cin >> N >> M;
vector<bool> a(N, true);
for ... | #define _GLIBCXX_DEBUG
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define ALL(v) (v).begin(), (v).end()
const int mod = 1e9 + 7;
int main() {
int N, M;
cin >> N >> M;
vector<bool> a(N + 1, true);
... | replace | 16 | 17 | 16 | 17 | -6 | /usr/include/c++/12/debug/vector:442:
In function:
std::debug::vector<_Tp, _Allocator>::reference std::debug::vector<_Tp,
_Allocator>::operator[](size_type) [with _Tp = bool; _Allocator =
std::allocator<bool>; reference = std::vector<bool, std::allocator<bool>
>::reference; size_type = long unsigned ... |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <float.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define ll long long
int main(void) {
vector<ll> fib(100000);
for (ll i = 0; i < 100000; i++) {
if (i == 0)
fib.a... | #include <algorithm>
#include <cstdio>
#include <float.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define ll long long
int main(void) {
vector<ll> fib(100001);
for (ll i = 0; i < 100001; i++) {
if (i == 0)
fib.a... | replace | 14 | 16 | 14 | 16 | 0 | |
p03013 | C++ | Runtime Error | #include <stdio.h>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __pri... | #include <stdio.h>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __pri... | replace | 109 | 111 | 109 | 115 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n, 0);
for (int i = 0; i < m; i++) {
int k;
cin >> k;
a.at(k) = 1;
}
const long long mod = 1000000007;
vector<long long> dp(n);
dp.at(0) = 1;
if (!a.at(1))
dp.at(1) = 1;
for (int i = 2... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n, 0);
for (int i = 0; i < m; i++) {
int k;
cin >> k;
a.at(k) = 1;
}
const long long mod = 1000000007;
if (n == 1) {
cout << 1 << endl;
return 0;
}
vector<long long> dp(n);
dp.at(0... | insert | 14 | 14 | 14 | 18 | 0 | |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <tuple>
#include <vector>
template <typename T> bool chmax(T &a, const T &b) {
if (a <= b) {
a = b;
return (true);
} else {
return (false);
}
}
template <typename T... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <tuple>
#include <vector>
template <typename T> bool chmax(T &a, const T &b) {
if (a <= b) {
a = b;
return (true);
} else {
return (false);
}
}
template <typename T... | replace | 153 | 154 | 153 | 155 | 0 | |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
int N, M, now = 0, hole, maxi;
long long result = 1;
bool canDo = true;
vector<int> step;
vector<long long> fib;
scanf("%d %d", &N, &M);
// 連続した階段の数を配列にぶち込む
for (int i = 0; i < M; i++) ... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
int N, M, now = 0, hole, maxi;
long long result = 1;
bool canDo = true;
vector<int> step;
vector<long long> fib;
scanf("%d %d", &N, &M);
// 連続した階段の数を配列にぶち込む
for (int i = 0; i < M; i++) ... | replace | 40 | 41 | 40 | 41 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
ll N, M;
cin >> N >> M;
ll tmp;
vector<ll> a;
for (int i = 0; i < M; i++) {
cin >> tmp;
a.push_back(tmp);
}
vector<ll> S(100010);
S[0] = 1;
int j = 0;
if (a[0] == 1) {
S[1] = 0;
j++;
} else {
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
ll N, M;
cin >> N >> M;
ll tmp;
vector<ll> a;
for (int i = 0; i < M; i++) {
cin >> tmp;
a.push_back(tmp);
}
vector<ll> S(100010);
S[0] = 1;
int j = 0;
if (M > 0 && a[0] == 1) {
S[1] = 0;
j++;
... | replace | 21 | 22 | 21 | 22 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REPR(i, n) for (ll i = n; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
template <class T> inline bool c... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REPR(i, n) for (ll i = n; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m, i##_len = (n); i < i##_len; ++i)
#define all(x) (x).begin(), (x).end()
template <class T> inline bool c... | replace | 49 | 51 | 49 | 55 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long mod = 1e9 + 7;
int main() {
int n, m;
cin >> n >> m;
vector<int> stairs(10000 + 1, true);
for (int i = 0; i < m; i++) {
int a;
cin >> a;
stairs[a] = false;
}
vector<ll> dp(n + 1);
dp[0] = 1;
for (int i = 0... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long mod = 1e9 + 7;
int main() {
int n, m;
cin >> n >> m;
vector<bool> stairs(n + 1, true);
for (int i = 0; i < m; i++) {
int a;
cin >> a;
stairs[a] = false;
}
vector<ll> dp(n + 1);
dp[0] = 1;
for (int i = 0; i... | replace | 9 | 10 | 9 | 10 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
const ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
const ... | insert | 83 | 83 | 83 | 84 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
int k = M;
long long int broken[10002], dp[10002] = {0};
for (int i = 0; i < M; i++)
cin >> broken[i];
dp[N] = 1;
for (int i = N - 1; 0 <= i; i--) {
if (0 <= k - 1 && broken[k - 1] == i) {
dp[i] = 0;
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
int k = M;
long long int broken[100002], dp[100002] = {0};
for (int i = 0; i < M; i++)
cin >> broken[i];
dp[N] = 1;
for (int i = N - 1; 0 <= i; i--) {
if (0 <= k - 1 && broken[k - 1] == i) {
dp[i] = 0;
... | replace | 6 | 7 | 6 | 7 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll nmax = 1000000007;
int main() {
int n, m;
cin >> n >> m;
vector<ll> dp(n + 1, 0);
vector<int> a(m);
for (int i = 0; i < m; i++) {
cin >> a.at(i);
}
auto itr = find(a.begin(), a.end(), 1);
if (itr == a.end()) {
dp.at(1) = 1;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll nmax = 1000000007;
int main() {
int n, m;
cin >> n >> m;
vector<ll> dp(n + 1, 0);
vector<int> a(m);
for (int i = 0; i < m; i++) {
cin >> a.at(i);
}
auto itr = find(a.begin(), a.end(), 1);
if (itr == a.end()) {
dp.at(1) = 1;... | replace | 20 | 24 | 20 | 26 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
ll mod = 1000000007;
ll f(ll x, vector<ll> &dp) {
if (x == 1) {
dp.at(x) = 1;
return dp.at(x);
} else if (x == 2) {
dp.at(x) = 2;
return dp.at(x);
}
if (dp.at(x) != 0) {
return dp.at(x);
} else {
dp.at(x) = (f(x - 2, d... | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
ll mod = 1000000007;
ll f(ll x, vector<ll> &dp) {
if (x == 1) {
dp.at(x) = 1;
return dp.at(x);
} else if (x == 2) {
dp.at(x) = 2;
return dp.at(x);
}
if (dp.at(x) != 0) {
return dp.at(x);
} else {
dp.at(x) = (f(x - 2, d... | insert | 26 | 26 | 26 | 30 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < N; i++)
#define INF 1e9
typedef long long LL;
const LL mod = 1e9 + 7;
int main() {
LL N, M;
cin >> N >> M;
vector<LL> a(N + 1);
rep(i, M) {
int num;
cin >> num;
a[num] = 1;
}
vector<LL> dp(N);
dp[0] = 1;
if... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < N; i++)
#define INF 1e9
typedef long long LL;
const LL mod = 1e9 + 7;
int main() {
LL N, M;
cin >> N >> M;
vector<LL> a(N + 1);
rep(i, M) {
int num;
cin >> num;
a[num] = 1;
}
vector<LL> dp(N + 1);
dp[0] = 1;
... | replace | 17 | 18 | 17 | 18 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
bitset<100000> judge;
ll MOD = 1000000007;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n, m;
cin >> n >> m;
vector<ll> A(m);
bitset<10020> safe;
safe.set();
if (m > 0) {... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
bitset<100000> judge;
ll MOD = 1000000007;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n, m;
cin >> n >> m;
vector<ll> A(m);
bitset<100020> safe;
safe.set();
if (m > 0) ... | replace | 13 | 14 | 13 | 14 | 0 | |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <st... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <st... | replace | 132 | 133 | 132 | 133 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define eee(a) (cerr << (#a) << ": " << (a) << endl);
using ll = long long;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
using mint = map<int, int>;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ch... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define eee(a) (cerr << (#a) << ": " << (a) << endl);
using ll = long long;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
using mint = map<int, int>;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ch... | replace | 101 | 102 | 101 | 102 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef long long ll;
ll N, M;
set<ll> A;
ll memo[10000];
bool vis[10000];
ll mod = 1000000007;
ll go(ll pos) {
if (pos > N) {
return 0;
}
if (A.count(pos)) {
return 0;
}
if (pos == N) {
return 1;
}
if (vis[pos]) {
ret... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef long long ll;
ll N, M;
set<ll> A;
ll memo[200000];
bool vis[200000];
ll mod = 1000000007;
ll go(ll pos) {
if (pos > N) {
return 0;
}
if (A.count(pos)) {
return 0;
}
if (pos == N) {
return 1;
}
if (vis[pos]) {
r... | replace | 7 | 9 | 7 | 9 | 0 | |
p03013 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pp;
const int INF = 1e9;
const int MOD = 1000000007;
const double pi = 3.141592653589793238;
ll gcd(ll a, ll b) { return __gcd(a, b); } // 最大公約数
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } // 最... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pp;
const int INF = 1e9;
const int MOD = 1000000007;
const double pi = 3.141592653589793238;
ll gcd(ll a, ll b) { return __gcd(a, b); } // 最大公約数
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } // 最... | replace | 32 | 33 | 32 | 33 | 0 | |
p03013 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <cstdlib>
using namespace std;
#define mod 1000000007
long long inv(long long n) {
long long ans = 1;
while (n > 1) {
ans = ans * (mod - mod / n) % mod;
n = mod % n;
}
return ans;
}
long long comb_mod(long long n, long long r) {
long long deno = 1;
long long mol... | #include <bits/stdc++.h>
#include <cstdlib>
using namespace std;
#define mod 1000000007
long long inv(long long n) {
long long ans = 1;
while (n > 1) {
ans = ans * (mod - mod / n) % mod;
n = mod % n;
}
return ans;
}
long long comb_mod(long long n, long long r) {
long long deno = 1;
long long mol... | insert | 39 | 39 | 39 | 43 | TLE | |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cctype>
#include <climits>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long... | #include <algorithm>
#include <array>
#include <cctype>
#include <climits>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long... | replace | 131 | 132 | 131 | 132 | 0 | |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
int main() {
int N, M;
long long mod = 1000000007;
scanf("%d", &N);
scanf("%d", &M);
std::vector<int> a(M);
std::vector<long long> fibonatt... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
int main() {
int N, M;
long long mod = 1000000007;
scanf("%d", &N);
scanf("%d", &M);
std::vector<int> a(M);
std::vector<long long> fibonatt... | insert | 29 | 29 | 29 | 30 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
... | replace | 100 | 101 | 100 | 103 | 0 | |
p03013 | 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;
using P = pair<int, int>;
const int mod = 1000000007;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint operator-() const { return mint(-x); }
mint &o... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;
struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint operator-() const { return mint(-x); }
mint &o... | replace | 54 | 55 | 54 | 55 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(m);
for (int i = 0; i < m; i++) {
cin >> a.at(i);
}
vector<int> b(n + 2);
b.at(1) = 1;
int j = 0;
for (int i = 1; i <= n; i++) {
if (i == a.at(j)) {
j = min(j + 1, m - 1);
} else {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(m);
for (int i = 0; i < m; i++) {
cin >> a.at(i);
}
vector<int> b(n + 2);
b.at(1) = 1;
if (m == 0) {
for (int i = 1; i <= n; i++) {
b.at(i + 1) = (b.at(i) + b.at(i - 1)) % 1000000007;
}
... | insert | 12 | 12 | 12 | 19 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MAXN = 2e3 + 5;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
const double eps = 1e-10;
ll n, m, a[MAXN], dp[MAXN], broken[MAXN];
ll add(ll x, ll y) {
ll ret = x + y;
if (ret >= MOD) {
return ret - MOD;
}
return ret;
}
void solve() ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MAXN = 2e5 + 5;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
const double eps = 1e-10;
ll n, m, a[MAXN], dp[MAXN], broken[MAXN];
ll add(ll x, ll y) {
ll ret = x + y;
if (ret >= MOD) {
return ret - MOD;
}
return ret;
}
void solve() ... | replace | 3 | 4 | 3 | 4 | 0 | |
p03013 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
constexpr long long mod = 1e9 + 7;
int main() {
int N, M;
cin >> N >> M;
vector<int> a(M);
for (int i = 0; i < M; i++) {
cin >> a[i];
a[i]--;
}
int idx = 0;
vector<long long> ways(N, 0LL);
if (find(a.begin(), a.... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
constexpr long long mod = 1e9 + 7;
int main() {
int N, M;
cin >> N >> M;
vector<int> a(M);
for (int i = 0; i < M; i++) {
cin >> a[i];
a[i]--;
}
int idx = 0;
vector<long long> ways(N, 0LL);
if (find(a.begin(), a.... | replace | 31 | 32 | 31 | 32 | TLE | |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define... | replace | 56 | 61 | 56 | 64 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
const int inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;
int N, M;
ll dp[111111];
int main() {
cin >> N >> M;
vector<int> a(M);
for (int i = 0; i < M; i++) {
cin >> a[i];
}
M = 0;
dp[0] = 1;
if (a[... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
const int inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;
int N, M;
ll dp[111111];
int main() {
cin >> N >> M;
vector<int> a(M + 1);
for (int i = 0; i < M; i++) {
cin >> a[i];
}
M = 0;
dp[0] = 1;
if... | replace | 12 | 13 | 12 | 13 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i, a, b) for (signed i = a; i < (b); ++i)
#define erep(i, a, b) for (signed i = a; i <= (b); ++i)
#define per(i, a, b) for (signed i = (a); i > (b); --i)
#define eper(i, a, b) for (signed i = (a); i >= b; --i)
#define fore(i, x, a) for (aut... | #include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i, a, b) for (signed i = a; i < (b); ++i)
#define erep(i, a, b) for (signed i = a; i <= (b); ++i)
#define per(i, a, b) for (signed i = (a); i > (b); --i)
#define eper(i, a, b) for (signed i = (a); i >= b; --i)
#define fore(i, x, a) for (aut... | replace | 57 | 58 | 57 | 58 | 0 | |
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t dp[100000];
dp[0] = 1;
dp[1] = 1;
dp[2] = 2;
for (int i = 1; i < 100000; i++) {
dp[i + 2] = dp[i] % 1000000007 + dp[i + 1] % 1000000007;
}
int N;
cin >> N;
int M;
cin >> M;
vector<int> sd(M);
int c = 1;
for (int i = 0; i ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t dp[100000];
dp[0] = 1;
dp[1] = 1;
dp[2] = 2;
for (int i = 1; i < 100000; i++) {
dp[i + 2] = dp[i] % 1000000007 + dp[i + 1] % 1000000007;
}
int N;
cin >> N;
int M;
cin >> M;
vector<int> sd(M);
int c = 1;
for (int i = 0; i ... | insert | 30 | 30 | 30 | 32 | -6 | *** stack smashing detected ***: terminated
|
p03013 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#define mst(a, b) memset(a, b, sizeof(a))
#define repi(a, b) for (l... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#define mst(a, b) memset(a, b, sizeof(a))
#define repi(a, b) for (l... | insert | 75 | 75 | 75 | 79 | TLE | |
p03013 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
typedef long long ll;
using namespace std;
#define mod 1000000007
int main() {
ll n, m;
cin >> n >> m;
vector<ll> a(m);
for (ll i = 0; i < m; i++) {
cin >> a[i];
}
vector<ll> f(n + 1);
f[0] = 1;
f[1] = 1;
ll next = 0;
... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
typedef long long ll;
using namespace std;
#define mod 1000000007
int main() {
ll n, m;
cin >> n >> m;
vector<ll> a(m + 3);
for (ll i = 0; i < m; i++) {
cin >> a[i];
}
vector<ll> f(n + 1);
f[0] = 1;
f[1] = 1;
ll next = ... | replace | 12 | 13 | 12 | 13 | 0 | |
p03013 | Python | Runtime Error | n, m = map(int, input().split())
A = set()
for i in range(m):
a = int(input())
A.add(a)
dp = [0] * (n + 1)
for i in range(n + 1):
if i in a:
dp[i] = 0
else:
if i == 0:
dp[i] = 1
elif i == 1:
dp[i] = 1
else:
dp[i] = (dp[i - 1] + dp[i - 2... | n, m = map(int, input().split())
A = set()
for i in range(m):
a = int(input())
A.add(a)
dp = [0] * (n + 1)
for i in range(n + 1):
if i in A:
dp[i] = 0
else:
if i == 0:
dp[i] = 1
elif i == 1:
dp[i] = 1
else:
dp[i] = (dp[i - 1] + dp[i - 2... | replace | 7 | 8 | 7 | 8 | TypeError: argument of type 'int' is not iterable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03013/Python/s357976971.py", line 8, in <module>
if i in a:
TypeError: argument of type 'int' is not iterable
|
p03013 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> broken(n);
rep(i, n) {
int a;
cin >> a;
broken[a] = 1;
}
vector<int> dp(n + 2);
const int mod = 1000000007;
dp[n] = 1;
fo... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> broken(n);
rep(i, m) {
int a;
cin >> a;
broken[a] = 1;
}
vector<int> dp(n + 2);
const int mod = 1000000007;
dp[n] = 1;
fo... | replace | 10 | 11 | 10 | 11 | 0 | |
p03013 | Python | Runtime Error | def solve():
N, M = map(int, input().split())
A = []
if M != 0:
A = [int(input()) for _ in range(M)]
A.sort(reverse=True)
mm = 10**9 + 7
dp = [0] * (N + 1)
dp[0] = 1 # 0段目に行くパターンは1とする
tag = -1
if len(A) != 0:
tag = A.pop()
# 1段目のパターンを設定
if tag == 1:
d... | def solve():
N, M = map(int, input().split())
A = []
if M != 0:
A = [int(input()) for _ in range(M)]
A.sort(reverse=True)
mm = 10**9 + 7
dp = [0] * (N + 1)
dp[0] = 1 # 0段目に行くパターンは1とする
tag = -1
if len(A) != 0:
tag = A.pop()
# 1段目のパターンを設定
if tag == 1:
d... | replace | 15 | 16 | 15 | 19 | 0 | |
p03013 | Python | Runtime Error | n, m = list(map(int, input().split(" ")))
broken = [False] * (n + 1)
for i in range(m):
broken[int(input())] = True
mod = 1_000_000_007
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 0 if broken[1] else 1
for i in range(2, n + 1):
if broken[i]:
dp[i] = 0
else:
c = dp[i - 1] + dp[i - 2]
if ... | n, m = list(map(int, input().split(" ")))
broken = [False] * (n + 1)
for i in range(m):
broken[int(input())] = True
mod = 1000000007
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 0 if broken[1] else 1
for i in range(2, n + 1):
if broken[i]:
dp[i] = 0
else:
c = dp[i - 1] + dp[i - 2]
if c >... | replace | 6 | 7 | 6 | 7 | 0 | |
p03013 | Python | Time Limit Exceeded | n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
dp = [0] * (n + 1)
for i in range(n + 1):
if i in a:
dp[i] = 0
else:
if i == 0:
dp[i] = 1
elif i == 1:
dp[i] = 1
else:
dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
print(dp... | n, m = map(int, input().split())
a = set()
for i in range(m):
a_tmp = int(input())
a.add(a_tmp)
# a = [int(input()) for i in range(m)]
dp = [0] * (n + 1)
for i in range(n + 1):
if i in a:
dp[i] = 0
else:
if i == 0:
dp[i] = 1
elif i == 1:
dp[i] = 1
... | replace | 2 | 3 | 2 | 8 | TLE | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MAX = 1e3 + 10;
typedef long long ll;
int main() {
int left[MAX][MAX], right[MAX][MAX], up[MAX][MAX], down[MAX][MAX];
char a[MAX][MAX];
int m, n;
cin >> m >> n;
for (int i = 1; i <= m; i++)
for (int j = 1; j <= n; j++)
cin >> a[i][j];
f... | #include <bits/stdc++.h>
using namespace std;
const int MAX = 2e3 + 10;
typedef long long ll;
int main() {
int left[MAX][MAX], right[MAX][MAX], up[MAX][MAX], down[MAX][MAX];
char a[MAX][MAX];
int m, n;
cin >> m >> n;
for (int i = 1; i <= m; i++)
for (int j = 1; j <= n; j++)
cin >> a[i][j];
f... | replace | 3 | 4 | 3 | 4 | -11 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define mod 1000000007
#define rep(i, k, N) for (int i = k; i < N; i++)
#define MP make_pair
#define MT make_tuple // tie,make_tuple は別物
#define PB push_back
using namespace s... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define mod 1000000007
#define rep(i, k, N) for (int i = k; i < N; i++)
#define MP make_pair
#define MT make_tuple // tie,make_tuple は別物
#define PB push_back
using namespace s... | replace | 23 | 25 | 23 | 25 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
rep(i, h) cin >> s[i];
vector<vector<int>> cnt(h, vector<int>(w));
rep(i, h) {
vector<int> done(w);
rep(j, w) {
if (s[i][j] == '#')
co... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
rep(i, h) cin >> s[i];
vector<vector<int>> cnt(h, vector<int>(w));
rep(i, h) {
vector<int> done(w);
rep(j, w) {
if (s[i][j] == '#')
co... | replace | 38 | 39 | 38 | 39 | 0 | |
p03014 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<string, int> P;
const ll MOD = 1e9 + 7;
string s[2000];
int irui[2000][2000];
int jrui[2000][2000];
int main() {
int h, w;
cin >> h >> w;
for (... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<string, int> P;
const ll MOD = 1e9 + 7;
string s[2000];
int irui[2000][2000];
int jrui[2000][2000];
int main() {
int h, w;
cin >> h >> w;
for (... | replace | 53 | 58 | 53 | 60 | TLE | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long int i = 0; i < n; ++i)
typedef long long int ll;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
rep(i, h) { cin >> s[i]; }
vector<vector<int>> r(h, vector<int>(w, 0)), l(h, vector<int>(w, 0));
vector<vector<int>> ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long int i = 0; i < n; ++i)
typedef long long int ll;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
rep(i, h) { cin >> s[i]; }
vector<vector<int>> r(h, vector<int>(w, 0)), l(h, vector<int>(w, 0));
vector<vector<int>> ... | replace | 14 | 15 | 14 | 15 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
int main() {
int h, w;
cin >> h >> w;
... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
int main() {
int h, w;
cin >> h >> w;
... | replace | 40 | 41 | 40 | 41 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.... | replace | 70 | 71 | 70 | 71 | 0 | |
p03014 | 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++)
int L[2010][2010];
int R[2010][2010];
int U[2010][2010];
int D[2010][2010];
int main(int argc, char const *argv[]) {
int h, w;
cin >> h >> w;
vector<string> s(h);
rep(i, h) cin >> s[i];
for (... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
int L[2010][2010];
int R[2010][2010];
int U[2010][2010];
int D[2010][2010];
int main(int argc, char const *argv[]) {
int h, w;
cin >> h >> w;
vector<string> s(h);
rep(i, h) cin >> s[i];
for (... | replace | 47 | 48 | 47 | 48 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> s(h, vector<int>(w, 0));
vector<vector<int>> cnt(h, vector<int>(w, 0));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
char c;
cin >> c;
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> s(h, vector<int>(w, 0));
vector<vector<int>> cnt(h, vector<int>(w, 0));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
char c;
cin >> c;
... | replace | 56 | 57 | 56 | 57 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <unordered_map>
#include <vector>
const int mod = 1e9 + 7;
const int kmax = 510000;
const int last_days[] = {31, 28, 31, 30, 31, 30, ... | #include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <unordered_map>
#include <vector>
const int mod = 1e9 + 7;
const int kmax = 510000;
const int last_days[] = {31, 28, 31, 30, 31, 30, ... | replace | 353 | 354 | 353 | 354 | -11 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
static const uint64_t MOD = 1000000007LL;
// uint64_t dp[100005][13];
char grid[2000][2000];
int64_t wc[2000][2000];
int64_t hc[2000][2000];
/* yoko */
void updatewc(int i, int j) {
if (... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
static const uint64_t MOD = 1000000007LL;
// uint64_t dp[100005][13];
char grid[2005][2005];
int64_t wc[2000][2000];
int64_t hc[2000][2000];
/* yoko */
void updatewc(int i, int j) {
if (... | replace | 10 | 11 | 10 | 11 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, m) for (long long i = 0; i < m; i++)
#define per(i, m) for (long long i = m - 1; i >= 0; i--)
#define FOR(i, n, m) for (long long i = n; i < m; i++)
#define ROF(i, n, m) for (long long i = m - 1; i >= n; i--)
#define SORT(v, n) ... | #include <bits/stdc++.h>
#define rep(i, m) for (long long i = 0; i < m; i++)
#define per(i, m) for (long long i = m - 1; i >= 0; i--)
#define FOR(i, n, m) for (long long i = n; i < m; i++)
#define ROF(i, n, m) for (long long i = m - 1; i >= n; i--)
#define SORT(v, n) ... | replace | 133 | 135 | 133 | 135 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
int n, m;
cin >> n >> m;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
}
vector<vector<int>> l(n, vector<int>(m));
vector<vector<int>> r(n, vector<int>(m));
vector<vector<... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
int n, m;
cin >> n >> m;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
}
vector<vector<int>> l(n, vector<int>(m));
vector<vector<int>> r(n, vector<int>(m));
vector<vector<... | replace | 67 | 68 | 67 | 68 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;
int getBlock(vector<int> &r, int fd) {
if (r.empty())
return -1;
auto tp = upper_bound(r.begin(), r.end(), fd);
if (tp == r.begin())
return -1;
tp--;
return *tp;
}
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;
int getBlock(vector<int> &r, int fd) {
if (r.empty())
return -1;
auto tp = upper_bound(r.begin(), r.end(), fd);
if (tp == r.begin())
return -1;
tp--;
return *tp;
}
... | replace | 32 | 33 | 32 | 33 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <iomanip>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
// typedef long long unsigned int ll;
typedef long long ll;
typedef pair<ll, ll> edge;
typedef tuple<ll, ll, ll> tp;
int main() {
ll h, w;
cin >> h >> w;... | #include <algorithm>
#include <bits/stdc++.h>
#include <iomanip>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
// typedef long long unsigned int ll;
typedef long long ll;
typedef pair<ll, ll> edge;
typedef tuple<ll, ll, ll> tp;
int main() {
ll h, w;
cin >> h >> w;... | replace | 18 | 20 | 18 | 21 | -11 | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vint = vector<int>;
using vvint = vector<vint>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vchar = vector<char>;
using vvchar = vector<vchar>;
using vp = vector<P>;
using vpp = vector<pair<P, P>>;
using vvp ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vint = vector<int>;
using vvint = vector<vint>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vchar = vector<char>;
using vvchar = vector<vchar>;
using vp = vector<P>;
using vpp = vector<pair<P, P>>;
using vvp ... | insert | 48 | 48 | 48 | 50 | TLE | |
p03014 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int h, w;
cin >> h >> w;
vector<string> g(h);
for (auto &x : g)
cin >> x;
vector<vector<int>> x(h, vector<int>(w, 0)), y(h, vector<int>(w, 0));
for (int i = 0; i < h; i++) {
... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int h, w;
cin >> h >> w;
vector<string> g(h);
for (auto &x : g)
cin >> x;
vector<vector<int>> x(h, vector<int>(w, 0)), y(h, vector<int>(w, 0));
for (int i = 0; i < h; i++) {
... | replace | 44 | 45 | 44 | 45 | -11 | |
p03014 | C++ | Time Limit Exceeded | // #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;
const int mod = 1e+9 + 7;
int main() {
int h, w;
cin >> h >> w;
vector<vector... | // #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;
const int mod = 1e+9 + 7;
int main() {
int h, w;
cin >> h >> w;
vector<vector... | insert | 56 | 56 | 56 | 60 | TLE | |
p03014 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <string>
#include <vector>
#define ll long long
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s;
vector<vector<int>> snh;
vector<vector<int>> snw;
for (int i = 0; i < h; i++... | #include <algorithm>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <string>
#include <vector>
#define ll long long
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s;
vector<vector<int>> snh;
vector<vector<int>> snw;
for (int i = 0; i < h; i++... | delete | 89 | 105 | 89 | 89 | TLE | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
rep(i, h) cin >> s[i];
vector<vector<int>> cnt(h, vector<int>(w));
rep(i, h) {
vector<int> done(w);
rep(j, w) {
if (s[i... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
rep(i, h) cin >> s[i];
vector<vector<int>> cnt(h, vector<int>(w));
rep(i, h) {
vector<int> done(w);
rep(j, w) {
if (s[i... | replace | 45 | 46 | 45 | 46 | TLE | |
p03014 | C++ | Runtime Error | // QWsin
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define rep(i, x, y) for (int i = x; i <= y; ++i)
#define out(i, u) for (int i = first[u]; i != -1; i = next[i])
#define repvc(i, vc) for (int i = 0, _sz = vc.size(); i < _sz; ++i)
using namespace std;
const int INF = 1 << 30;
typed... | // QWsin
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define rep(i, x, y) for (int i = x; i <= y; ++i)
#define out(i, u) for (int i = first[u]; i != -1; i = next[i])
#define repvc(i, vc) for (int i = 0, _sz = vc.size(); i < _sz; ++i)
using namespace std;
const int INF = 1 << 30;
typed... | replace | 26 | 27 | 26 | 27 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
ll a[2002][2002], b[2002][2002];
string s[2002];
int main() {
ll h, w;
cin >> h >> w;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> s[i][j];
}
}
for (int i = 0; i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
ll a[2002][2002], b[2002][2002];
string s[2002];
int main() {
ll h, w;
cin >> h >> w;
for (int i = 0; i < h; i++) {
cin >> s[i];
}
for (int i = 0; i < h; i++) {
ll cnt = 0;
for (int j =... | replace | 11 | 14 | 11 | 12 | 0 | |
p03014 | 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 (ll i = (ll)(a); i < (ll)(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ll long long
#define lld long double
#define ALL(x) x.begin(), x.end()
#ifdef ... | #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 (ll i = (ll)(a); i < (ll)(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ll long long
#define lld long double
#define ALL(x) x.begin(), x.end()
#ifdef ... | replace | 63 | 65 | 63 | 71 | 0 | |
p03014 | C++ | Runtime Error | // i ll be the king
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define sync \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define input(arr, n) ... | // i ll be the king
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define sync \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define input(arr, n) ... | replace | 28 | 30 | 28 | 30 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define endl "\n"
const int MOD = 1e9 + 7;
#ifndef HOME
#define cerr \
if (0) \
cerr
#endif
int32_t main() ... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define endl "\n"
const int MOD = 1e9 + 7;
#ifndef HOME
#define cerr \
if (0) \
cerr
#endif
int32_t main() ... | replace | 90 | 91 | 90 | 91 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; ++i)
#define REPR(i, n) for (int i = n - 1; i >= 0; --i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = b - 1; i >= a; --i)
#define p(s) cout << (s) << endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#defi... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; ++i)
#define REPR(i, n) for (int i = n - 1; i >= 0; --i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = b - 1; i >= a; --i)
#define p(s) cout << (s) << endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#defi... | replace | 83 | 84 | 83 | 84 | -11 | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
template <typename T> T MatMaximum(vector<vector<T>> &mat) {
vector<T> max_array;
for (auto itr = mat.begin(); itr != mat.end(); ++itr) {
T maximum = *max_element((*itr).begin(), (*itr).end());
max_array.... | #include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
template <typename T> T MatMaximum(vector<vector<T>> &mat) {
vector<T> max_array;
for (auto itr = mat.begin(); itr != mat.end(); ++itr) {
T maximum = *max_element((*itr).begin(), (*itr).end());
max_array.... | replace | 31 | 32 | 31 | 32 | TLE | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repf(i, m, n) for (int(i) = m; (i) < n; (i)++)
#define all(v) (v).begin(),... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repf(i, m, n) for (int(i) = m; (i) < n; (i)++)
#define all(v) (v).begin(),... | replace | 79 | 82 | 79 | 80 | 0 | |
p03014 | C++ | Runtime Error | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author alireza_kaviani
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <class T>
using Tree =
tree<T, n... | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author alireza_kaviani
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <class T>
using Tree =
tree<T, n... | replace | 75 | 76 | 75 | 76 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, n, m) for (int i = n; i < m; i++)
#define ll long long int
using namespace std;
struct UnionFind {
vector<int> par; // par[i]が親を表す
vector<int> _size; // _size[i]でそのノードの属しているサイズを返す
// コンストラクタ
UnionFind(int n) {
_size = ... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, n, m) for (int i = n; i < m; i++)
#define ll long long int
using namespace std;
struct UnionFind {
vector<int> par; // par[i]が親を表す
vector<int> _size; // _size[i]でそのノードの属しているサイズを返す
// コンストラクタ
UnionFind(int n) {
_size = ... | replace | 52 | 54 | 52 | 54 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define sz(x) (int)x.size()
#define endl "\n"
#define repp(i, a, b)... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define sz(x) (int)x.size()
#define endl "\n"
#define repp(i, a, b)... | replace | 20 | 21 | 20 | 21 | 0 | |
p03014 | C++ | Time Limit Exceeded |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#inclu... |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#inclu... | replace | 88 | 109 | 88 | 105 | TLE | |
p03014 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using vvvll = vector<vector<vector<ll>>>;
using vvvvll = vector<vector<vector<vector<ll>>>>;
using pl4 = pair<ll, ll>;
using str = string;
using vpl4 = vector<pair<ll, ll>>;
#define sz size()
... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using vvvll = vector<vector<vector<ll>>>;
using vvvvll = vector<vector<vector<vector<ll>>>>;
using pl4 = pair<ll, ll>;
using str = string;
using vpl4 = vector<pair<ll, ll>>;
#define sz size()
... | replace | 80 | 82 | 80 | 82 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (long long i ... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (long long i ... | replace | 36 | 37 | 36 | 37 | -11 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string.h>
#include <vector>
using namespace std;
int H, W, mr[2000][2000], mc[2000][2000];
string S[2000];
int dr(int n, int m) {
int num;
if (mr[n][m] != -1) {
return mr[n][m];
}
if (S[n][m] == '#') {
mr[n][m] = ... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string.h>
#include <vector>
using namespace std;
int H, W, mr[2000][2000], mc[2000][2000];
string S[2001];
int dr(int n, int m) {
int num;
if (mr[n][m] != -1) {
return mr[n][m];
}
if (S[n][m] == '#') {
mr[n][m] = ... | replace | 10 | 11 | 10 | 11 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int H, W, res = 0; // 縦・横・結果
vector<string> Mass(1010); // マス状態
vector<vector<int>> range_Mass(1010, vector<int>(1010, -1)); // 照らされるマス数
int main() {
cin >> H >> W;
for (int i = 0; i < H; i++)
cin >> Mass[i];
/*以下, 横連続マス数を調査 計算量O(HW)*/
int j = 0;
f... | #include <bits/stdc++.h>
using namespace std;
int H, W, res = 0; // 縦・横・結果
vector<string> Mass(2010); // マス状態
vector<vector<int>> range_Mass(2010, vector<int>(2010, -1)); // 照らされるマス数
int main() {
cin >> H >> W;
for (int i = 0; i < H; i++)
cin >> Mass[i];
/*以下, 横連続マス数を調査 計算量O(HW)*/
int j = 0;
f... | replace | 4 | 6 | 4 | 6 | 0 | |
p03014 | C++ | Runtime Error | //
// main.cpp
//
// https://atcoder.jp/contests/abc127/tasks/abc127_f
#include <algorithm>
#include <array>
#include <assert.h>
#include <functional>
#include <iostream>
#include <limits>
#include <math.h>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#inc... | //
// main.cpp
//
// https://atcoder.jp/contests/abc127/tasks/abc127_f
#include <algorithm>
#include <array>
#include <assert.h>
#include <functional>
#include <iostream>
#include <limits>
#include <math.h>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#inc... | replace | 51 | 52 | 51 | 52 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
// #define int long long
using namespace std;
using LL = long long;
using P = pair<int, int>;
#define FOR(i, a, n) for (int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define pb(a) push_back(a)
#define all(x) (x).begin(), (x).end()
template <typename T> vector<T> make_v... | #include <bits/stdc++.h>
// #define int long long
using namespace std;
using LL = long long;
using P = pair<int, int>;
#define FOR(i, a, n) for (int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define pb(a) push_back(a)
#define all(x) (x).begin(), (x).end()
template <typename T> vector<T> make_v... | replace | 42 | 44 | 42 | 44 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct wawa {
char a;
int yoko, tate;
};
wawa s[2000][2000];
int main() {
int mini = 0;
int h, w;
cin >> h >> w;
for (int i = 0; i <= h + 1; i++) {
for (int j = 0; j <= w + 1; j++) {
if (i == 0 || i == h + 1 || j == 0 || j == w + 1)
s[i][j].a... | #include <bits/stdc++.h>
using namespace std;
struct wawa {
char a;
int yoko, tate;
};
wawa s[2005][2005];
int main() {
int mini = 0;
int h, w;
cin >> h >> w;
for (int i = 0; i <= h + 1; i++) {
for (int j = 0; j <= w + 1; j++) {
if (i == 0 || i == h + 1 || j == 0 || j == w + 1)
s[i][j].a... | replace | 7 | 8 | 7 | 8 | 0 | |
p03014 | C++ | Runtime Error | #define DEBUG 0
#include <bits/stdc++.h>
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, x, n) for (int i = x; i < (n); i++)
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;... | #define DEBUG 0
#include <bits/stdc++.h>
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, x, n) for (int i = x; i < (n); i++)
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;... | insert | 77 | 77 | 77 | 78 | -11 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, m;
char c[1003][1003], tmtmp;
int l[1003][1003], r[1003][1003];
int main() {
cin >> n >> m;
tmtmp = getchar();
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++)
c[i][j] = getchar();
tmtmp = getchar();
}
for (int i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int n, m;
char c[2003][2003], tmtmp;
int l[2003][2003], r[2003][2003];
int main() {
cin >> n >> m;
tmtmp = getchar();
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++)
c[i][j] = getchar();
tmtmp = getchar();
}
for (int i = 0; i < n; i++) {
... | replace | 3 | 5 | 3 | 5 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int H, W;
vector<vector<bool>> maze;
int main() {
cin >> H;
cin >> W;
maze = vector<vector<bool>>(H, vector<bool>(W, true));
for (int i = 0; i < H; i++) {
string s;
cin >> s;
for (int j = 0; j < W;... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int H, W;
vector<vector<bool>> maze;
int main() {
cin >> H;
cin >> W;
maze = vector<vector<bool>>(H, vector<bool>(W, true));
for (int i = 0; i < H; i++) {
string s;
cin >> s;
for (int j = 0; j < W;... | replace | 69 | 70 | 69 | 70 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ALL(v) v.begin(), v.end()
#define V vector
#define P pair
typedef long long ll;
const int INT_INF = 1e9;
const ll INF = 1LL << 30;
const ll MOD = 1e9 + 7;
int l[210][2100], r[2100][2100], u[2100][2100], d[2100][2100];
int main() {
int h, w;
cin >> h >> w;
V... | #include <bits/stdc++.h>
using namespace std;
#define ALL(v) v.begin(), v.end()
#define V vector
#define P pair
typedef long long ll;
const int INT_INF = 1e9;
const ll INF = 1LL << 30;
const ll MOD = 1e9 + 7;
int l[2100][2100], r[2100][2100], u[2100][2100], d[2100][2100];
int main() {
int h, w;
cin >> h >> w;
... | replace | 11 | 12 | 11 | 12 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
#define ll long long
#define P pair<int, int>
#define FOR(i, N) for (int ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
#define ll long long
#define P pair<int, int>
#define FOR(i, N) for (int ... | replace | 100 | 101 | 100 | 101 | -6 | malloc(): corrupted top size
|
p03014 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (int)(n); i++)
#define req(i, n) for (ll i = 1; i... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (int)(n); i++)
#define req(i, n) for (ll i = 1; i... | replace | 32 | 33 | 32 | 33 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(g) (g).begin(), (g).end()
#define REP(i, x, n) for (int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define F(i, j, k) fill(i[0], i[0] + j * j, k)
#define P(p) cout << (p) << endl;
#define SORT(v) sort(all(v))
#define SORTD(v) sort(all(v... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(g) (g).begin(), (g).end()
#define REP(i, x, n) for (int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define F(i, j, k) fill(i[0], i[0] + j * j, k)
#define P(p) cout << (p) << endl;
#define SORT(v) sort(all(v))
#define SORTD(v) sort(all(v... | replace | 82 | 84 | 82 | 84 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.