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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03167 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <vector>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll INF = 9223372036854775807 / 2;
const int MOD = 1000000007;
const int H_MAX = pow(10, 3);
const int W_MA... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <vector>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll INF = 9223372036854775807 / 2;
const int MOD = 1000000007;
const int H_MAX = pow(10, 4);
const int W_MA... | replace | 11 | 13 | 11 | 13 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define int long long int
#define pb push_back
#define fi(n) for (int i = 0; i < n; i++)
#define fi1(n) for (int i = 1; i < n; i++)
#define fj(n) for (int j = 0; j < n; j++)
#define rep(z, a, n) for (z = a; z < n; z++)
#define rep2(z, a, n) for (z = a; z... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define int long long int
#define pb push_back
#define fi(n) for (int i = 0; i < n; i++)
#define fi1(n) for (int i = 1; i < n; i++)
#define fj(n) for (int j = 0; j < n; j++)
#define rep(z, a, n) for (z = a; z < n; z++)
#define rep2(z, a, n) for (z = a; z... | delete | 63 | 66 | 63 | 63 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF 1e9
#define MAX 105
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define ull long long
#define FOR(i, a, b) for (int i = a; i <= b; i++)
#define nl '\n'
#define zai << ' ' <<
#define all(a) a.begin(), a.end()
typedef vector<int> ... | #include <bits/stdc++.h>
using namespace std;
#define INF 1e9
#define MAX 1005
#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define ull long long
#define FOR(i, a, b) for (int i = a; i <= b; i++)
#define nl '\n'
#define zai << ' ' <<
#define all(a) a.begin(), a.end()
typedef vector<int>... | replace | 4 | 5 | 4 | 5 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define lc "\n"
#define fast_io \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(0)
#... | #include <bits/stdc++.h>
using namespace std;
#define lc "\n"
#define fast_io \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(0)
#... | replace | 48 | 49 | 48 | 49 | -11 | |
p03167 | C++ | Runtime Error | // srinivas
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
#define all(c) (c).begin(), (c).end()
#define endl "\n"
#define ff... | // srinivas
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
#define all(c) (c).begin(), (c).end()
#define endl "\n"
#define ff... | delete | 43 | 47 | 43 | 43 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
void fst() {
ios::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
}
int nxt() {
int x;
cin >> x;
return x;
}
int nex_l() {
long long x;
cin >> x;
return x;
}
typedef long long ll;
typedef vector<int> vi;
type... | #include <bits/stdc++.h>
using namespace std;
void fst() {
ios::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
}
int nxt() {
int x;
cin >> x;
return x;
}
int nex_l() {
long long x;
cin >> x;
return x;
}
typedef long long ll;
typedef vector<int> vi;
type... | replace | 47 | 48 | 47 | 48 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define Fast_IO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define m 100... | #include <bits/stdc++.h>
using namespace std;
#define Fast_IO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define m 100... | replace | 11 | 12 | 11 | 12 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define int long long
#define MOD 998244353
#define MOD2 1000000007
using namespace std;
int32_t main() {
int m, n;
cin >> m >> n;
int dp[100][100];
dp[0][0] = 1;
string s[1001];
for (int i = 0; i < m; i++)
cin >> s[i];
int i = 0, j = 0;
while (i < n && ... | #include <bits/stdc++.h>
#define pb push_back
#define int long long
#define MOD 998244353
#define MOD2 1000000007
using namespace std;
int32_t main() {
int m, n;
cin >> m >> n;
int dp[1001][1001];
dp[0][0] = 1;
string s[1001];
for (int i = 0; i < m; i++)
cin >> s[i];
int i = 0, j = 0;
while (i < n &... | replace | 9 | 10 | 9 | 10 | 0 | |
p03167 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <stdlib.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#undef INT_MIN
#undef INT_MAX
#define LL long long
#define INT_MIN -2147483647
#define INT_MAX 1000000009
#define LL_MIN -9223372036854775807
#define LL_MAX 922337203... | #include <algorithm>
#include <iostream>
#include <map>
#include <stdlib.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#undef INT_MIN
#undef INT_MAX
#define LL long long
#define INT_MIN -2147483647
#define INT_MAX 1000000009
#define LL_MIN -9223372036854775807
#define LL_MAX 922337203... | replace | 23 | 24 | 23 | 24 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fto(i, s, e) for (int i = s; i <= e; ++i)
#define fto1(i, s, e) for (int i = s; i < e; ++i)
#define fdto(i, s, e) for (int i = s; i >= e; --i)
#define fit(var, it) \
for (__typeof(var.begin()) it = var.be... | #include <bits/stdc++.h>
using namespace std;
#define fto(i, s, e) for (int i = s; i <= e; ++i)
#define fto1(i, s, e) for (int i = s; i < e; ++i)
#define fdto(i, s, e) for (int i = s; i >= e; --i)
#define fit(var, it) \
for (__typeof(var.begin()) it = var.be... | replace | 37 | 38 | 37 | 38 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mod = 1e9 + 7;
int xinc[2] = {0, 1};
int yinc[2] = {1, 0};
ll ans(char **rc, int r, int c) {
ll res;
ll **distanc = new ll *[r];
bool **proc = new bool *[r];
for (int i = 0; i < r; i++) {
distanc[i] = new ll[c];
proc[i] = n... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mod = 1e9 + 7;
int xinc[2] = {0, 1};
int yinc[2] = {1, 0};
ll ans(char **rc, int r, int c) {
ll res;
ll **distanc = new ll *[r];
bool **proc = new bool *[r];
for (int i = 0; i < r; i++) {
distanc[i] = new ll[c];
proc[i] = n... | replace | 67 | 68 | 67 | 68 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1000000000 + 7;
const int N = 1000;
int dp[N][N];
int solve(int x, int y, int m, int n, char a[][1000]) {
if (x == m - 1 && y == n - 1)
return dp[x][y] = 1;
if (a[x][y] == '#')
return dp[x][y] = 0;
if (dp[x][y] != -1)
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1000000000 + 7;
const int N = 1000;
int dp[N][N];
int solve(int x, int y, int m, int n, char a[][1000]) {
if (x == m - 1 && y == n - 1)
return dp[x][y] = 1;
if (a[x][y] == '#')
return dp[x][y] = 0;
if (dp[x][y] != -1)
... | delete | 42 | 50 | 42 | 42 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int M = 1010;
const ll mod = 1e9L + 7;
char a[M][M];
ll dp[M][M];
int n, m;
void move(ll &a, ll b) { a = (a + b) % mod; }
int main() {
freopen("input.txt", "r", stdin);
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m;
memset... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int M = 1010;
const ll mod = 1e9L + 7;
char a[M][M];
ll dp[M][M];
int n, m;
void move(ll &a, ll b) { a = (a + b) % mod; }
int main() {
// freopen("input.txt", "r", stdin);
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m;
mem... | replace | 14 | 15 | 14 | 15 | 0 | |
p03167 | C++ | Runtime Error | #include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <map>
#include <set>
#include <string>
#include <vector>
#define fastio \
ios_base::sync_with_stdio(false); ... | #include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <map>
#include <set>
#include <string>
#include <vector>
#define fastio \
ios_base::sync_with_stdio(false); ... | replace | 137 | 139 | 137 | 139 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define ull unsigned long long
#define ff first
#define ss second
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | #include <bits/stdc++.h>
#define ll long long int
#define ull unsigned long long
#define ff first
#define ss second
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | delete | 16 | 20 | 16 | 16 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, m, f[7][7];
char b[7][7];
void add(int &x, int v) {
x += v;
if (x >= mod)
x -= mod;
}
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++) {
scanf("%s", b[i] + 1);
}
// int f[7][7];
f[1][1] = 1;
// cout<<f[... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, m, f[1005][1005];
char b[1005][1005];
void add(int &x, int v) {
x += v;
if (x >= mod)
x -= mod;
}
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++) {
scanf("%s", b[i] + 1);
}
// int f[7][7];
f[1][1] = 1;
... | replace | 3 | 5 | 3 | 5 | 0 | |
p03167 | C++ | Time Limit Exceeded | // i_am_arin
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<long long> vll;
typedef vector<string> vs;
#define f(i, a, n) for (ll i = a; i < (ll)n; i++)
#define f2(i, a, b) for (ll i = a; i <= (ll)b; i++)
#define PB push_back... | // i_am_arin
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<long long> vll;
typedef vector<string> vs;
#define f(i, a, n) for (ll i = a; i < (ll)n; i++)
#define f2(i, a, b) for (ll i = a; i <= (ll)b; i++)
#define PB push_back... | replace | 26 | 27 | 26 | 28 | TLE | |
p03167 | C++ | Runtime Error | // Nguyen Anh Tu
#include <bits/stdc++.h>
#define FOR(x, a, b) for (int x = a; x <= b; x++)
#define FORD(x, a, b) for (int x = a; x >= b; x--)
#define maxn 1005
#define maxc 1000000007
#define MOD 1000000007
#define reset(x, y) memset(x, y, sizeof(x))
#define task ""
#define mp make_pair
#define pb push_back
#define F ... | // Nguyen Anh Tu
#include <bits/stdc++.h>
#define FOR(x, a, b) for (int x = a; x <= b; x++)
#define FORD(x, a, b) for (int x = a; x >= b; x--)
#define maxn 1005
#define maxc 1000000007
#define MOD 1000000007
#define reset(x, y) memset(x, y, sizeof(x))
#define task ""
#define mp make_pair
#define pb push_back
#define F ... | replace | 23 | 30 | 23 | 28 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define IOS \
cin.tie(NULL); \
cout.tie(NULL)
#define F first
#define S second
#define pb push_back
using namespace std;
ll arr[101][101]... | #include <bits/stdc++.h>
#define ll long long int
#define IOS \
cin.tie(NULL); \
cout.tie(NULL)
#define F first
#define S second
#define pb push_back
using namespace std;
ll arr[1001][100... | replace | 9 | 10 | 9 | 10 | 0 | |
p03167 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define print printf("==================\n")
#define ll long long
#define pi acos(-1.0)
#define eps 1e-16
#define max3(a, b, c) max(a, max(b, c))
const ll INF = 1 << 30;
#define mod 1000000007
typedef pair<double, double> payar;
typedef struct {
ll x, y;
} point;
priority... | #include <bits/stdc++.h>
using namespace std;
#define print printf("==================\n")
#define ll long long
#define pi acos(-1.0)
#define eps 1e-16
#define max3(a, b, c) max(a, max(b, c))
const ll INF = 1 << 30;
#define mod 1000000007
typedef pair<double, double> payar;
typedef struct {
ll x, y;
} point;
priority... | replace | 28 | 29 | 28 | 29 | TLE | |
p03167 | C++ | Runtime Error | #include <stdio.h>
// #define large 1050
#define large 100
#define mod 1000000007
int main() {
int h, w;
char a[large][large];
scanf("%d%d", &h, &w);
for (int i = 0; i < h; i++) {
scanf("%s", &a[i]);
}
int dp[large][large] = {};
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
... | #include <stdio.h>
#define large 1050
// #define large 100
#define mod 1000000007
int main() {
int h, w;
char a[large][large];
scanf("%d%d", &h, &w);
for (int i = 0; i < h; i++) {
scanf("%s", &a[i]);
}
int dp[large][large] = {};
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
... | replace | 1 | 3 | 1 | 3 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int height, width;
long long int dp[1010][1010];
string a[1000];
int main() {
ios::sync_with_stdio(false);
cin >> height >> width;
for (int i = 0; i < height; i++)
cin >> a[i];
dp[0][0] = 1;
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++... | #include <bits/stdc++.h>
using namespace std;
int height, width;
long long int dp[1010][1010];
string a[1001];
int main() {
ios::sync_with_stdio(false);
cin >> height >> width;
for (int i = 0; i < height; i++)
cin >> a[i];
dp[0][0] = 1;
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++... | replace | 4 | 5 | 4 | 5 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define mod 1000000007
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<char>> grid(n, vector<char>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> grid[i][j];
}
}
vector<vector<int>> dp(n, vector<int>(m, 0));
dp[0][0] ... | #include <bits/stdc++.h>
#define mod 1000000007
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<char>> grid(n, vector<char>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> grid[i][j];
}
}
vector<vector<int>> dp(n, vector<int>(m, 0));
dp[0][0] ... | replace | 19 | 20 | 19 | 20 | -11 | |
p03167 | C++ | Runtime Error | //<============ Author --> @venom ============>//
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define fo(i, n) for (int i = 0; i < n; i++)
#define int long long
#define pb emplace_back
#define mp make_pair
#define ff first
#define ss second
#defin... | //<============ Author --> @venom ============>//
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define fo(i, n) for (int i = 0; i < n; i++)
#define int long long
#define pb emplace_back
#define mp make_pair
#define ff first
#define ss second
#defin... | replace | 80 | 81 | 80 | 81 | TLE | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int MOD = 1e9 + 7;
void solve() {
int h, w;
cin >> h >> w;
vector<vector<ll>> dp(h + 1, vector<ll>(w + 1, 0));
for (int i = 0; i < h; ++i) {
for (int j = 0; j < w; ++j) {
char c;
cin >> c;
if... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int MOD = 1e9 + 7;
void solve() {
int h, w;
cin >> h >> w;
vector<vector<ll>> dp(h + 1, vector<ll>(w + 1, 0));
for (int i = 0; i < h; ++i) {
for (int j = 0; j < w; ++j) {
char c;
cin >> c;
if... | replace | 35 | 39 | 35 | 38 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define N 100 + 10
#define ll long long int
using namespace std;
int main() {
int h, w, current, last;
ll table[2][N];
string map;
cin >> h >> w;
// initial conditions
for (int i = 0; i <= w; i++) {
table[0][i] = 0;
table[1][i] = 0;
}
table[0][1] = 1LL;
for (int i ... | #include <bits/stdc++.h>
#define N 1000 + 10
#define ll long long int
using namespace std;
int main() {
int h, w, current, last;
ll table[2][N];
string map;
cin >> h >> w;
// initial conditions
for (int i = 0; i <= w; i++) {
table[0][i] = 0;
table[1][i] = 0;
}
table[0][1] = 1LL;
for (int i... | replace | 1 | 2 | 1 | 2 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fo(i, n) for (ll i = 0; i < n; i++)
#define endl "\n"
#define of(i, n) for (ll i = n - 1; i >= 0; i--)
#define ll long long
#define vec vector<ll>
#define fio \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
using namespace std;
#define fo(i, n) for (ll i = 0; i < n; i++)
#define endl "\n"
#define of(i, n) for (ll i = n - 1; i >= 0; i--)
#define ll long long
#define vec vector<ll>
#define fio \
ios_base::sync_with_stdio(false); ... | replace | 64 | 67 | 64 | 68 | 0 | |
p03167 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using l... | #include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using l... | replace | 62 | 63 | 62 | 63 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ROCK \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define f first
#define sec second
usi... | #include <bits/stdc++.h>
#define ROCK \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define f first
#define sec second
usi... | replace | 13 | 14 | 13 | 14 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ull unsigned long long
#define ll long long
#define M 1000000007
#define pb emplace_back
#define p_q priority_queue
#define pii pair<ll, ll>
#define vi vector<ll>
#define vii vector<pii>
#define mi map<ll, ll>
#define mii map<pii, ll>
#define a... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ull unsigned long long
#define ll long long
#define M 1000000007
#define pb emplace_back
#define p_q priority_queue
#define pii pair<ll, ll>
#define vi vector<ll>
#define vii vector<pii>
#define mi map<ll, ll>
#define mii map<pii, ll>
#define a... | replace | 52 | 58 | 52 | 53 | TLE | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define each(i, c) for (auto &i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
template <typename P, typename Q>
ostream &operator<<(ostream &os, pair<P, Q> p) {
os << "(" << p.first << ... | #include <bits/stdc++.h>
#define each(i, c) for (auto &i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
template <typename P, typename Q>
ostream &operator<<(ostream &os, pair<P, Q> p) {
os << "(" << p.first << ... | replace | 41 | 43 | 41 | 43 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
char grid[105][105];
long long int mem[105][105];
long long int n, m;
long long int dp(long long int i, long long int j) {
if (i == n - 1 && j == m - 1) {
return 1;
}
if (mem[i][j] != -1) {
return mem[i][j];
}
long long int x = 0;
if (i + 1 < n && gri... | #include <bits/stdc++.h>
using namespace std;
char grid[1005][1005];
long long int mem[1005][1005];
long long int n, m;
long long int dp(long long int i, long long int j) {
if (i == n - 1 && j == m - 1) {
return 1;
}
if (mem[i][j] != -1) {
return mem[i][j];
}
long long int x = 0;
if (i + 1 < n &&... | replace | 3 | 5 | 3 | 5 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
const int INF = 1e9 + 7;
char a[maxn][maxn];
int dp[maxn][maxn]; // dp[i][j]´ú±íÖÕµãΪi,jµÄ·½°¸Êý
bool vis[maxn][maxn];
long long ans = 0, h, w;
int main() {
cin >> h >> w;
for (int i = 1; i <= h; i++) {
scanf("%s", a[i] + 1);
}
for (int i... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1100;
const int INF = 1e9 + 7;
char a[maxn][maxn];
int dp[maxn][maxn]; // dp[i][j]´ú±íÖÕµãΪi,jµÄ·½°¸Êý
bool vis[maxn][maxn];
long long ans = 0, h, w;
int main() {
cin >> h >> w;
for (int i = 1; i <= h; i++) {
scanf("%s", a[i] + 1);
}
for (int ... | replace | 2 | 3 | 2 | 3 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define N 1000000007
string mat[1000];
vector<vector<int>> dp(1000, vector<int>(1000, -1));
int n, x, y, m;
int solve(int i, int j) {
if (dp[i][j] != -1) {
return dp[i][j];
}
if ((i == n - 1 && j == m - 1)) {
return 1;
}
if (i >= n || ... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define N 1000000007
string mat[1001];
vector<vector<int>> dp(1001, vector<int>(1001, -1));
int n, x, y, m;
int solve(int i, int j) {
if (dp[i][j] != -1) {
return dp[i][j];
}
if ((i == n - 1 && j == m - 1)) {
return 1;
}
if (i >= n || ... | replace | 4 | 6 | 4 | 6 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define mp make_pair
#define fst first
#define snd second
#define forn(i, n) for (int i = 0; i < int(n); i++)
#define forn1(i, n) for (int i = 1; i <= int(n); i++)
#define popcnt __builtin_popcount
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long lo... | #include <bits/stdc++.h>
#define mp make_pair
#define fst first
#define snd second
#define forn(i, n) for (int i = 0; i < int(n); i++)
#define forn1(i, n) for (int i = 1; i <= int(n); i++)
#define popcnt __builtin_popcount
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long lo... | replace | 52 | 53 | 52 | 53 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
void fast() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
ll mod = 1e9 + 7;
int main() {
fast();
ll r, c;
cin >> r >> c;
ll dp[r][c];
char arr[r][c];
for (ll i = 0; i < r; i++) {
for (ll j = 0; j <... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
void fast() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
ll mod = 1e9 + 7;
int main() {
fast();
ll r, c;
cin >> r >> c;
ll dp[r][c];
char arr[r][c];
for (ll i = 0; i < r; i++) {
for (ll j = 0; j <... | replace | 24 | 25 | 24 | 25 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define make_it_fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define mp m... | #include <bits/stdc++.h>
using namespace std;
#define make_it_fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define mp m... | replace | 79 | 80 | 79 | 80 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define loop(i, a, b) for (ll i = a; i < b; i++)
#define initialize(array, size, value) ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define loop(i, a, b) for (ll i = a; i < b; i++)
#define initialize(array, size, value) ... | replace | 44 | 48 | 44 | 48 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define m 1000000007
int main() {
ll i, j, a[10000][10000], dp[10000][10000] = {0}, h, w;
char ch;
cin >> h >> w;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
cin >> ch;
if (ch == '.')
a[i][j] = 1;
else
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define m 1000000007
int main() {
ll i, j, a[1001][1001], dp[1001][1001] = {0}, h, w;
char ch;
cin >> h >> w;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
cin >> ch;
if (ch == '.')
a[i][j] = 1;
else
... | replace | 5 | 6 | 5 | 6 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
const int N = 1005;
const int MOD = 1e9 + 7;
int n, m;
char a[N][N];
int cache[N][N];
int dp(int i, int j) {
if (i > n || j > m)
return 0;
if (a[i][j] == '#')
return 0;
if (i == n && j == m)
return 1;
int &ans =... | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
const int N = 1005;
const int MOD = 1e9 + 7;
int n, m;
char a[N][N];
int cache[N][N];
int dp(int i, int j) {
if (i > n || j > m)
return 0;
if (a[i][j] == '#')
return 0;
if (i == n && j == m)
return 1;
int &ans =... | replace | 28 | 32 | 28 | 29 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
// #pragma GCC optimize ("-O3")
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(fal... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
// #pragma GCC optimize ("-O3")
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(fal... | replace | 46 | 50 | 46 | 52 | -11 | |
p03167 | C++ | Runtime Error | // Grid 1
// dp conteset h
#include <bits/stdc++.h>
#define C continue;
#define R return
#define D double
#define I insert
#define ll long long
#define ld long double
#define ull unsigned long long
#define ui unsigned int
#define pb push_back
#define pf push_front
#define vi vector<int>
#define vc vector<char>
#de... | // Grid 1
// dp conteset h
#include <bits/stdc++.h>
#define C continue;
#define R return
#define D double
#define I insert
#define ll long long
#define ld long double
#define ull unsigned long long
#define ui unsigned int
#define pb push_back
#define pf push_front
#define vi vector<int>
#define vc vector<char>
#de... | replace | 97 | 98 | 97 | 98 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#include <algorithm>
#define str(a) to_string(a)
#define int long long
#define pb push_back
#define mp make_pair
#define SORT(c) sort(c.begin(), c.end())
#define max_heap priority_queue<int>
#define min_heap priority_queue<int, vector<int>, greater<int>>
#define mod 100000... | #include <bits/stdc++.h>
using namespace std;
#include <algorithm>
#define str(a) to_string(a)
#define int long long
#define pb push_back
#define mp make_pair
#define SORT(c) sort(c.begin(), c.end())
#define max_heap priority_queue<int>
#define min_heap priority_queue<int, vector<int>, greater<int>>
#define mod 100000... | replace | 27 | 34 | 27 | 34 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03167 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <unordered_map>
#include <vector>
#define int long long
#define pi pair<int, int>
#define endl "\n"
using namespace std;
const int inf = 1e15;
const int size = 1e3 + 5;
const int mod = 1e9 + ... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <unordered_map>
#include <vector>
#define int long long
#define pi pair<int, int>
#define endl "\n"
using namespace std;
const int inf = 1e15;
const int size = 1e3 + 5;
const int mod = 1e9 + ... | replace | 28 | 32 | 28 | 32 | TLE | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int... | replace | 42 | 43 | 42 | 43 | -6 | terminate called after throwing an instance of 'std::length_error'
what(): cannot create std::vector larger than max_size()
|
p03167 | C++ | Runtime Error | /*
@author : srinathbalaji_99
*/
#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define endl '\n'
#define MAX LLONG_MAX
#define MIN LLONG_MIN
#define rep(i, a, b, inc) for (long long i = a; i < b; i += inc)
#define REP(i, n) rep(i, 0, n, 1)
#define MEM(a, b) memset(a, (b), sizeof(a))
#define P... | /*
@author : srinathbalaji_99
*/
#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define endl '\n'
#define MAX LLONG_MAX
#define MIN LLONG_MIN
#define rep(i, a, b, inc) for (long long i = a; i < b; i += inc)
#define REP(i, n) rep(i, 0, n, 1)
#define MEM(a, b) memset(a, (b), sizeof(a))
#define P... | delete | 55 | 60 | 55 | 55 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define fast \
ios::sync_with_stdio(false); \
cin.tie(0);
using namespace std;
const int mod = (int)1e9 + 7;
ll dp[1000][1000];
int main() {
fast int h, w... | #include <bits/stdc++.h>
#define ll long long
#define fast \
ios::sync_with_stdio(false); \
cin.tie(0);
using namespace std;
const int mod = (int)1e9 + 7;
ll dp[1005][1005];
int main() {
fast int h, w... | replace | 7 | 8 | 7 | 8 | 0 | |
p03167 | C++ | Runtime Error | #pragma GCC optimize "trapv"
#include <bits/stdc++.h>
#define faster \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
using ... | #pragma GCC optimize "trapv"
#include <bits/stdc++.h>
#define faster \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
using ... | replace | 28 | 32 | 28 | 32 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <climits>
using namespace std;
#define debug(x, y) \
cout << (#x) << " " << (#y) << " is " << (x) << " " << (y) << endl
#define watch(x) cout << (#x) << " is " << (x) << endl
#define fast ios_base::sync_with_stdio(false)
#d... | #include <bits/stdc++.h>
#include <climits>
using namespace std;
#define debug(x, y) \
cout << (#x) << " " << (#y) << " is " << (x) << " " << (y) << endl
#define watch(x) cout << (#x) << " is " << (x) << endl
#define fast ios_base::sync_with_stdio(false)
#d... | replace | 54 | 58 | 54 | 58 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ctype.h>
#define pb push_back
#define fst first
#define sec second
#define For(i, a, b) for (int i = a; i < b; i++)
#define ll long long int
#define ull unsigned long long int
#define mod 1000000007
#define fo(i, n) for (ll i = 0; i < n; i++)
#define endl "\n"
#define rev(i, n) for (l... | #include <bits/stdc++.h>
#include <ctype.h>
#define pb push_back
#define fst first
#define sec second
#define For(i, a, b) for (int i = a; i < b; i++)
#define ll long long int
#define ull unsigned long long int
#define mod 1000000007
#define fo(i, n) for (ll i = 0; i < n; i++)
#define endl "\n"
#define rev(i, n) for (l... | replace | 69 | 70 | 69 | 70 | TLE | |
p03167 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int INF = 1145141919;
const long long INFL = 1LL << 60;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
... | #include <bits/stdc++.h>
using namespace std;
const int INF = 1145141919;
const long long INFL = 1LL << 60;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
... | replace | 51 | 52 | 51 | 61 | TLE | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 110, mod = 1000000007;
int dp[maxn][maxn];
char a[maxn][maxn];
int main() {
// freopen("demo.in", "r", stdin);
// freopen("demo.out", "w", stdout);
int h, w;
scanf("%d%d", &h, &w);
for (int i = 0; i < h; i++) {
scanf("%s", a[i]);
}
dp[0... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1010, mod = 1000000007;
int dp[maxn][maxn];
char a[maxn][maxn];
int main() {
// freopen("demo.in", "r", stdin);
// freopen("demo.out", "w", stdout);
int h, w;
scanf("%d%d", &h, &w);
for (int i = 0; i < h; i++) {
scanf("%s", a[i]);
}
dp[... | replace | 3 | 4 | 3 | 4 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long int
#define mod 1000000007
#define inf 1e18
#define fo(i, y, n, inc) for (int i = y; i < n + y; i += inc)
#define cin(t) \
int t; \
cin... | #include <bits/stdc++.h>
#define int long long int
#define mod 1000000007
#define inf 1e18
#define fo(i, y, n, inc) for (int i = y; i < n + y; i += inc)
#define cin(t) \
int t; \
cin... | delete | 79 | 80 | 79 | 79 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
int h, w;
cin >> h >> w;
string arr[h];
for (int i = 0; i < h; i++)
cin >> arr[i];
long long res[h][w];
res[0][0] = 1LL;
for (int i = 0; i < w; i++) {
for (int j = 0; j < h; j++) {
if (arr[i][j] == '... | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
int h, w;
cin >> h >> w;
string arr[h];
for (int i = 0; i < h; i++)
cin >> arr[i];
long long res[h][w];
res[0][0] = 1LL;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (arr[i][j] == '... | replace | 14 | 16 | 14 | 16 | -11 | |
p03167 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespac... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespac... | insert | 45 | 45 | 45 | 46 | -11 | |
p03167 | C++ | Runtime Error | // Vaidik Patel(India)
// DA-IICT
#include <bits/stdc++.h>
using namespace std;
//********************************************
#include <ext/pb_ds/assoc_container.hpp> // include the associative containers or group of templates such as set, multimap, map etc.
#include <ext/pb_ds/tree_policy.hpp> // include the tree_ord... | // Vaidik Patel(India)
// DA-IICT
#include <bits/stdc++.h>
using namespace std;
//********************************************
#include <ext/pb_ds/assoc_container.hpp> // include the associative containers or group of templates such as set, multimap, map etc.
#include <ext/pb_ds/tree_policy.hpp> // include the tree_ord... | delete | 98 | 104 | 98 | 98 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03167 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (... | replace | 34 | 36 | 34 | 36 | 0 | |
p03167 | 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 = 1'000'000'007;
struct mint {
ll x;
mint(ll x = 0) : x(x % mod) {}
mint operator-() const { return mint(-x); }
mint &operator+=(const mint a) {
if ((x... | #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 = 1'000'000'007;
struct mint {
ll x;
mint(ll x = 0) : x(x % mod) {}
mint operator-() const { return mint(-x); }
mint &operator+=(const mint a) {
if ((x... | replace | 92 | 93 | 92 | 93 | 0 | |
p03167 | C++ | Runtime Error | #include <iostream>
#include <math.h>
#include <vector>
using namespace std;
int main() {
int H;
int W;
cin >> H >> W;
vector<string> a(H);
vector<vector<int>> cnt(H, vector<int>(H, 0));
for (int i = 0; i < H; ++i) {
cin >> a[i];
}
for (int i = 0; i < H; ++i) {
if (a[i][0] == '.')
cnt[i]... | #include <iostream>
#include <math.h>
#include <vector>
using namespace std;
int main() {
int H;
int W;
cin >> H >> W;
vector<string> a(H);
vector<vector<int>> cnt(H, vector<int>(W, 0));
for (int i = 0; i < H; ++i) {
cin >> a[i];
}
for (int i = 0; i < H; ++i) {
if (a[i][0] == '.')
cnt[i]... | replace | 11 | 12 | 11 | 12 | 0 | |
p03167 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long int
#define Fast \
ios_base::sync_with_stdio(0); \
cin.tie(0);
#define MOD 1000000007
using namespace std;
int m, n;
int arr[1001][1001];
ll solve(int i, in... | #include <bits/stdc++.h>
#define ll long long int
#define Fast \
ios_base::sync_with_stdio(0); \
cin.tie(0);
#define MOD 1000000007
using namespace std;
int m, n;
int arr[1001][1001];
ll solve(int i, in... | replace | 41 | 42 | 41 | 76 | TLE | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int N = 30, M = 1000000007;
string s[N];
int i, j, n, m, dp[N][N];
bool vis[N][N];
int play(int x, int y) {
if (x == n || y == m)
return 0;
if (s[x][y] == '#')
return 0;
if (vis[x][y])
return dp[x][y];
vis[x][y] = true;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int N = 1030, M = 1000000007;
string s[N];
int i, j, n, m, dp[N][N];
bool vis[N][N];
int play(int x, int y) {
if (x == n || y == m)
return 0;
if (s[x][y] == '#')
return 0;
if (vis[x][y])
return dp[x][y];
vis[x][y] = true;
... | replace | 3 | 4 | 3 | 4 | 0 | |
p03167 | C++ | Time Limit Exceeded | // --------------------<optimizations>--------------------
#pragma GCC optimize("O3")
//(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS)\
#pragma comment(linker, "/stack:200000000")
//(UNCOMMENT WHEN TRYING TO BRUTEFORCE WITH A LOT OF LOOPS)\
#pragma GCC optimize("unroll-loops")
// -------------------</optimizations>------... | // --------------------<optimizations>--------------------
#pragma GCC optimize("O3")
//(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS)\
#pragma comment(linker, "/stack:200000000")
//(UNCOMMENT WHEN TRYING TO BRUTEFORCE WITH A LOT OF LOOPS)\
#pragma GCC optimize("unroll-loops")
// -------------------</optimizations>------... | replace | 58 | 60 | 58 | 68 | TLE | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
typedef long long ll;
typedef long double ld;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
pbds;
ll exp(ll x... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
typedef long long ll;
typedef long double ld;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
pbds;
ll exp(ll x... | replace | 101 | 102 | 101 | 102 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define int long long int
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int>
#define pqs priority_queue<int, vi, greater<int>>
#define mod 10... | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define int long long int
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int>
#define pqs priority_queue<int, vi, greater<int>>
#define mod 10... | replace | 46 | 47 | 46 | 47 | 0 | |
p03167 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define read freopen("in.in", "r", stdin)
#define write freopen("out.out", "w", stdout)
#define FastIO ios::sync_with_stdio(0)
#define All(a) a.begin(), a.end()
#define PI 3.141592653589793238... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define read freopen("in.in", "r", stdin)
#define write freopen("out.out", "w", stdout)
#define FastIO ios::sync_with_stdio(0)
#define All(a) a.begin(), a.end()
#define PI 3.141592653589793238... | delete | 83 | 87 | 83 | 83 | 0 | |
p03167 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1055;
char mat[N][N];
int dp[N][N], n, m;
const int dx[2] = {1, 0};
const int dy[2] = {0, 1};
const int MOD = 1e9 + 7;
int sol(int i, int j) {
if (i == n - 1 && j == m - 1)
return 1;
int ans = dp[i][j];
if (ans != -1)
re... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1055;
char mat[N][N];
int dp[N][N], n, m;
const int dx[2] = {1, 0};
const int dy[2] = {0, 1};
const int MOD = 1e9 + 7;
int sol(int i, int j) {
if (i == n - 1 && j == m - 1)
return 1;
int &ans = dp[i][j];
if (ans != -1)
r... | replace | 16 | 17 | 16 | 17 | TLE | |
p03167 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
// ascending order
#define vsort(v) sort(v.begin(), v.end())
// descending order
#de... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
// ascending order
#define vsort(v) sort(v.begin(), v.end())
// descending order
#de... | replace | 37 | 39 | 37 | 39 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FAST \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.ti... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FAST \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.ti... | replace | 24 | 25 | 24 | 25 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> dp(n, 0), ndp(dp);
dp[0] = 1;
for (int i = 0; i < n; ++i) {
string now;
cin >> now;
for (int j = 0; j < m; ++j) {
if (now[j] == '#')
ndp[j] = 0;
else {
ndp[j] = dp[j];
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> dp(m, 0), ndp(dp);
dp[0] = 1;
for (int i = 0; i < n; ++i) {
string now;
cin >> now;
for (int j = 0; j < m; ++j) {
if (now[j] == '#')
ndp[j] = 0;
else {
ndp[j] = dp[j];
... | replace | 8 | 9 | 8 | 9 | 0 | |
p03167 | C++ | Runtime Error | // Medha's code :
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | // Medha's code :
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | replace | 41 | 42 | 41 | 42 | 0 | |
p03167 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define F(i, a, b) for (i = a; i <= b; i++)
#define RF(i, a, b) for (i = a; i >= b; i--)
#define sz(a) sizeof(a)
#define next_line cout << '\n'
#define space cout << ' '
#define deb(a) cout << #a << ' ' << a
using namespace std;
typedef pair<int, int> pii;
typedef pair<ll,... | #include <bits/stdc++.h>
#define ll long long
#define F(i, a, b) for (i = a; i <= b; i++)
#define RF(i, a, b) for (i = a; i >= b; i--)
#define sz(a) sizeof(a)
#define next_line cout << '\n'
#define space cout << ' '
#define deb(a) cout << #a << ' ' << a
using namespace std;
typedef pair<int, int> pii;
typedef pair<ll,... | replace | 25 | 26 | 25 | 26 | TLE | |
p03167 | C++ | Runtime Error | /*
dp[i][j] = no. of ways to reach (H, W) from (i, j)
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
int main() {
int H, W;
vector<vector<ll>> dp;
vector<string> a;
cin >> H >> W;
a.assign(H + 1, "");
dp.assign(H + 1, vector<ll>(H + 1, 0));
for ... | /*
dp[i][j] = no. of ways to reach (H, W) from (i, j)
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
int main() {
int H, W;
vector<vector<ll>> dp;
vector<string> a;
cin >> H >> W;
a.assign(H + 1, "");
dp.assign(H + 1, vector<ll>(W + 1, 0));
for ... | replace | 18 | 19 | 18 | 19 | 0 | |
p03167 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define ll long ... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define ll long ... | replace | 24 | 26 | 24 | 26 | -6 | terminate called after throwing an instance of 'std::length_error'
what(): cannot create std::vector larger than max_size()
|
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define debug(x) cout << #x << "::" << x << endl;
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
void solve() {
int h, w;
cin >> h >> w;
vector<string> v(h);
for (int i = 0; i < h; i++) {
cin >> v[i];
}
vector<vector<int>> dp(h, vector<int>(w, 0));
dp[0][0]... | #include <bits/stdc++.h>
#define debug(x) cout << #x << "::" << x << endl;
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
void solve() {
int h, w;
cin >> h >> w;
vector<string> v(h);
for (int i = 0; i < h; i++) {
cin >> v[i];
}
vector<vector<int>> dp(h, vector<int>(w, 0));
dp[0][0]... | delete | 35 | 39 | 35 | 35 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
int dp[1000][1000];
int main() {
int t, h, w;
char st[1003][1003];
cin >> h >> w;
for (int i = 0; i < h; i++) {
scanf("%s", st[i]);
}
dp[0][0] = 1;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
int c1 = j + 1;
... | #include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
int dp[1005][1005];
int main() {
int t, h, w;
char st[1003][1003];
cin >> h >> w;
for (int i = 0; i < h; i++) {
scanf("%s", st[i]);
}
dp[0][0] = 1;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
int c1 = j + 1;
... | replace | 3 | 4 | 3 | 4 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
int main() {
// freopen("input.txt","r",stdin);
// freopen("output.txt","w",stdout);
ll m, n;
cin >> m >> n;
ll dp[m][n];
string h[m];
for (ll i = 0; i < m; i++)
cin >> h[i];
int f = 0;
for (ll i = 0; i... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
int main() {
// freopen("input.txt","r",stdin);
// freopen("output.txt","w",stdout);
ll m, n;
cin >> m >> n;
ll dp[m][n];
string h[m];
for (ll i = 0; i < m; i++)
cin >> h[i];
int f = 0;
for (ll i = 0; i... | replace | 29 | 30 | 29 | 30 | -11 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define im 2147483647
#define lm 9223372036854775807
#define ll long long
#define ii pair<int, int>
#define debug(index, num) cerr << "Case #" << index << ": " << num << endl
#define be(x) x.begin(), x.end()
#define rbe(x) x.rbegin(), x.rend()
#define pb push_back
const ll ... | #include <bits/stdc++.h>
using namespace std;
#define im 2147483647
#define lm 9223372036854775807
#define ll long long
#define ii pair<int, int>
#define debug(index, num) cerr << "Case #" << index << ": " << num << endl
#define be(x) x.begin(), x.end()
#define rbe(x) x.rbegin(), x.rend()
#define pb push_back
const ll ... | replace | 17 | 18 | 17 | 18 | 0 | |
p03167 | C++ | Runtime Error | /******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java,
PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly,
HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debu... | /******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java,
PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly,
HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debu... | replace | 42 | 49 | 42 | 43 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define vi vector<int>
#define vvi vector<vector<int>>
#define FASTIO \
ios_base::sync_with_stdio(NULL); \
cin.tie(NULL);
#define FOR(i, n) for ... | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define vi vector<int>
#define vvi vector<vector<int>>
#define FASTIO \
ios_base::sync_with_stdio(NULL); \
cin.tie(NULL);
#define FOR(i, n) for ... | replace | 39 | 40 | 39 | 40 | 0 | |
p03167 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
void fast_io() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
void test_here() {
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
}
ll no_of_paths_bu(vector<vector<char>> &grid, ll r, ll c) {
v... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
void fast_io() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
void test_here() {
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
}
ll no_of_paths_bu(vector<vector<char>> &grid, ll r, ll c) {
v... | replace | 51 | 52 | 51 | 52 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03168 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
double memo[3005][3005];
double datas[3005];
int n;
double solve(int x, int y) {
if (x + y == n) {
if (x > y)
return 1.00;
else
return 0.00;
}
... | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
double memo[3005][3005];
double datas[3005];
int n;
double solve(int x, int y) {
if (x + y == n) {
if (x > y)
return 1.00;
else
return 0.00;
}
... | replace | 18 | 19 | 18 | 19 | TLE | |
p03168 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
int dx[2] = {1, 0};
int dy[2] = {0, 1};
double p[3000];
double dp[1000][1000] = {};
int main() {
int N;
cin >> N;
for (int i = 0; i < N; ++i) {
cin >> p[i];
}
dp[0][0] = 1;
for (int i = 0; i < N; ++i) {
for (int j = 0; i + j < N;... | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
int dx[2] = {1, 0};
int dy[2] = {0, 1};
double p[3000];
double dp[3000][3000] = {};
int main() {
int N;
cin >> N;
for (int i = 0; i < N; ++i) {
cin >> p[i];
}
dp[0][0] = 1;
for (int i = 0; i < N; ++i) {
for (int j = 0; i + j < N;... | replace | 6 | 7 | 6 | 7 | 0 | |
p03168 | C++ | Time Limit Exceeded |
/* Pain. Anger. Hatred. Ego.
Survive. Live. Win. Conquer. */
/*#Quota_Reform .
#We_Want_Safe_Roads .
#We_Want_Justice .
#Support_Us .
#Bangladesh .
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
#define... |
/* Pain. Anger. Hatred. Ego.
Survive. Live. Win. Conquer. */
/*#Quota_Reform .
#We_Want_Safe_Roads .
#We_Want_Justice .
#Support_Us .
#Bangladesh .
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
#define... | insert | 88 | 88 | 88 | 89 | TLE | |
p03168 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include ... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include ... | replace | 70 | 71 | 70 | 71 | 0 |
Elapsed Time: 0.195
|
p03168 | C++ | Runtime Error |
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
// #include<bits/extc++.h>
using namespace std;
// using namespace __gnu_pbds;
// typedef
// tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
// set_t;
#define mp(a, b) make_pair((a), (b))
#define pii pair<int, int>
#define pll pair<LL, ... |
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
// #include<bits/extc++.h>
using namespace std;
// using namespace __gnu_pbds;
// typedef
// tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
// set_t;
#define mp(a, b) make_pair((a), (b))
#define pii pair<int, int>
#define pll pair<LL, ... | replace | 28 | 29 | 28 | 29 | 0 | |
p03168 | C++ | Time Limit Exceeded | /*
Washief Hossain Mugdho
17 September 2020
Educational DP Coins
*/
#ifndef DEBUG
#pragma GCC optimize("O3")
#endif
#include <bits/stdc++.h>
#define ull unsigned long long
#define ll long long
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define fastio ios_base::sync_with_s... | /*
Washief Hossain Mugdho
17 September 2020
Educational DP Coins
*/
#ifndef DEBUG
#pragma GCC optimize("O3")
#endif
#include <bits/stdc++.h>
#define ull unsigned long long
#define ll long long
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define fastio ios_base::sync_with_s... | replace | 31 | 32 | 31 | 32 | TLE | |
p03168 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef pair<int, int> ii;
typedef long long LL;
#define pb push_back
const int INF = 2147483647;
const int MOD = 1000000007;
const int N = 3006;
double T[2][N], sum, p;
int act, prevv, i, j, n;
int main() {
scanf("%d", &n);
T[0][n] = 1.0;
fo... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef pair<int, int> ii;
typedef long long LL;
#define pb push_back
const int INF = 2147483647;
const int MOD = 1000000007;
const int N = 6006;
double T[2][N], sum, p;
int act, prevv, i, j, n;
int main() {
scanf("%d", &n);
T[0][n] = 1.0;
fo... | replace | 8 | 9 | 8 | 9 | 0 | |
p03168 | C++ | Time Limit Exceeded | /*######################################################
#########~~~~~####~~~~###~~##~~##~~##~~##~~##~~#########
#########~~##~~##~~##~~##~~~#~~##~~~#~~##~~##~~#########
#~~~~~~##~~~~~###~~~~~~##~~#~~~##~~#~~~##~~##~~##~~~~~~#
#########~~######~~##~~##~~##~~##~~##~~##~~##~~#########
#########~~######~~##~~##~~##~~##~~... | /*######################################################
#########~~~~~####~~~~###~~##~~##~~##~~##~~##~~#########
#########~~##~~##~~##~~##~~~#~~##~~~#~~##~~##~~#########
#~~~~~~##~~~~~###~~~~~~##~~#~~~##~~#~~~##~~##~~##~~~~~~#
#########~~######~~##~~##~~##~~##~~##~~##~~##~~#########
#########~~######~~##~~##~~##~~##~~... | insert | 83 | 83 | 83 | 84 | TLE | |
p03168 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define maxx 10
int n;
double p[maxx];
double dp[maxx][maxx];
double f(int n, int x) {
if (x == 0)
return 1.0;
if (n == 1) {
return p[n];
}
if (dp[n][x] != -1)
return dp[n][x];
if (n == x) {
dp[n][x] = p[n] * f(n - 1, x - 1);
return dp[n][x];
... | #include <bits/stdc++.h>
using namespace std;
#define maxx 3000
int n;
double p[maxx];
double dp[maxx][maxx];
double f(int n, int x) {
if (x == 0)
return 1.0;
if (n == 1) {
return p[n];
}
if (dp[n][x] != -1)
return dp[n][x];
if (n == x) {
dp[n][x] = p[n] * f(n - 1, x - 1);
return dp[n][x];... | replace | 2 | 3 | 2 | 3 | 0 | |
p03168 | C++ | Time Limit Exceeded | #include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
double dp[3001][3001];
double helper(int numheads, int i, vector<double> &prob, int n) {
if (dp[i][numheads] > -1) {
return dp[i][numheads];
}
if (i >= n) {
if (numheads <= n / 2) {
return 0;
} else
return 1;
}... | #include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
double dp[3001][3001];
double helper(int numheads, int i, vector<double> &prob, int n) {
if (dp[i][numheads] > -1) {
return dp[i][numheads];
}
if (i >= n) {
if (numheads <= n / 2) {
return 0;
} else
return 1;
}... | replace | 15 | 17 | 15 | 18 | TLE | |
p03168 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define nt _int128
#define mod 1000000007
double arr[3005], dp[3005][3005];
ll n;
double func(ll i, ll k) {
if (i == n + 1) {
if (k == 0)
return 1.0;
else
return 0.0;
} else if (dp[i]... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define nt _int128
#define mod 1000000007
double arr[3005], dp[3005][3005];
ll n;
double func(ll i, ll k) {
if (i == n + 1) {
if (k == 0)
return 1.0;
else
return 0.0;
} else if (dp[i]... | replace | 26 | 30 | 26 | 30 | 0 | |
p03168 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
cout.precision(10);
int n;
cin >> n;
vector<vector<double>> dp(n + 1, vector<double>(n + 1));
vector<double> v(n + 1);
for (int i = 1; i <= n; i++)
cin >> v[i];
dp[0][... | #include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("input.txt","r",stdin);
// freopen("output.txt","w",stdout);
cout.precision(10);
int n;
cin >> n;
vector<vector<double>> dp(n + 1, vector<double>(n + 1));
vector<double> v(n + 1);
for (int i = 1; i <= n; i++)
cin >> v[i];
dp[0... | replace | 5 | 7 | 5 | 7 | 0 | |
p03168 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fr(i, a, b) for (int i = (a); i < (b); i++)
#define frr(i, a, b) for (int i = (a - 1); i >= (b); i--)
#define vi vector<int>
#define de deque<int>
#define del deque<ll>
#define vl vector<ll>
#define pb push_back
#define ppb pop_back()
#define p... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fr(i, a, b) for (int i = (a); i < (b); i++)
#define frr(i, a, b) for (int i = (a - 1); i >= (b); i--)
#define vi vector<int>
#define de deque<int>
#define del deque<ll>
#define vl vector<ll>
#define pb push_back
#define ppb pop_back()
#define p... | replace | 43 | 47 | 43 | 47 | -11 | |
p03168 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define D(x) cerr << #x << " = " << (x) << ", "
template <typename T> ostream &operator<<(ostream &_o_, const vector<T> &_v_) {
if (!_v_.empty()) {
_o_ << '[';
copy(_v_.begin(), _v_.end(), ostream_iterator<T>(_o_, ", "));
_o_ << "\b\b]";
}
... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define D(x) cerr << #x << " = " << (x) << ", "
template <typename T> ostream &operator<<(ostream &_o_, const vector<T> &_v_) {
if (!_v_.empty()) {
_o_ << '[';
copy(_v_.begin(), _v_.end(), ostream_iterator<T>(_o_, ", "));
_o_ << "\b\b]";
}
... | replace | 67 | 69 | 67 | 69 | -11 | |
p03168 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cstring>
#include <inttypes.h>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <utility>
#include <vector>
using namespace std;
const int cap = 3000;
int N;
double p;
double dp[cap];
int main() {
scanf("%d", &N);
fill(dp, dp + N... | #include <algorithm>
#include <climits>
#include <cstring>
#include <inttypes.h>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <utility>
#include <vector>
using namespace std;
const int cap = 3000;
int N;
double p;
double dp[cap];
int main() {
scanf("%d", &N);
fill(dp, dp + N... | replace | 29 | 30 | 29 | 30 | 0 | |
p03168 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (ll i = (ll)(a); i <= (ll)(b); i++)
#define NFOR(i, a, b) for (ll i = (ll)(a); i >= (ll)(b); --i)
#define rep(i, a) for (ll i = 0; i < a; i++)
#define endl "\n"
#define fi first
#define se second
#define MOD 1000000007
#define inf 1e12
#define pb pu... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (ll i = (ll)(a); i <= (ll)(b); i++)
#define NFOR(i, a, b) for (ll i = (ll)(a); i >= (ll)(b); --i)
#define rep(i, a) for (ll i = 0; i < a; i++)
#define endl "\n"
#define fi first
#define se second
#define MOD 1000000007
#define inf 1e12
#define pb pu... | replace | 76 | 81 | 76 | 79 | TLE | |
p03168 | C++ | Runtime Error | #include <iomanip>
#include <iostream>
#include <vector>
#define prDouble(x) cout << fixed << setprecision(10) << x
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
int n;
cin >> n;
vector<double> prob(n + 1);
for (int i = 1; i <= n; ++i)
cin >> prob[i];
int x = ((n + 1) / 2) + 1;
d... | #include <iomanip>
#include <iostream>
#include <vector>
#define prDouble(x) cout << fixed << setprecision(10) << x
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
int n;
cin >> n;
vector<double> prob(n + 1);
for (int i = 1; i <= n; ++i)
cin >> prob[i];
int x = ((n + 1) / 2) + 1;
d... | replace | 13 | 14 | 13 | 14 | 0 | |
p03168 | C++ | Runtime Error |
#include "bits/stdc++.h"
using namespace std;
#define cool \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define int l... |
#include "bits/stdc++.h"
using namespace std;
#define cool \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define int l... | replace | 27 | 28 | 27 | 28 | 0 | |
p03168 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pair<int, int>> vpi;
typedef vector<pair<ll, ll>> vpll;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define F0R(i, a) ... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pair<int, int>> vpi;
typedef vector<pair<ll, ll>> vpll;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define F0R(i, a) ... | replace | 584 | 596 | 584 | 611 | TLE | |
p03168 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<vector<double>> dp;
double solve(double a[], int i, int x) {
if (x == 0)
return 1;
if (i == 0)
return 0;
if (dp[i][x] >= -0.9)
return dp[i][x];
return dp[i][x] = (a[i] * solve(a, i - 1, x - 1)) +
((1 - a[i]) * solve(a, i - 1, x... | #include <bits/stdc++.h>
using namespace std;
vector<vector<double>> dp;
double solve(double a[], int i, int x) {
if (x == 0)
return 1;
if (i == 0)
return 0;
if (dp[i][x] >= -0.9)
return dp[i][x];
return dp[i][x] = (a[i] * solve(a, i - 1, x - 1)) +
((1 - a[i]) * solve(a, i - 1, x... | replace | 19 | 20 | 19 | 20 | -11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.