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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02734 | 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() {
// dp[i + 1][j] A[i]までで和がjにできるような場合の数
ll N, S, MOD = 998244353;
cin >> N >> S;
vector<ll> A(N);
rep(i, N) cin >> A[i];
vector<vector<ll>> dp(N + 1, vector<ll>(S + 1, 0));
rep(i,... | #include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
// dp[i + 1][j] A[i]までで和がjにできるような場合の数
ll N, S, MOD = 998244353;
cin >> N >> S;
vector<ll> A(N);
rep(i, N) cin >> A[i];
vector<vector<ll>> dp(N + 1, vector<ll>(3001, 0));
rep(i, ... | replace | 12 | 13 | 12 | 13 | 0 | |
p02734 | C++ | Time Limit Exceeded | #ifdef LOCAL
#pragma GCC optimize("O0")
#else
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
#endif
#include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <st... | #ifdef LOCAL
#pragma GCC optimize("O0")
#else
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
#endif
#include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <st... | delete | 434 | 436 | 434 | 434 | TLE | |
p02734 | C++ | Runtime Error | #pragma region template 2.4
#include <bits/stdc++.h>
using namespace std;
template <typename T> using pq_asc = priority_queue<T, vector<T>, greater<T>>;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<ll, ll> ii;
typedef vector<ii> vii;
typedef vector<string> vs;
#define REP(i, n) for ... | #pragma region template 2.4
#include <bits/stdc++.h>
using namespace std;
template <typename T> using pq_asc = priority_queue<T, vector<T>, greater<T>>;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<ll, ll> ii;
typedef vector<ii> vii;
typedef vector<string> vs;
#define REP(i, n) for ... | replace | 184 | 185 | 184 | 187 | 0 | |
p02734 | C++ | Runtime Error | // #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define FastRead \
ios::sync_with_stdio(0); \
... | // #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define FastRead \
ios::sync_with_stdio(0); \
... | delete | 85 | 89 | 85 | 85 | -11 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int, int>
#define pb push_back
int n, s;
int const N = 1e3 + 10, M = 998244353;
int a[N];
int dp[N][2 * N][3];
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> n >> s;
for (int i = 1... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int, int>
#define pb push_back
int n, s;
int const N = 3e3 + 10, M = 998244353;
int a[N];
int dp[N][2 * N][3];
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> n >> s;
for (int i = 1... | replace | 8 | 9 | 8 | 9 | 0 | |
p02734 | C++ | Runtime Error | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,avx,avx2,mmx,abm")
#pragma GCC optimize("O3,unroll-loops,inline")
#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int MAXN = 3010;
int n, s;
int a[MAXN];
int dp[MAXN];
signed main() {
scanf("%d%d", &n, &s);
for (int i = 1; ... | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,avx,avx2,mmx,abm")
#pragma GCC optimize("unroll-loops,inline")
#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int MAXN = 3010;
int n, s;
int a[MAXN];
int dp[MAXN];
signed main() {
scanf("%d%d", &n, &s);
for (int i = 1; i <... | replace | 1 | 2 | 1 | 2 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n, S, dp[3030][3030], a[3030];
const ll Mod = 998244353;
void Add_Self(ll &x, ll y) { x = (x + y) % Mod; }
ll Rec(int i, int Have) {
if (i == n)
return (Have == S ? 1 : 0);
if (Have == S)
return n - (i - 1);
if (dp[i][Have] != -1)
... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n, S, dp[3030][3030], a[3030];
const ll Mod = 998244353;
void Add_Self(ll &x, ll y) { x = (x + y) % Mod; }
ll Rec(int i, int Have) {
if (i == n)
return (Have == S ? 1 : 0);
if (Have == S)
return n - (i - 1);
if (dp[i][Have] != -1)
... | replace | 20 | 21 | 20 | 21 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxs = 1e6 + 5;
const ll lmaxs = 20;
ll mod = 1e9 + 7;
ll oo = 1e15;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxs = 1e6 + 5;
const ll lmaxs = 20;
ll mod = 1e9 + 7;
ll oo = 1e15;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(... | replace | 43 | 46 | 43 | 44 | -11 | |
p02734 | C++ | Runtime Error | #include <cmath>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define rep2(i, a, b) for (int i = a; i >= b; i--)
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
#define ll long long
#... | #include <cmath>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define rep2(i, a, b) for (int i = a; i >= b; i--)
/* run this program using the console pauser or add your own getch,
* system("pause") or input loop */
#define ll long long
#... | insert | 22 | 22 | 22 | 24 | 0 | |
p02734 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | replace | 172 | 173 | 172 | 173 | 0 | |
p02734 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
#define LL long long
int main() {
// freopen("a.txt", "r", stdin);
int mod = 998244353;
int N, S, res = 0;
cin >> N >> S;
vector<int> A(N + 1, 0);
for (int i = 1; i <= N; ++i)
cin >> A[i];
vector<int> dp(S + 1, 0);
for (int i = 1; i <= ... | #include <iostream>
#include <vector>
using namespace std;
#define LL long long
int main() {
// freopen("a.txt", "r", stdin);
int mod = 998244353;
int N, S, res = 0;
cin >> N >> S;
vector<int> A(N + 1, 0);
for (int i = 1; i <= N; ++i)
cin >> A[i];
vector<int> dp(S + 1, 0);
for (int i = 1; i <= ... | replace | 21 | 23 | 21 | 24 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
template <class T> inline bool chmax(T &a, T b) {
if (... | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
template <class T> inline bool chmax(T &a, T b) {
if (... | replace | 40 | 41 | 40 | 41 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define db(x) (cerr << #x << ": " << (x) << '\n')
#define cps CLOCKS_PER_SEC
#define tests(t) \
int t; ... | #include <bits/stdc++.h>
#define pb push_back
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define db(x) (cerr << #x << ": " << (x) << '\n')
#define cps CLOCKS_PER_SEC
#define tests(t) \
int t; ... | replace | 29 | 30 | 29 | 30 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T> void chmin(T &a, const T &b) noexcept {
if (b < a)
a = b;
}
template <class T> void chmax(T &a, const T &b) noexcep... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T> void chmin(T &a, const T &b) noexcept {
if (b < a)
a = b;
}
template <class T> void chmax(T &a, const T &b) noexcep... | replace | 83 | 84 | 83 | 85 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define pii pair<int, int>
#define F first
#define S second
#define pb push_back
using namespace std;
const int N = 3003, mod = 998244353;
int a[N], dp[2][N], n, s, ans;
int M(int x) {
int ret = x % mod;
ret += mod;
ret %= mod;
return ret;
}
signed main() {
cin >... | #include <bits/stdc++.h>
#define int long long
#define pii pair<int, int>
#define F first
#define S second
#define pb push_back
using namespace std;
const int N = 3003, mod = 998244353;
int a[N], dp[2][N], n, s, ans;
int M(int x) {
int ret = x % mod;
ret += mod;
ret %= mod;
return ret;
}
signed main() {
cin >... | replace | 25 | 26 | 25 | 29 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
void solve(int TestCase) {
constexpr int MOD = 998244353;
int n, s;
cin >> n >> s;
auto A = vector<int>(n);
for (auto &x : A)
cin >> x;
auto dp = vector<vector<long long>>(n, vector<long long>(s + 1));
auto sum = vector<long long>(s + 1);
for (auto i ... | #include <bits/stdc++.h>
using namespace std;
void solve(int TestCase) {
constexpr int MOD = 998244353;
int n, s;
cin >> n >> s;
auto A = vector<int>(n);
for (auto &x : A)
cin >> x;
auto dp = vector<vector<long long>>(n, vector<long long>(3001));
auto sum = vector<long long>(3001);
for (auto i = ... | replace | 12 | 14 | 12 | 14 | 0 | |
p02734 | 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;
const int INF = (1 << 30) - 1;
const long long LINF = (1LL << 62) - 1;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
const int INF = (1 << 30) - 1;
const long long LINF = (1LL << 62) - 1;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | replace | 115 | 116 | 115 | 117 | 0 | |
p02734 | C++ | Runtime Error | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,avx,avx2,mmx,abm")
#pragma GCC optimize("O3,unroll-loops,inline")
#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
int add(int a, int b) {
a += b;
if (a >= MOD)
a -= MOD;
return a;
}
const int MAXN = 3010;
int n, s;
int a[M... | // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,avx,avx2,mmx,abm")
// #pragma GCC optimize("O3,unroll-loops,inline")
#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
int add(int a, int b) {
a += b;
if (a >= MOD)
a -= MOD;
return a;
}
const int MAXN = 3010;
int n, s;
i... | replace | 0 | 2 | 0 | 2 | 0 | |
p02734 | Python | Runtime Error | import numpy as np
n, s = map(int, input().split())
aaa = list(map(int, input().split()))
fwd_acc = np.zeros((n + 1, s + 1), dtype=np.int64)
fwd_acc[0][0] = 1
ans = 0
MOD = 998244353
for i, a in enumerate(aaa, start=1):
fwd_acc[i] = fwd_acc[i - 1]
fwd_acc[i][0] = i
if a <= s:
fwd_acc[i][a:] += fw... | import numpy as np
n, s = map(int, input().split())
aaa = list(map(int, input().split()))
fwd_acc = np.zeros((n + 1, s + 1), dtype=np.int64)
fwd_acc[0][0] = 1
ans = 0
MOD = 998244353
for i, a in enumerate(aaa, start=1):
fwd_acc[i] = fwd_acc[i - 1]
fwd_acc[i][0] = i
if a <= s:
fwd_acc[i][a:] = fwd... | replace | 14 | 16 | 14 | 19 | TLE | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define fr(i, j, k) for (i = j; i < (k); i++)
#define all(x) x.begin(), x.end()
#define el '\n'
#define remax(a, b) a = max(a, b)
#define remin(a, b) a = min(a, b)
#defin... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define fr(i, j, k) for (i = j; i < (k); i++)
#define all(x) x.begin(), x.end()
#define el '\n'
#define remax(a, b) a = max(a, b)
#define remin(a, b) a = min(a, b)
#defin... | replace | 29 | 30 | 29 | 30 | 0 | |
p02734 | C++ | Runtime Error | /*
Author : N_o_o_B
Created : March 22 2020 18:30:12
*/
#include <bits/stdc++.h>
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
#define TRACE
#ifdef TRACE
#define trace(...) ... | /*
Author : N_o_o_B
Created : March 22 2020 18:30:12
*/
#include <bits/stdc++.h>
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
#define TRACE
#ifdef TRACE
#define trace(...) ... | replace | 207 | 208 | 207 | 209 | 0 | Time Taken : 0.00012
|
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define int int64_t
const int MOD = 998244353;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, s;
cin >> n >> s;
int arr[n + 1];
arr[0] = 0;
for (int i = 1; i <= n; i++) {
cin >> arr[i... | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define int int64_t
const int MOD = 998244353;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, s;
cin >> n >> s;
int arr[n + 1];
arr[0] = 0;
for (int i = 1; i <= n; i++) {
cin >> arr[i... | replace | 30 | 31 | 30 | 32 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) { ... | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) { ... | replace | 32 | 33 | 32 | 33 | -11 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define endl '\n'
#define ll long long
const int N = 3e2 + 5;
ll mod = 998244353;
ll a[N], dp[N][N], pre[N];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
if (fopen(".INP", "r")) {
freopen(".INP", "r", st... | #include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define endl '\n'
#define ll long long
const int N = 3e3 + 5;
ll mod = 998244353;
ll a[N], dp[N][N], pre[N];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
if (fopen(".INP", "r")) {
freopen(".INP", "r", st... | replace | 6 | 7 | 6 | 7 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll, ll> pll;
typedef vector<bool> vb;
const ll oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
#define sz(c) ll((c).size())
#define all(c) begin(c), end(c)
#define FOR(i, a, b) for (ll i = ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll, ll> pll;
typedef vector<bool> vb;
const ll oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
#define sz(c) ll((c).size())
#define all(c) begin(c), end(c)
#define FOR(i, a, b) for (ll i = ... | replace | 42 | 43 | 42 | 44 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 3005;
int v[N];
long long dp[N];
const int MOD = 998244353;
int main() {
int n, s;
cin >> n >> s;
for (int i = 1; i <= n; i++) {
cin >> v[i];
}
long long ans = 0;
for (int i = 1; i <= n; i++) {
dp[0] = i % MOD;
ans += (1LL * dp[s - v[i]... | #include <bits/stdc++.h>
using namespace std;
const int N = 3005;
int v[N];
long long dp[N];
const int MOD = 998244353;
int main() {
int n, s;
cin >> n >> s;
for (int i = 1; i <= n; i++) {
cin >> v[i];
}
long long ans = 0;
for (int i = 1; i <= n; i++) {
dp[0] = i % MOD;
if (v[i] <= s) {
an... | replace | 15 | 20 | 15 | 22 | 0 | |
p02734 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include ... | replace | 113 | 114 | 113 | 114 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MAX_N 3000
using namespace std;
typedef long long lint;
const lint MOD = 998244353LL;
int n, s;
int v[MAX_N + 9];
lint ap[MAX_N + 9];
void modd(lint &a) {
if (a >= MOD)
a -= MOD;
if (a < 0)
a += MOD;
}
void modd(int &a) {
if (a >= MOD)
a -= MOD;
if (a < 0)
... | #include <bits/stdc++.h>
#define MAX_N 3000
using namespace std;
typedef long long lint;
const lint MOD = 998244353LL;
int n, s;
int v[MAX_N + 9];
lint ap[MAX_N + 9];
void modd(lint &a) {
if (a >= MOD)
a -= MOD;
if (a < 0)
a += MOD;
}
void modd(int &a) {
if (a >= MOD)
a -= MOD;
if (a < 0)
... | replace | 44 | 45 | 44 | 45 | 0 | |
p02734 | C++ | Runtime Error | typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll n, s;
std::cin >> n >> s;
vector<ll> a(n);
const ll MOD = 998244353;
for (int i = 0; i < n; i++) {
std::cin >> a[i];
}
vector<vector<ll>> dp(n + 1, vector<ll>(s + 1, 0));
dp[0][0] = 1;
ll ans = 0;
for (int i ... | typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll n, s;
std::cin >> n >> s;
vector<ll> a(n);
const ll MOD = 998244353;
for (int i = 0; i < n; i++) {
std::cin >> a[i];
}
vector<vector<ll>> dp(n + 1, vector<ll>(3001, 0));
dp[0][0] = 1;
ll ans = 0;
for (int i =... | replace | 14 | 15 | 14 | 15 | 0 | |
p02734 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespa... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespa... | replace | 94 | 95 | 94 | 96 | 0 | |
p02734 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) begin(v), end(v)
#define fi first
#define se second
template <typename A, typename B> inline bool chmax(A &a, B b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) begin(v), end(v)
#define fi first
#define se second
template <typename A, typename B> inline bool chmax(A &a, B b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
... | replace | 137 | 138 | 137 | 138 | -6 | munmap_chunk(): invalid pointer
|
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define sz(x) (int)x.size()
#define F first
#define S second
#define endl "\n"
#define inf 1000000007
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define bigboi 1e18
mt19937 RNG(chrono::st... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define sz(x) (int)x.size()
#define F first
#define S second
#define endl "\n"
#define inf 1000000007
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define bigboi 1e18
mt19937 RNG(chrono::st... | replace | 20 | 21 | 20 | 21 | 0 |
Time elapsed: 29ms
|
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
int i, j;
for (i = 0; i < h; i++)
cin >> s[i];
int ans = 1 << 30;
int tmp[h][w];
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
tmp[i][j] = 1 << 30;
}
}
queue<pair<pair<int... | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
int i, j;
for (i = 0; i < h; i++)
cin >> s[i];
int ans = 1 << 30;
int tmp[h][w];
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
tmp[i][j] = 1 << 30;
}
}
queue<pair<pair<int... | replace | 29 | 30 | 29 | 30 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int solve(int h, int w, vector<vector<int>> &k, vector<vector<int>> &u) {
if (h == 1 && w == 1) {
return u[1][1];
}
if (h == 0)
return 100000;
if (w == 0)
return 100000;
else {
int a = solve(h, w... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int solve(int h, int w, vector<vector<int>> &k, vector<vector<int>> &u) {
if (h == 1 && w == 1) {
return u[1][1];
}
if (k[h][w] <= 10000)
return k[h][w];
if (h == 0)
return 100000;
if (w == 0)
re... | insert | 7 | 7 | 7 | 9 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
vector<vector<bool>> White(100, vector<bool>(100, false));
vector<vector<int>> Steps(100, vector<int>(100, 100000));
int H, W;
void search(int h, int w, int prevStep, bool prevBlack) {
if (h >= H || w >= W)
return;
if (Steps.at(h).at(w) < prevStep)
return;
if... | #include <bits/stdc++.h>
using namespace std;
vector<vector<bool>> White(100, vector<bool>(100, false));
vector<vector<int>> Steps(100, vector<int>(100, 100000));
int H, W;
void search(int h, int w, int prevStep, bool prevBlack) {
if (h >= H || w >= W)
return;
if (Steps.at(h).at(w) <= prevStep)
return;
i... | replace | 9 | 10 | 9 | 10 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define V vector
typedef V<int> vi;
typedef V<vi> vvi;
typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
con... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define V vector
typedef V<int> vi;
typedef V<vi> vvi;
typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
con... | replace | 41 | 42 | 41 | 42 | TLE | |
p02735 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
const ll MOD = 1000000007;
const long long INF = 1LL << 60;
const double pi = acos(-1.0);
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return tru... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
const ll MOD = 1000000007;
const long long INF = 1LL << 60;
const double pi = acos(-1.0);
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return tru... | replace | 35 | 36 | 35 | 38 | TLE | |
p02735 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i... | replace | 85 | 86 | 85 | 86 | 0 | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const long long D = 1e9 + 7;
long long pow2(long long x, long long y) {
if (y == 0)
return 1;
long long ret = pow2(x, y / 2);
return ret * ret % D * (y % 2 == 1 ? x : 1) % D;
}
char a[105][105];
int n, m;
int dp[105][105];
int s[105][105];
bool b[101][101][101]... | #include <bits/stdc++.h>
using namespace std;
const long long D = 1e9 + 7;
long long pow2(long long x, long long y) {
if (y == 0)
return 1;
long long ret = pow2(x, y / 2);
return ret * ret % D * (y % 2 == 1 ? x : 1) % D;
}
char a[105][105];
int n, m;
int dp[105][105];
int s[105][105];
bool b[102][102][102]... | replace | 16 | 18 | 16 | 22 | 127 | /tmp/4b94f909-f5fd-4ce4-9168-eadc3a8aae62.out: error while loading shared libraries: libstdc++.so.6: failed to map segment from shared object
|
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using maze = vector<string>;
const int NOT_VISITED = -1;
const char WALL = '#';
const char PATH = '.';
queue<pair<int, int>> q_path, q_wall;
int dh[] = {1, 0, -1, 0};
int dw[] = {0, 1, 0, -1};
void bfs(int &cnt, bool flip, maze &m, vector<vector<int>> &dist) {
int h ... | #include <bits/stdc++.h>
using namespace std;
using maze = vector<string>;
const int NOT_VISITED = -1;
const char WALL = '#';
const char PATH = '.';
queue<pair<int, int>> q_path, q_wall;
int dh[] = {1, 0, -1, 0};
int dw[] = {0, 1, 0, -1};
void bfs(int &cnt, bool flip, maze &m, vector<vector<int>> &dist) {
int h ... | replace | 28 | 30 | 28 | 32 | TLE | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// 総数を1000000007(素数)で割った余り
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vec... | #include <bits/stdc++.h>
using namespace std;
// 総数を1000000007(素数)で割った余り
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vec... | insert | 57 | 57 | 57 | 59 | 0 | |
p02735 | C++ | Time Limit Exceeded | /*
ID: espr1t
TASK:
KEYWORDS:
*/
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
using namespace std;
FILE *in = stdin;
FILE *out = stdout;
const int MAX = 101;
const int INF = 1000000001;
int n, m;
char a[MAX][MAX];
int dyn[MAX][MAX][2];
bool isOkay(int row, int col, ... | /*
ID: espr1t
TASK:
KEYWORDS:
*/
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
using namespace std;
FILE *in = stdin;
FILE *out = stdout;
const int MAX = 101;
const int INF = 1000000001;
int n, m;
char a[MAX][MAX];
int dyn[MAX][MAX][2];
bool isOkay(int row, int col, ... | insert | 34 | 34 | 34 | 36 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define p_ary(ary, a, b) \
do { \
cout << "["; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define p_ary(ary, a, b) \
do { \
cout << "["; ... | replace | 112 | 116 | 112 | 116 | TLE | |
p02735 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define eps 1e-8
#define zero(x) (((x) > 0 ? (x) : -(x)) < eps)
#define pause cout << " press ansy key to continue...", cin >> chh
#define file_r(x) freopen(x,... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define eps 1e-8
#define zero(x) (((x) > 0 ? (x) : -(x)) < eps)
#define pause cout << " press ansy key to continue...", cin >> chh
#define file_r(x) freopen(x,... | replace | 86 | 87 | 86 | 87 | -11 | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
int main(int argc, char *argv[]) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int h, w;
cin >> h >> w;
vector<vector<bool>> grid(h, vector<bool>(w... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
int main(int argc, char *argv[]) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int h, w;
cin >> h >> w;
vector<vector<bool>> grid(h, vector<bool>(w... | replace | 33 | 34 | 33 | 34 | 0 | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
using namespace std;
typedef long long ll;
... | #include <bits/stdc++.h>
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
using namespace std;
typedef long long ll;
... | replace | 35 | 37 | 35 | 39 | -11 | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, n, m) for (int i = m; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int h, w;
cin >> h >> w;
vector<vector<char>> wh(h, vector<char>(w));
vector<vector<int>> dp(h, vector<int>(w));
rep(i, h) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, n, m) for (int i = m; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int h, w;
cin >> h >> w;
vector<vector<char>> wh(h, vector<char>(w));
vector<vector<int>> dp(h, vector<int>(w));
rep(i, h) {
... | replace | 37 | 39 | 37 | 39 | 0 | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;
const ll dx[] = {1, 0};
const ll dy[] = {0, 1};
int main() {
ll h, w;
cin >> h >> w;
vector<string> s(h);
for (auto &&e : s) {
cin >> e;
}
vector<vector<ll>> dp(h, vector<ll>(w, ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;
const ll dx[] = {1, 0};
const ll dy[] = {0, 1};
int main() {
ll h, w;
cin >> h >> w;
vector<string> s(h);
for (auto &&e : s) {
cin >> e;
}
vector<vector<ll>> dp(h, vector<ll>(w, ... | replace | 28 | 30 | 28 | 33 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
bool CanGo(int y, int x, int R, int C) {
return y >= 0 && y < R && x >= 0 && x < C;
}
int ToBlock(vector<vector<char>> &Map, int y1, int x1, int y2, int x2) {
return Map[y1][x1] == '.' && Map[y2][x2] == '#' ? -1 : 0;
... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
bool CanGo(int y, int x, int R, int C) {
return y >= 0 && y < R && x >= 0 && x < C;
}
int ToBlock(vector<vector<char>> &Map, int y1, int x1, int y2, int x2) {
return Map[y1][x1] == '.' && Map[y2][x2] == '#' ? -1 : 0;
... | insert | 32 | 32 | 32 | 33 | TLE | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | replace | 107 | 108 | 107 | 108 | 0 | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define DUMP(x) std::cerr << (#x) << " = " << (x) << "\n"
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define EREP(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define RREP(i, a, b) for (int i = (int)(a)-1; i >= (int)(b); --i)
#define rep(i, n) R... | #include <bits/stdc++.h>
using namespace std;
#define DUMP(x) std::cerr << (#x) << " = " << (x) << "\n"
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define EREP(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define RREP(i, a, b) for (int i = (int)(a)-1; i >= (int)(b); --i)
#define rep(i, n) R... | replace | 144 | 145 | 144 | 145 | -11 | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <time.h>
using namespace std;
typedef long long ll;
typedef pair<ll, pair<ll, ll>> ipair;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABS(x) ((x) < 0 ? -(x) : ... | #include <bits/stdc++.h>
#include <time.h>
using namespace std;
typedef long long ll;
typedef pair<ll, pair<ll, ll>> ipair;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABS(x) ((x) < 0 ? -(x) : ... | replace | 33 | 37 | 33 | 34 | -11 | |
p02735 | C++ | Time Limit Exceeded | // #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
#define pb(i) push_back(i)
#define pp() pop_back()
#define f first
#define s second
#define mk(l, r) make_pair(l, r)
#define all(vc) vc.begin(), vc.end()
#define bg(vc) vc.begin()
#define ed(vc) v... | // #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
#define pb(i) push_back(i)
#define pp() pop_back()
#define f first
#define s second
#define mk(l, r) make_pair(l, r)
#define all(vc) vc.begin(), vc.end()
#define bg(vc) vc.begin()
#define ed(vc) v... | replace | 48 | 52 | 48 | 77 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define SZ(v) int((v).size())
#define ALL(vec) begin(vec), end(vec)
typedef long long i64;
template <typename T> inline bool uax(T &x, T y) {
return (y > x) ? x = y, true : false;
}
template <typename T> inline bool uin(T &x, T y) {
return (y < x) ? x = y, true : false;... | #include <bits/stdc++.h>
using namespace std;
#define SZ(v) int((v).size())
#define ALL(vec) begin(vec), end(vec)
typedef long long i64;
template <typename T> inline bool uax(T &x, T y) {
return (y > x) ? x = y, true : false;
}
template <typename T> inline bool uin(T &x, T y) {
return (y < x) ? x = y, true : false;... | replace | 74 | 75 | 74 | 76 | TLE | |
p02735 | C++ | Runtime Error | // LightOj Pass : qavajxyq
#include <bits/stdc++.h>
#define deb(x) cerr << (#x) << " : " << x << "\n"
#define ll long long int
#define ld long double
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
ll powmod(ll a, ll b, ll mod = MOD) {
ll res = 1ll;
b %= (mod - 1ll), a %= mod;
while (b) {
... | // LightOj Pass : qavajxyq
#include <bits/stdc++.h>
#define deb(x) cerr << (#x) << " : " << x << "\n"
#define ll long long int
#define ld long double
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
ll powmod(ll a, ll b, ll mod = MOD) {
ll res = 1ll;
b %= (mod - 1ll), a %= mod;
while (b) {
... | delete | 23 | 27 | 23 | 23 | -11 | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define FORS(i, a, b, c) for (int i = a; i < b; i += c)
#define FORN(i, a, b) for (int i = a; i <= b; i++)
#define FORD(i, a, b) for (int i = a - 1; i >= b; i--)
#define FORE(i, b) for (auto &i : b)
#define REP(i, b) FOR(i, ... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define FORS(i, a, b, c) for (int i = a; i < b; i += c)
#define FORN(i, a, b) for (int i = a; i <= b; i++)
#define FORD(i, a, b) for (int i = a - 1; i >= b; i--)
#define FORE(i, b) for (auto &i : b)
#define REP(i, b) FOR(i, ... | replace | 82 | 83 | 82 | 83 | 0 | |
p02735 | C++ | Time Limit Exceeded | /*
This code has been written by MinakoKojima, feel free to ask me question. Blog:
http://www.shuizilong.com/house Template Date: 2015.10.12 Note: ...
*/
#pragma comment(linker, "/STACK:36777216")
// #pragma GCC optimize ("O2")
#define LOCAL
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climit... | /*
This code has been written by MinakoKojima, feel free to ask me question. Blog:
http://www.shuizilong.com/house Template Date: 2015.10.12 Note: ...
*/
#pragma comment(linker, "/STACK:36777216")
// #pragma GCC optimize ("O2")
#define LOCAL
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climit... | replace | 565 | 566 | 565 | 566 | TLE | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; i++) {
cin >> s[i];
}
vector<vector<int>> dp(h, vector<int>(h, 1e5));
if (s[0][0] == '#')
dp[0][0] = 1;
else
dp[0][0] = 0;
for (int i = 0; i... | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; i++) {
cin >> s[i];
}
vector<vector<int>> dp(h, vector<int>(w, 1e5));
if (s[0][0] == '#')
dp[0][0] = 1;
else
dp[0][0] = 0;
for (int i = 0; i... | replace | 10 | 11 | 10 | 11 | 0 | |
p02735 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int H, W;
cin >> H >> W;
vector<string> s(H);
for (int i = ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int H, W;
cin >> H >> W;
vector<string> s(H);
for (int i = ... | replace | 30 | 32 | 30 | 32 | 0 | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "dump.hpp"
#else
#define dump(...)
#define dumpv(...)
#endif
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mins(x, y) (x = min(x, y))
#define maxs(x, y) (x = max(x, y))
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
us... | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "dump.hpp"
#else
#define dump(...)
#define dumpv(...)
#endif
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mins(x, y) (x = min(x, y))
#define maxs(x, y) (x = max(x, y))
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
us... | replace | 45 | 46 | 45 | 46 | TLE | |
p02735 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <chrono>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define endl '\n'
const int dx[2] = {+1, 0};
const int dy[2] = {0, +1};
int main() {
ios_b... | #include <algorithm>
#include <bitset>
#include <chrono>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define endl '\n'
const int dx[2] = {+1, 0};
const int dy[2] = {0, +1};
int main() {
ios_b... | replace | 43 | 44 | 43 | 44 | 0 | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ALL(A) (A).begin(), (A).end()
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a ... | #include <bits/stdc++.h>
#define ALL(A) (A).begin(), (A).end()
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a ... | replace | 57 | 61 | 57 | 61 | TLE | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define pb push_back
#define mp make_pair
#define INF (int)1e9
#define cBits(x) __builtin_popcount(x)
#define gcd(a, b) __gcd((a), (b))
#define lcm(a, b) a / gcd(a, b) * b
#define FOR(i, a, b) for (int i = a; i < b; i++)
#defi... | #include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define pb push_back
#define mp make_pair
#define INF (int)1e9
#define cBits(x) __builtin_popcount(x)
#define gcd(a, b) __gcd((a), (b))
#define lcm(a, b) a / gcd(a, b) * b
#define FOR(i, a, b) for (int i = a; i < b; i++)
#defi... | delete | 30 | 36 | 30 | 30 | -11 | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pdd;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef vector<pll> vpl;
#define ALL(a) a.begin(), a.end()
#define SZ(a) ((int)a.size())
#define F... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pdd;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef vector<pll> vpl;
#define ALL(a) a.begin(), a.end()
#define SZ(a) ((int)a.size())
#define F... | insert | 73 | 73 | 73 | 75 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
using graph = vector<vector<int>>;
using pii = pair<int, int>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repd(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++)
#defin... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
using graph = vector<vector<int>>;
using pii = pair<int, int>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repd(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++)
#defin... | insert | 160 | 160 | 160 | 162 | TLE | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define MOD 1000000007
#define rep(i, n) for (ll(i) = 0LL; (i) < (ll)(n); (i)++)
#define rep2(i, s, e) for (ll(i) = (ll)(s); (i) < (ll)(e); (i)++)
#define repi(i, n) for (ll(i) = 0LL; (i) <= (l... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define MOD 1000000007
#define rep(i, n) for (ll(i) = 0LL; (i) < (ll)(n); (i)++)
#define rep2(i, s, e) for (ll(i) = (ll)(s); (i) < (ll)(e); (i)++)
#define repi(i, n) for (ll(i) = 0LL; (i) <= (l... | replace | 66 | 68 | 66 | 68 | 0 | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
typedef vector<ll> vel;
typedef vector<int> vei;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<int>> ve_vei;
typedef v... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
typedef vector<ll> vel;
typedef vector<int> vei;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<int>> ve_vei;
typedef v... | replace | 63 | 64 | 63 | 64 | TLE | |
p02735 | C++ | Runtime Error | #pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstrea... | #pragma GCC optimize("O3", "unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#inclu... | delete | 1 | 2 | 1 | 1 | 0 | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<ll> vl;
typedef pair<ll, ll> pll;
#define MOD 1000000007
#define INF 1000000000
#define mp make_pair
#define pb push_back
#define ss second
#define ff first
#define endl '\n'
#define pl cout << endl;
void fast() {... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<ll> vl;
typedef pair<ll, ll> pll;
#define MOD 1000000007
#define INF 1000000000
#define mp make_pair
#define pb push_back
#define ss second
#define ff first
#define endl '\n'
#define pl cout << endl;
void fast() {... | delete | 22 | 26 | 22 | 22 | 0 | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
int n, m;
char s[105][105];
int f[105][105][205];
bool vis[105][105][205];
int F(int x, int y, int i) {
if (x >= n || y >= m)
return 1e9;
int &ans = f[x][y][i];
if (vis[x][y][i])
return ans;
a... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
int n, m;
char s[105][105];
int f[105][105][205];
bool vis[105][105][205];
int F(int x, int y, int i) {
if (x >= n || y >= m)
return 1e9;
int &ans = f[x][y][i];
if (vis[x][y][i])
return ans;
v... | insert | 18 | 18 | 18 | 19 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
... | replace | 81 | 82 | 81 | 82 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << "\n"
#define COUTF(x) cout << setprecision(15) << (x) << "\n"
#define ENDL cout << "\n"
#d... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << "\n"
#define COUTF(x) cout << setprecision(15) << (x) << "\n"
#define ENDL cout << "\n"
#d... | replace | 155 | 156 | 155 | 156 | TLE | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxs = 1e6 + 5;
const ll lmaxs = 20;
ll mod = 1e9 + 7;
ll oo = 1e15;
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxs = 1e6 + 5;
const ll lmaxs = 20;
ll mod = 1e9 + 7;
ll oo = 1e15;
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(... | replace | 64 | 65 | 64 | 65 | -11 | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr int Inf = 1000000000;
constexpr ll INF = 1e18;
constexpr ll MOD = 1000000007;
const double PI = 3.1415926535897;
typedef pair<int, int> P;
int H, W;
vector<vector<char>> vec(110, vector<char>(110));
vector<vector<int>> ret(110, vector<int>(1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr int Inf = 1000000000;
constexpr ll INF = 1e18;
constexpr ll MOD = 1000000007;
const double PI = 3.1415926535897;
typedef pair<int, int> P;
int H, W;
vector<vector<char>> vec(110, vector<char>(110));
vector<vector<int>> ret(110, vector<int>(1... | replace | 34 | 35 | 34 | 35 | TLE | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
#define _LIBCPP_DEBUG 0
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define MOD (1000000007)
#define vi vector<int>
#define vl vector<ll>
#define vb vector<b... | #include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
#define _LIBCPP_DEBUG 0
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define MOD (1000000007)
#define vi vector<int>
#define vl vector<ll>
#define vb vector<b... | replace | 219 | 254 | 219 | 245 | TLE | |
p02735 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int H, W;
int i, j;
cin >> H >> W;
vector<vector<int>> dp(H, vector<int>(W, 0));
vector<string> s(H);
for (auto &a : s)
cin >> a;
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int H, W;
int i, j;
cin >> H >> W;
vector<vector<int>> dp(H, vector<int>(W, 0));
vector<string> s(H);
for (auto &a : s)
cin >> a;
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {... | replace | 33 | 34 | 33 | 34 | -11 | |
p02735 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
char a[105][105];
int d[105][105];
int dx[] = {0, 1};
int dy[] = {1, 0};
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> a[i][j];
... | #include <bits/stdc++.h>
using namespace std;
char a[105][105];
int d[105][105];
int dx[] = {0, 1};
int dy[] = {1, 0};
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> a[i][j];
... | replace | 37 | 38 | 37 | 38 | 0 | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const string ln = "\n";
constexpr int INF = 1001001001;
constexpr int MOD = 1000000007;
int dy[] = {0, 1};
int dx[] = {1, 0};
int main() {
cin.ti... | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const string ln = "\n";
constexpr int INF = 1001001001;
constexpr int MOD = 1000000007;
int dy[] = {0, 1};
int dx[] = {1, 0};
int main() {
cin.ti... | replace | 35 | 51 | 35 | 44 | TLE | |
p02735 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define fas... | #include <algorithm>
#include <bitset>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define fas... | replace | 127 | 131 | 127 | 133 | -11 | |
p02735 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using ll = long long;
const int INF = 1e9;
int h, w;
vector<vector<int>> dp(100, vector<int>(100, INF));
string s[100];
int dx[2] = {1, 0};
int dy[2] = {0, 1};
int dfs(int i, int j) {
if (dp[i][j] != INF)
return dp[... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using ll = long long;
const int INF = 1e9;
int h, w;
vector<vector<int>> dp(100, vector<int>(100, INF));
string s[100];
int dx[2] = {1, 0};
int dy[2] = {0, 1};
int dfs(int i, int j) {
if (dp[i][j] != INF)
return dp[... | replace | 25 | 26 | 25 | 26 | TLE | |
p02736 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#def... | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#def... | replace | 49 | 50 | 49 | 50 | 0 | |
p02736 | C++ | Runtime Error | // Author: Vamsi Krishna Reddy Satti
// With love for Competitive Programming!
#pragma GCC optimize("Ofast,unroll-loops,-ffloat-store")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
string to_string(const string &s) { return '"' + s + '"'; }
... | // Author: Vamsi Krishna Reddy Satti
// With love for Competitive Programming!
// #pragma GCC optimize ("Ofast,unroll-loops,-ffloat-store")
// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
string to_string(const string &s) { return '"' + s +... | replace | 3 | 5 | 3 | 5 | 0 | |
p02736 | C++ | Time Limit Exceeded | #include <algorithm>
#include <stdio.h>
int popcnt(int x) {
x = (x & 0x55555555) + ((x >> 1) & 0x55555555);
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
x = (x & 0x0f0f0f0f) + ((x >> 4) & 0x0f0f0f0f);
x = (x & 0x00ff00ff) + ((x >> 8) & 0x00ff00ff);
x = (x & 0x0000ffff) + ((x >> 16) & 0x0000ffff);
return... | #include <algorithm>
#include <stdio.h>
int popcnt(int x) {
x = (x & 0x55555555) + ((x >> 1) & 0x55555555);
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
x = (x & 0x0f0f0f0f) + ((x >> 4) & 0x0f0f0f0f);
x = (x & 0x00ff00ff) + ((x >> 8) & 0x00ff00ff);
x = (x & 0x0000ffff) + ((x >> 16) & 0x0000ffff);
return... | replace | 16 | 17 | 16 | 17 | TLE | |
p02736 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | replace | 208 | 223 | 208 | 209 | 0 | |
p02736 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#ifdef LOCAL_DEBUG
#define DEBUG 1
#define CERR \
if (DEBUG) \
cerr
#define MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, NAME, ...) NAME
#define pr(...) ... | #include <bits/stdc++.h>
#ifdef LOCAL_DEBUG
#define DEBUG 1
#define CERR \
if (DEBUG) \
cerr
#define MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, NAME, ...) NAME
#define pr(...) ... | replace | 281 | 283 | 281 | 283 | TLE | |
p02736 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ch = char;
typedef pair<ll, ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i, a, b) for (ll i = a; i < b; i++)
... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ch = char;
typedef pair<ll, ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i, a, b) for (ll i = a; i < b; i++)
... | replace | 30 | 31 | 30 | 31 | 0 | |
p02736 | C++ | Runtime Error | #include <bits/stdc++.h>
#define lld long long int
#define ld long double
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define rep(i, a, b) for (lld i = a; i <= b; i++)
#define repr(i, a, b) for (lld i = a; i >= b; i--)
#define ar array
#define pb push_back
#define mp make_pair
#define ios ... | #include <bits/stdc++.h>
#define lld long long int
#define ld long double
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define rep(i, a, b) for (lld i = a; i <= b; i++)
#define repr(i, a, b) for (lld i = a; i >= b; i--)
#define ar array
#define pb push_back
#define mp make_pair
#define ios ... | replace | 16 | 17 | 16 | 17 | 0 | |
p02736 | C++ | Runtime Error | /*
_____ _ _ _ _
|_ _| |__ ___ / \ _ __ ___| |__ _ _| |
| | | '_ \ / _ \ / _ \ | '_ \/ __| '_ \| | | | |
| | | | | | __// ___ \| | | \__ \ | | | |_| | |
|_| |_| |_|\___/_/ \_\_| |_|___/_| |_|\__,_|_|
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_containe... | /*
_____ _ _ _ _
|_ _| |__ ___ / \ _ __ ___| |__ _ _| |
| | | '_ \ / _ \ / _ \ | '_ \/ __| '_ \| | | | |
| | | | | | __// ___ \| | | \__ \ | | | |_| | |
|_| |_| |_|\___/_/ \_\_| |_|___/_| |_|\__,_|_|
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_containe... | replace | 59 | 60 | 59 | 60 | 0 |
Time elapsed: 27.613ms
|
p02736 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
ll mod = 1e9 + 7;
const ld error = 1e-9;
const ld PI = acosl(-1); // const ld PI = acosl(-1)
#define FASTIO \
ios_base::... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
ll mod = 1e9 + 7;
const ld error = 1e-9;
const ld PI = acosl(-1); // const ld PI = acosl(-1)
#define FASTIO \
ios_base::... | replace | 31 | 32 | 31 | 32 | 0 | |
p02736 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 200005, p = 998244353, inf = 0x3f3f3f3f;
int read() {
int f = 1, g = 0;
char ch = getchar();
for (; !isdigit(ch); ch = getchar())
if (ch == '-')
f = -1;
for (; isdigit(ch); ch = getchar())
g = g * 10 + ch - '0';
re... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1000005, p = 998244353, inf = 0x3f3f3f3f;
int read() {
int f = 1, g = 0;
char ch = getchar();
for (; !isdigit(ch); ch = getchar())
if (ch == '-')
f = -1;
for (; isdigit(ch); ch = getchar())
g = g * 10 + ch - '0';
r... | replace | 3 | 4 | 3 | 4 | 0 | |
p02736 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
string A;
cin >> N >> A;
vector<int> aa(N);
bool exist1 = false;
for (int i = 0; i < N; ++i) {
aa[i] = A[i] - '1';
if (aa[i] == 1)
exist1 = true;
}
vector<int> a(1, 0);
for (int i = 1; i < N; ++i) {
map<int, int> b;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
string A;
cin >> N >> A;
vector<int> aa(N);
bool exist1 = false;
for (int i = 0; i < N; ++i) {
aa[i] = A[i] - '1';
if (aa[i] == 1)
exist1 = true;
}
vector<int> a;
for (int i = 0; i < N; ++i) {
if ((i | (N - 1 - i)) ==... | replace | 14 | 25 | 14 | 18 | TLE | |
p02736 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n - 1); i >= 0; --i)
typedef long long ll;
typedef pair<int, int> P;
const int MAX = 1000005;
const int INF = 1001001001;
const int MOD = 1000000007;
vector<int> table;
void init(int N) {
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n - 1); i >= 0; --i)
typedef long long ll;
typedef pair<int, int> P;
const int MAX = 1000005;
const int INF = 1001001001;
const int MOD = 1000000007;
vector<int> table;
void init(int N) {
... | insert | 40 | 40 | 40 | 42 | TLE | |
p02737 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<vector<int>> E[3];
for (int i = 0; i < 3; i++) {
int M;
cin >> M;
E[i].resize(N);
for (int j = 0; j < M; j++) {
int a, b;
cin >> a >> b;
E[i][a -... | #include <algorithm>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<vector<int>> E[3];
for (int i = 0; i < 3; i++) {
int M;
cin >> M;
E[i].resize(N);
for (int j = 0; j < M; j++) {
int a, b;
cin >> a >> b;
E[i][a -... | replace | 46 | 47 | 46 | 47 | TLE | |
p02737 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> ii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
#define x first
#define y second
#define pb push_back
#define eb emplace_back
#define rep(i, a, b) for (auto i = (a); i < (b); ++i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> ii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
#define x first
#define y second
#define pb push_back
#define eb emplace_back
#define rep(i, a, b) for (auto i = (a); i < (b); ++i... | replace | 72 | 73 | 72 | 74 | 0 | |
p02737 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | replace | 171 | 172 | 171 | 172 | 0 | |
p02737 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <vector>
const int MaxN = 100000, MaxS = 350;
const int Mod = 998244353, base = ((long long)1e18) % Mod;
int N;
int Pw[MaxN + 5];
int Sg[3][MaxN + 5];
std::vector<int> Gr[3][MaxN + 5];
int Buc[3][MaxS + 5];
inline int add(int x, int y) { return (x +=... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <vector>
const int MaxN = 100000, MaxS = 1000;
const int Mod = 998244353, base = ((long long)1e18) % Mod;
int N;
int Pw[MaxN + 5];
int Sg[3][MaxN + 5];
std::vector<int> Gr[3][MaxN + 5];
int Buc[3][MaxS + 5];
inline int add(int x, int y) { return (x +... | replace | 5 | 6 | 5 | 6 | 0 | |
p02737 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 10, mod = 998244353, lim = 1 << 10;
int n, m;
int ans[maxN + 1], g[maxN + 1], pw[maxN + 1];
int flag[maxN + 1], t[maxN + 1], s[maxN + 1];
bool vis[maxN + 1];
vector<int> nxt[maxN + 1];
inline int ADD(int x, int y) { return x + y >= mod ? x + y - m... | #include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 10, mod = 998244353, lim = 1 << 10;
int n, m;
int ans[maxN + 1], g[maxN + 1], pw[maxN + 1];
int flag[maxN + 1], t[maxN + 1], s[maxN + 1];
bool vis[maxN + 1];
vector<int> nxt[maxN + 1];
inline int ADD(int x, int y) { return x + y >= mod ? x + y - m... | replace | 30 | 31 | 30 | 32 | TLE | |
p02737 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include... | #include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include... | replace | 89 | 99 | 89 | 90 | 0 | |
p02737 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cerr << #x << ": " << x << endl;
#define DEBUG_VEC(v) \
cerr << #v << ":"; \
for (int i = 0; i < v.size(); i++) ... | #include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cerr << #x << ": " << x << endl;
#define DEBUG_VEC(v) \
cerr << #v << ":"; \
for (int i = 0; i < v.size(); i++) ... | replace | 134 | 135 | 134 | 135 | -11 | |
p02737 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include ... | replace | 108 | 109 | 108 | 109 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.