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
p02732
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define x first #define y second #define pii pair<int, int> #define mp make_pair #define pb push_back #define sz(a) (int)(a.size()) ll ans = 0; int n; int b[100005]; map<int, ll> a; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define x first #define y second #define pii pair<int, int> #define mp make_pair #define pb push_back #define sz(a) (int)(a.size()) ll ans = 0; int n; int b[200005]; map<int, ll> a; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { ...
replace
11
12
11
12
0
p02732
C++
Runtime Error
#include <cstdio> #include <map> #define F(i, x, y) for (int i = x; i <= y; ++i) using namespace std; int n, a[100005]; long long sum; map<int, int> m; int main() { scanf("%d", &n); for (int i = 1; i <= n; ++i) { scanf("%d", a + i); ++m[a[i]]; } for (map<int, int>::iterator it = m.begin(); it != m.end()...
#include <cstdio> #include <map> #define F(i, x, y) for (int i = x; i <= y; ++i) using namespace std; int n, a[200005]; long long sum; map<int, int> m; int main() { scanf("%d", &n); for (int i = 1; i <= n; ++i) { scanf("%d", a + i); ++m[a[i]]; } for (map<int, int>::iterator it = m.begin(); it != m.end()...
replace
4
5
4
5
0
p02732
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> using namespace std; int fa[100008], fb[100008], fc[100008]; int main() { int n, m; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", fa + i); fb[i] = fa[i]; } sort(fb, fb + n); long long sum = 0, s = 1; for (int i...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> using namespace std; int fa[200008], fb[200008], fc[200008]; int main() { int n, m; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", fa + i); fb[i] = fa[i]; } sort(fb, fb + n); long long sum = 0, s = 1; for (int i...
replace
5
6
5
6
0
p02732
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, c) for (int i = 0; i < (int)c; ++i) using llint = long long int; using namespace std; int main() { int N; map<int, llint> mp; vector<int> A(N, 0); cin >> N; rep(i, N) { cin >> A[i]; mp[A[i]]++; } llint num = 0; for (auto itr = mp.begin(); itr != mp.end(...
#include <bits/stdc++.h> #define rep(i, c) for (int i = 0; i < (int)c; ++i) using llint = long long int; using namespace std; int main() { int N; map<int, llint> mp; int A[300000]; cin >> N; rep(i, N) { cin >> A[i]; mp[A[i]]++; } llint num = 0; for (auto itr = mp.begin(); itr != mp.end(); itr...
replace
9
10
9
10
0
p02732
C++
Runtime Error
#include <bits/stdc++.h> #define inf 0x3f3f3f3f #define eps 1e-6 #define ll long long using namespace std; const int N = 1e3 + 5; ll a[N], sum, b[N]; ll c(int x, int y) { ll a = 1, b = 1; for (int i = y; i > y - x; i--) a *= i; for (int i = 1; i <= x; i++) b *= i; return a / b; } int main() { ios::syn...
#include <bits/stdc++.h> #define inf 0x3f3f3f3f #define eps 1e-6 #define ll long long using namespace std; const int N = 2e5 + 5; ll a[N], sum, b[N]; ll c(int x, int y) { ll a = 1, b = 1; for (int i = y; i > y - x; i--) a *= i; for (int i = 1; i <= x; i++) b *= i; return a / b; } int main() { ios::syn...
replace
5
6
5
6
0
p02732
C++
Runtime Error
#include <bits/stdc++.h> #define F first #define S second using namespace std; typedef long long LL; typedef pair<int, int> PII; const int N = 100010, M = 110; int n; int a[N]; int cnt[N]; int main() { scanf("%d", &n); for (int i = 0; i < n; i++) { int x; scanf("%d", &x); a[i] = x; cnt[x]++; ...
#include <bits/stdc++.h> #define F first #define S second using namespace std; typedef long long LL; typedef pair<int, int> PII; const int N = 200010, M = 110; int n; int a[N]; int cnt[N]; int main() { scanf("%d", &n); for (int i = 0; i < n; i++) { int x; scanf("%d", &x); a[i] = x; cnt[x]++; ...
replace
10
11
10
11
0
p02732
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; ll a, b, c, i, j, k, l, m, n, ans, tmp, hoge, fuga, piyo; ll x[10010], y[200200]; string s, str; int main() { cin >> n; for (int i = 0; i < n; i++) { y[i] = 0; } for (int i = 0; i < n; i++) { cin >> x[i]; y[x[i] - 1]++; } for (i...
#include <bits/stdc++.h> using namespace std; using ll = long long; ll a, b, c, i, j, k, l, m, n, ans, tmp, hoge, fuga, piyo; ll x[200200], y[200200]; string s, str; int main() { cin >> n; for (int i = 0; i < n; i++) { y[i] = 0; } for (int i = 0; i < n; i++) { cin >> x[i]; y[x[i] - 1]++; } for (...
replace
4
5
4
5
0
p02732
C++
Time Limit Exceeded
#include <algorithm> #include <ciso646> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <string> #include <utility> #include <vector> // 解説ac using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int momm(int a) { int sum = 0; for ...
#include <algorithm> #include <ciso646> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <string> #include <utility> #include <vector> // 解説ac using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) long long momm(long long a) { return a ...
replace
17
23
17
18
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define INF 1 << 30 #define endl '\n' #define maxn 1000005 #define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); typedef long long ll; const double PI = acos(-1.0); const ll mod = 1e9 + 7; inline void normal(ll &a) { a %= mod; (a < 0) && (a += mod);...
#include <bits/stdc++.h> using namespace std; #define INF 1 << 30 #define endl '\n' #define maxn 1000005 #define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); typedef long long ll; const double PI = acos(-1.0); const ll mod = 1e9 + 7; inline void normal(ll &a) { a %= mod; (a < 0) && (a += mod);...
replace
125
126
125
126
0
p02733
C++
Time Limit Exceeded
/** * author: zjsdut * created: 2020/03/23 11:53:32 **/ #include <bits/stdc++.h> using namespace std; struct fast_ios { fast_ios() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); }; } fast_ios_; template <typename A, typename B> bool chkmin(A &a, const B ...
/** * author: zjsdut * created: 2020/03/23 11:53:32 **/ #include <bits/stdc++.h> using namespace std; struct fast_ios { fast_ios() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); }; } fast_ios_; template <typename A, typename B> bool chkmin(A &a, const B ...
insert
181
181
181
183
TLE
p02733
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; #define fi first #define se second #define mp make_pair #define rep(i, n) for (int i...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; #define fi first #define se second #define mp make_pair #define rep(i, n) for (int i...
replace
64
66
64
66
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; using namespace __gnu_pbds; #define ll long long #define pp pair<ll, ll> typedef tree<pp, null_type, less<pp>, rb_tree_tag, ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; using namespace __gnu_pbds; #define ll long long #define pp pair<ll, ll> typedef tree<pp, null_type, less<pp>, rb_tree_tag, ...
insert
55
55
55
57
0
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <string> #define ft first #define sc second #define pt(sth) cout << sth << "\n" #define chmax(a, b) (a) = max(a, b) #define chmin(a, b) (a) = min(a, b) #define moC(a, s, b) (a) = ((a)s(b) + MOD) % MOD using namespace std; typedef long long ll; typedef pair<ll, ll> pll; static const ll ...
#include <bits/stdc++.h> #include <string> #define ft first #define sc second #define pt(sth) cout << sth << "\n" #define chmax(a, b) (a) = max(a, b) #define chmin(a, b) (a) = min(a, b) #define moC(a, s, b) (a) = ((a)s(b) + MOD) % MOD using namespace std; typedef long long ll; typedef pair<ll, ll> pll; static const ll ...
insert
71
71
71
76
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define fw(p) for (int w = 0; w < (p); w++) #define fx(p) for (int x = 0; x < (p); x++) #define fy(p) for (int y = 0; y < (p); y++) #define fz(p) for (int z = 0; z < (p); z++) #define fyg(p, g) for (int y = (g); y < (p); y++) #define fzg(p, g) for (int...
#include <bits/stdc++.h> using namespace std; #define ll long long #define fw(p) for (int w = 0; w < (p); w++) #define fx(p) for (int x = 0; x < (p); x++) #define fy(p) for (int y = 0; y < (p); y++) #define fz(p) for (int z = 0; z < (p); z++) #define fyg(p, g) for (int y = (g); y < (p); y++) #define fzg(p, g) for (int...
replace
69
70
69
70
0
p02733
Python
Time Limit Exceeded
import numpy as np from itertools import product H, W, K = map(int, input().split()) G = np.array([list(map(int, list(input()))) for _ in range(H)]) ans = float("inf") for pattern in product([0, 1], repeat=H - 1): # スライスで横方向への割り方を表現する div = [0] + [i for i, p in enumerate(pattern, start=1) if p == 1] + [10] ...
import numpy as np from itertools import product H, W, K = map(int, input().split()) G = np.array([list(map(int, list(input()))) for _ in range(H)]) ans = float("inf") for pattern in product([0, 1], repeat=H - 1): # スライスで横方向への割り方を表現する div = [0] + [i for i, p in enumerate(pattern, start=1) if p == 1] + [10] ...
insert
20
20
20
22
TLE
p02733
C++
Runtime Error
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long int ll; int h, w, kk; char fi[15][1010]; int cnt[15][1010]; int main() { cin.tie(0); ios::sync_with_stdio(false);...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long int ll; int h, w, kk; char fi[15][1010]; int cnt[15][1010]; int main() { cin.tie(0); ios::sync_with_stdio(false);...
replace
57
58
57
58
0
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using llong = long long int; #define rep(i, n) for (int i = 0; i < n; ++i) #define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr) #define stl_repr(itr, x) for (auto itr = x.rbegin(); itr != x.rend(); ++itr) #define all(x) x.begin(), x.end() #define allr...
#include <bits/stdc++.h> using namespace std; using llong = long long int; #define rep(i, n) for (int i = 0; i < n; ++i) #define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr) #define stl_repr(itr, x) for (auto itr = x.rbegin(); itr != x.rend(); ++itr) #define all(x) x.begin(), x.end() #define allr...
replace
146
147
146
147
0
p02733
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <queue> #include <string> #include <vector> using ll = long long; using namespace std; int rui[20][1010] = {{0}}; int main() { int h, w, k; cin >> h >> w >> k; for (int i = 1; i <= h; i++) { for (int j = 1; j <= w; j++) { char c; cin >> c; ...
#include <algorithm> #include <iostream> #include <queue> #include <string> #include <vector> using ll = long long; using namespace std; int rui[20][1010] = {{0}}; int main() { int h, w, k; cin >> h >> w >> k; for (int i = 1; i <= h; i++) { for (int j = 1; j <= w; j++) { char c; cin >> c; ...
delete
46
47
46
46
TLE
p02733
Python
Time Limit Exceeded
from itertools import combinations, chain H, W, K = map(int, input().split()) Sss = [] for _ in range(H): Sss.append(list(map(int, input()))) def h_divide(Sss, div_is): result = [] for s, e in zip(chain([0], div_is), chain(div_is, [len(Sss)])): result.append(Sss[s:e]) return result def _v_e...
from itertools import combinations, chain H, W, K = map(int, input().split()) Sss = [] for _ in range(H): Sss.append(list(map(int, input()))) def h_divide(Sss, div_is): result = [] for s, e in zip(chain([0], div_is), chain(div_is, [len(Sss)])): result.append(Sss[s:e]) return result def _v_e...
insert
53
53
53
55
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using lint = long long; const lint inf = 1LL << 60; const lint mod = 1000000007; template <class T> bool chmax(T &a, const T &b) { return (a < b) ? (a = b, 1) : 0; } template <class T> bool chmin(T &a, const T &b) { return (b < a) ? (a = b, 1) : 0; } int main() { ci...
#include <bits/stdc++.h> using namespace std; using lint = long long; const lint inf = 1LL << 60; const lint mod = 1000000007; template <class T> bool chmax(T &a, const T &b) { return (a < b) ? (a = b, 1) : 0; } template <class T> bool chmin(T &a, const T &b) { return (b < a) ? (a = b, 1) : 0; } int main() { ci...
insert
47
47
47
48
0
p02733
C++
Runtime Error
#include <bits/stdc++.h> #define all(vec) vec.begin(), vec.end() #define eb emplace_back using namespace std; using ll = long long; using P = pair<ll, ll>; constexpr ll INF = (1LL << 30) - 1LL; constexpr ll MOD = 1e9 + 7; template <class T> void chmin(T &a, T b) { a = min(a, b); } template <class T> void chmax(T &a, T ...
#include <bits/stdc++.h> #define all(vec) vec.begin(), vec.end() #define eb emplace_back using namespace std; using ll = long long; using P = pair<ll, ll>; constexpr ll INF = (1LL << 30) - 1LL; constexpr ll MOD = 1e9 + 7; template <class T> void chmin(T &a, T b) { a = min(a, b); } template <class T> void chmax(T &a, T ...
insert
43
43
43
44
0
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; /*-------------------Define Start-------------------*/ typedef bool BL; // 布尔类型 typedef char SB; // 有符号1字节,8位 typedef unsigned char UB; // 无符号1字节,8位 typedef short SW; // 有符号短整型,16位 typedef unsigned short UW; // 无符号短整型,...
#include <bits/stdc++.h> using namespace std; /*-------------------Define Start-------------------*/ typedef bool BL; // 布尔类型 typedef char SB; // 有符号1字节,8位 typedef unsigned char UB; // 无符号1字节,8位 typedef short SW; // 有符号短整型,16位 typedef unsigned short UW; // 无符号短整型,...
replace
80
84
80
90
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int h, w, k; cin >> h >> w >> k; vector<string> s(h); for (int i = 0; i < h; i++) cin >> s[i]; int answer = h + w; for (int mask = 0; mask < (1 << (h - 1)); mask++) { int block = __builtin_popcount(mask) + 1; int cut = block - 1; v...
#include <bits/stdc++.h> using namespace std; int main() { int h, w, k; cin >> h >> w >> k; vector<string> s(h); for (int i = 0; i < h; i++) cin >> s[i]; int answer = h + w; for (int mask = 0; mask < (1 << (h - 1)); mask++) { int block = __builtin_popcount(mask) + 1; int cut = block - 1; v...
replace
20
21
20
21
0
p02733
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define MOD 1000000007 #define MAX 100005 #define pb push_back #define mp make_pair #define pii pair<int, int> #define mii map<int, int> #define vi vector<int> #define ff first #define ss second #define T ...
#include <bits/stdc++.h> #define int long long #define MOD 1000000007 #define MAX 100005 #define pb push_back #define mp make_pair #define pii pair<int, int> #define mii map<int, int> #define vi vector<int> #define ff first #define ss second #define T ...
replace
79
83
79
83
-11
p02733
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define llint long long #define inf 1e...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define llint long long #define inf 1e...
replace
24
25
24
25
0
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int n, m, k; char grid[11][110]; int dp[11][110]; int ans; bool check(int l, int r, int a, int b) { return dp[a][b] - dp[l - 1][b] - dp[a][r - 1] + dp[l - 1][r - 1] <= k; } vector<int> pos = {1}; bool testC(int last, int j) { bool fl = true; for (int i = 0; i < po...
#include <bits/stdc++.h> using namespace std; int n, m, k; char grid[11][1010]; int dp[11][1010]; int ans; bool check(int l, int r, int a, int b) { return dp[a][b] - dp[l - 1][b] - dp[a][r - 1] + dp[l - 1][r - 1] <= k; } vector<int> pos = {1}; bool testC(int last, int j) { bool fl = true; for (int i = 0; i < ...
replace
4
6
4
6
0
p02733
C++
Runtime Error
// header #ifdef LOCAL #include "cxx-prettyprint-master/prettyprint.hpp" #define debug(x) cout << x << endl #else #define debug(...) 42 #endif #pragma GCC optimize("Ofast") #include <bits/stdc++.h> // types using namespace std; using ll = long long; using ld = long double; typedef pair<ll, ll> Pl; typedef pair<int, int...
// header #ifdef LOCAL #include "cxx-prettyprint-master/prettyprint.hpp" #define debug(x) cout << x << endl #else #define debug(...) 42 #endif #pragma GCC optimize("Ofast") #include <bits/stdc++.h> // types using namespace std; using ll = long long; using ld = long double; typedef pair<ll, ll> Pl; typedef pair<int, int...
replace
191
192
191
192
0
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, a) for (int i = 0; i < (int)(a); i++) typedef long long ll; const int inf = 1001001001; int main() { int h, w, k; cin >> h >> w >> k; vector<string> s(h); rep(i, h) cin >> s[i]; vector<vector<int>> d(h, vector<int>(w, 0)); rep(i, h) rep(j, w) { ...
#include <bits/stdc++.h> using namespace std; #define rep(i, a) for (int i = 0; i < (int)(a); i++) typedef long long ll; const int inf = 1001001001; int main() { int h, w, k; cin >> h >> w >> k; vector<string> s(h); rep(i, h) cin >> s[i]; vector<vector<int>> d(h, vector<int>(w, 0)); rep(i, h) rep(j, w) { ...
insert
57
57
57
61
TLE
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int H, W, K; scanf("%d %d %d", &H, &W, &K); vector<vector<char>> a(H, vector<char>(W)); for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) cin >> a[i][j]; } int ans = 1e9; for (int bit = 0; bit < (1 << (H -...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int H, W, K; scanf("%d %d %d", &H, &W, &K); vector<vector<char>> a(H, vector<char>(W)); for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) cin >> a[i][j]; } int ans = 1e9; for (int bit = 0; bit < (1 << (H -...
replace
33
34
33
34
TLE
p02733
C++
Time Limit Exceeded
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ...
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ...
insert
94
94
94
96
TLE
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using vvb = vector<vb>; using vc = vector<char>; using vvc = vector<vc>; using pii = pair<int, int>; using pli = pair<ll, int>; usin...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using vvb = vector<vb>; using vc = vector<char>; using vvc = vector<vc>; using pii = pair<int, int>; using pli = pair<ll, int>; usin...
insert
66
66
66
70
TLE
p02733
C++
Runtime Error
#include <cassert> #include <iostream> #include <vector> using namespace std; int H, W, K; vector<string> s; template <typename T> void print_vec(vector<T> &v) { for (auto i : v) cout << i << " "; cout << "\n"; } vector<int> cnt_whi(vector<int> &a, int w, int I) { int idx = 0; vector<int> res(__builtin_po...
#include <cassert> #include <iostream> #include <vector> using namespace std; int H, W, K; vector<string> s; template <typename T> void print_vec(vector<T> &v) { for (auto i : v) cout << i << " "; cout << "\n"; } vector<int> cnt_whi(vector<int> &a, int w, int I) { int idx = 0; vector<int> res(__builtin_po...
replace
33
34
33
34
0
p02733
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cmath> #include <cstdint> #include <functional> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define N_TIMES(i, n) for (u...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdint> #include <functional> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define N_TIMES(i, n) for (u...
replace
61
62
61
66
TLE
p02733
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #pragma warning(disable : 4996) typedef long long ll; #define MIN(a, b...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #pragma warning(disable : 4996) typedef long long ll; #define MIN(a, b...
insert
85
85
85
89
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int grid[10][1000], n, m, k; vector<int> get(int x, int y) { vector<int> ans(m); for (int c = 0; c < m; c++) { for (int r = x; r < y; r++) { ans[c] += grid[r][c]; } } return ans; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; int grid[10][1000], n, m, k; vector<int> get(int x, int y) { vector<int> ans(m); for (int c = 0; c < m; c++) { for (int r = x; r < y; r++) { ans[c] += grid[r][c]; } } return ans; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); ...
replace
43
44
43
44
0
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; // int/long: -2,147,483,648 - 2,147,483,647 (-2^31 <= int < 2^31) // long/long long: -9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 // (-2^63 <= long < 2^63) // lower_bound(A.begin(), A.end(), N) // upper_bound(... // A.erase(unique(A.begin...
#include <bits/stdc++.h> using namespace std; typedef long long ll; // int/long: -2,147,483,648 - 2,147,483,647 (-2^31 <= int < 2^31) // long/long long: -9,223,372,036,854,775,808 - 9,223,372,036,854,775,807 // (-2^63 <= long < 2^63) // lower_bound(A.begin(), A.end(), N) // upper_bound(... // A.erase(unique(A.begin...
replace
130
131
130
131
0
p02733
C++
Runtime Error
// #define NDEBUG #pragma GCC optimize("O3") // 最適化レベルの変更 O0〜O3 などを指定 #pragma GCC optimize("-O3,inline,omit-frame-pointer,unroll-loops") #pragma warning(1 : 4456) // 多重forループ内での変数の2重定義を警告にする #define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <iostream> #include <algorithm> #include <array> #include ...
// #define NDEBUG #pragma GCC optimize("O3") // 最適化レベルの変更 O0〜O3 などを指定 #pragma GCC optimize("-O3,inline,omit-frame-pointer,unroll-loops") #pragma warning(1 : 4456) // 多重forループ内での変数の2重定義を警告にする #define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <iostream> #include <algorithm> #include <array> #include ...
replace
675
676
675
676
0
p02733
C++
Runtime Error
#include <algorithm> // minmax, sort, swap #include <bitset> #include <cassert> #include <cmath> #include <cstdio> // printf, scanf #include <deque> // deque #include <functional> // function<void(int)> #include <iomanip> // cout<<setprecision(n) #include <iostream> // cin, cout, cerr #include <map> ...
#include <algorithm> // minmax, sort, swap #include <bitset> #include <cassert> #include <cmath> #include <cstdio> // printf, scanf #include <deque> // deque #include <functional> // function<void(int)> #include <iomanip> // cout<<setprecision(n) #include <iostream> // cin, cout, cerr #include <map> ...
replace
61
62
61
62
0
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int H, W, K; cin >> H >> W >> K; vector<vector<int>> V(H + 1, vector<int>(W + 1, 0)); for (int i = 1; i <= H; i++) { string S; cin >> S; for (int j = 1; j <= W; j++) { if (S[j - 1] == '1') V[i][j]++; V[i][j] += V[i][j - ...
#include <bits/stdc++.h> using namespace std; int main() { int H, W, K; cin >> H >> W >> K; vector<vector<int>> V(H + 1, vector<int>(W + 1, 0)); for (int i = 1; i <= H; i++) { string S; cin >> S; for (int j = 1; j <= W; j++) { if (S[j - 1] == '1') V[i][j]++; V[i][j] += V[i][j - ...
insert
37
37
37
39
TLE
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define fi first #define se second #define all(vr) vr.begin(), vr.end() #define pi pair<int, int> typedef long long ll; namespace myrand { mt19937 mt(chrono::system_clock::now().time_since_epoch() / chrono::microseconds...
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define fi first #define se second #define all(vr) vr.begin(), vr.end() #define pi pair<int, int> typedef long long ll; namespace myrand { mt19937 mt(chrono::system_clock::now().time_since_epoch() / chrono::microseconds...
insert
85
85
85
89
TLE
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define INF 1000000000 #define LINF 1000000000000000000 #define MOD 1000000007 #define mod 1000007 #define INF63 1061109567 #define INF127 9187201950435737471 #define UINF 18446744073709551615 #define F first #define S second #define ll long long #define N 1010 using namespace std; ll rint() { ...
#include <bits/stdc++.h> #define INF 1000000000 #define LINF 1000000000000000000 #define MOD 1000000007 #define mod 1000007 #define INF63 1061109567 #define INF127 9187201950435737471 #define UINF 18446744073709551615 #define F first #define S second #define ll long long #define N 1010 using namespace std; ll rint() { ...
replace
36
37
36
37
TLE
p02733
C++
Runtime Error
#include <algorithm> #include <cctype> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <regex> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) typedef int long long ll;...
#include <algorithm> #include <cctype> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <regex> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) typedef int long long ll;...
replace
83
84
83
84
0
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) using namespace std; using ll = long long; int main() { int mp[13][1005] = {}; int h, w, k; cin >> h >> w >> k; rep(i, h) rep(j, w) scanf("%1d", &mp[i + 1][j + 1]); rep(i, h - 1) rep(j, w) mp[i + 2][j + 1] += mp[i + 1][j + 1]; r...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) using namespace std; using ll = long long; int main() { int mp[13][1005] = {}; int h, w, k; cin >> h >> w >> k; rep(i, h) rep(j, w) scanf("%1d", &mp[i + 1][j + 1]); rep(i, h - 1) rep(j, w) mp[i + 2][j + 1] += mp[i + 1][j + 1]; r...
insert
39
39
39
43
TLE
p02733
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define ll...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define ll...
insert
88
88
88
92
TLE
p02733
C++
Time Limit Exceeded
#include <iostream> #include <vector> using namespace std; char **Sdata; int H, W, K; int MaxVerticalBar(int offset, vector<int> RegionEdge, int BarNumber) { int MAX = offset; vector<int> Chocolates(BarNumber + 1, 0); int ChocoEnd = 0; for (MAX = offset; MAX < W; MAX++) { for (int i = 0; i <= BarNumber; i...
#include <iostream> #include <vector> using namespace std; char **Sdata; int H, W, K; int MaxVerticalBar(int offset, vector<int> RegionEdge, int BarNumber) { int MAX = offset; vector<int> Chocolates(BarNumber + 1, 0); int ChocoEnd = 0; for (MAX = offset; MAX < W; MAX++) { for (int i = 0; i <= BarNumber; i...
insert
55
55
55
57
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; using P = pair<ll, ll>; const ll mod = 1e9 + 7; #define ALL(x) (x).begin(), (x).end() #define pow(x, y) modpow(x, y) #define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++) template <class T = int> T in() { T x; cin >> x; return (x); } /* modとる */ ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; using P = pair<ll, ll>; const ll mod = 1e9 + 7; #define ALL(x) (x).begin(), (x).end() #define pow(x, y) modpow(x, y) #define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++) template <class T = int> T in() { T x; cin >> x; return (x); } /* modとる */ ...
replace
63
64
63
64
0
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define F0R(i, a) FOR(i, 0, a) #define ROF(i, a, b) for (int i = (b)-1; i >= (a); --i) #define R0F(i, a) ROF(i, 0, a) using ll = long long; using ld = long double; ll INF = LLONG_MAX; using vi = vector<int>; using vll ...
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define F0R(i, a) FOR(i, 0, a) #define ROF(i, a, b) for (int i = (b)-1; i >= (a); --i) #define R0F(i, a) ROF(i, 0, a) using ll = long long; using ld = long double; ll INF = LLONG_MAX; using vi = vector<int>; using vll ...
replace
598
599
598
599
0
p02733
C++
Runtime Error
#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++) const int intinf = numeric_limits<int>::max(); using ll = long long int; using pii = pair<int, int>; using pll = pair<ll, ll>; #define MOD 1000000007 void solve() { int H, W,...
#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++) const int intinf = numeric_limits<int>::max(); using ll = long long int; using pii = pair<int, int>; using pll = pair<ll, ll>; #define MOD 1000000007 void solve() { int H, W,...
replace
31
32
31
32
0
p02733
C++
Time Limit Exceeded
// >>> TEMPLATES #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using i32 = int32_t; using i64 = int64_t; #define int ll #define double ld #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define repR(i, n) for (int ...
// >>> TEMPLATES #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using i32 = int32_t; using i64 = int64_t; #define int ll #define double ld #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define repR(i, n) for (int ...
insert
164
164
164
168
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define MAX 500005 #define INF 0x3f3f3f3f using namespace std; template <typename T> void read(T &n) { n = 0; T f = 1; char c = getchar(); while (!isdigit(c) && c != '-') c = getchar(); if (c == '-') f = -1, c = getchar(); while (isdigit(c)) n = n *...
#include <bits/stdc++.h> #define ll long long #define MAX 500005 #define INF 0x3f3f3f3f using namespace std; template <typename T> void read(T &n) { n = 0; T f = 1; char c = getchar(); while (!isdigit(c) && c != '-') c = getchar(); if (c == '-') f = -1, c = getchar(); while (isdigit(c)) n = n *...
replace
27
28
27
28
0
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // #define int long long typedef int ll; typedef long double ld; const ll N = 200005; char en = '\n'; ll inf = 1e9; ll mod = 1e9 + 7; ll power(ll x, ll n, ll mod) { ll res = 1; x %= mod; while (n) { if (n & 1) res = (res * x) % mod; x = (x * x) % mod; ...
#include <bits/stdc++.h> using namespace std; // #define int long long typedef int ll; typedef long double ld; const ll N = 200005; char en = '\n'; ll inf = 1e9; ll mod = 1e9 + 7; ll power(ll x, ll n, ll mod) { ll res = 1; x %= mod; while (n) { if (n & 1) res = (res * x) % mod; x = (x * x) % mod; ...
replace
51
52
51
52
0
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int h, w, k; cin >> h >> w >> k; vector<string> s(h); for (auto &&e : s) { cin >> e; } int res = 1e9; for (int bt = 0; bt < 1 << (h - 1); ++bt) { vector<int> p{0}; for (int i = 1; i <...
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int h, w, k; cin >> h >> w >> k; vector<string> s(h); for (auto &&e : s) { cin >> e; } int res = 1e9; for (int bt = 0; bt < 1 << (h - 1); ++bt) { vector<int> p{0}; for (int i = 1; i <...
insert
37
37
37
41
TLE
p02733
C++
Runtime Error
#include <algorithm> #include <iostream> #include <string> #include <vector> #define rep(i, n) for (i = 0; i < (n); i++) #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) #define MOD 1000000007 #define PI 3.14159265358979323846 #define INF 1 << 30 using namespace std; typedef long long ll; typedef pa...
#include <algorithm> #include <iostream> #include <string> #include <vector> #define rep(i, n) for (i = 0; i < (n); i++) #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) #define MOD 1000000007 #define PI 3.14159265358979323846 #define INF 1 << 30 using namespace std; typedef long long ll; typedef pa...
insert
27
27
27
29
0
p02733
C++
Time Limit Exceeded
#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 whole(x) (x).begin(), (x).end() #define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) using ll = long long; using P = pair<int, int>; const int mod = 1000000007; const int I...
#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 whole(x) (x).begin(), (x).end() #define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) using ll = long long; using P = pair<int, int>; const int mod = 1000000007; const int I...
insert
28
28
28
32
TLE
p02733
C++
Runtime Error
/* Author- Aasav Badera Time- Tue Mar 24 21:33:15 2020 */ #include <bits/stdc++.h> #define ll long long #define pb push_back #define mii map<ll, ll> #define dbg(x) \ { cerr << #x << ": " << x << endl; } #define dbg2(x, y) ...
/* Author- Aasav Badera Time- Tue Mar 24 21:33:15 2020 */ #include <bits/stdc++.h> #define ll long long #define pb push_back #define mii map<ll, ll> #define dbg(x) \ { cerr << #x << ": " << x << endl; } #define dbg2(x, y) ...
replace
46
52
46
52
-11
p02733
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> #define mkp make_pair #define mkt make_tuple #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const l...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> #define mkp make_pair #define mkt make_tuple #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const l...
replace
43
44
43
44
0
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const static ll INF = 1e9; int DP[11][1001]; int H, W, K; vector<string> SS; int Min = 100000; int dfs(string S) { if (S.size() == H - 1) { int hcnt = 0; vector<int> CH; for (int i = 0; i < S.size(); i++) if (S[i] == '1') { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const static ll INF = 1e9; int DP[11][1001]; int H, W, K; vector<string> SS; int Min = 100000; int dfs(string S) { if (S.size() == H - 1) { int hcnt = 0; vector<int> CH; for (int i = 0; i < S.size(); i++) if (S[i] == '1') { ...
insert
42
42
42
44
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll maxn = 2e5 + 50; const int mod = 1e9 + 7; int s[15][15]; int mark[15]; int sum(int x1, int y1, int x2, int y2) { return s[x2][y2] - s[x2][y1 - 1] - s[x1 - 1][y2] + s[x1 - 1][y1 - 1]; } int main() { memset(s, 0, sizeof s); int h, w, k, mi...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll maxn = 2e5 + 50; const int mod = 1e9 + 7; int s[15][1050]; int mark[15]; int sum(int x1, int y1, int x2, int y2) { return s[x2][y2] - s[x2][y1 - 1] - s[x1 - 1][y2] + s[x1 - 1][y1 - 1]; } int main() { memset(s, 0, sizeof s); int h, w, k, ...
replace
5
6
5
6
0
p02733
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; using PL = pair<ll, ll>; // Welcome to my source code! const int INF = 1e9; int main() { int h, w, k; cin >> h >> w >> k; string s[h]; for (int i = 0; i < h; i++) cin >> s[i]; ll ans = INF; for (int bit = 0; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; using PL = pair<ll, ll>; // Welcome to my source code! const int INF = 1e9; int main() { int h, w, k; cin >> h >> w >> k; string s[h]; for (int i = 0; i < h; i++) cin >> s[i]; ll ans = INF; for (int bit = 0; ...
delete
28
29
28
28
TLE
p02733
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(v) v.begin(), v.end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define fs first #define sc second void reset(vector<int> &v) { rep(i, v.size()) { v[i] = 0; } } int main(void) { int h, w, k; cin >> h >> w >> k; vector<vec...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(v) v.begin(), v.end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define fs first #define sc second void reset(vector<int> &v) { rep(i, v.size()) { v[i] = 0; } } int main(void) { int h, w, k; cin >> h >> w >> k; vector<vec...
replace
47
49
47
51
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n - 1); i >= 0; --i) #define ALL(obj) (obj).begin(), (obj).end() #define pb push_back #define to_s to_string #define len(v) (ll) v.size() #define UNIQUE(v) v.erase(uni...
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n - 1); i >= 0; --i) #define ALL(obj) (obj).begin(), (obj).end() #define pb push_back #define to_s to_string #define len(v) (ll) v.size() #define UNIQUE(v) v.erase(uni...
replace
34
35
34
36
0
p02734
C++
Time Limit Exceeded
// #pragma comment(linker, "/stack:200000000") // #pragma GCC optimize("Ofast") // #pragma GCC optimize(3) // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") // #pragma GCC target("sse3","sse2","sse") // #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3") // #pragma GCC target("f16c...
// #pragma comment(linker, "/stack:200000000") // #pragma GCC optimize("Ofast") // #pragma GCC optimize(3) // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") // #pragma GCC target("sse3","sse2","sse") // #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3") // #pragma GCC target("f16c...
delete
215
217
215
215
TLE
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (n); ++i) #define repi(i, a, b) for (int i = int(a); i < (b); i++) #define repr(i, b, a) for (int i = int(b); i >= (a); i--) #define all(x) x.begin(), x.end() const ll mod = 998244...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (n); ++i) #define repi(i, a, b) for (int i = int(a); i < (b); i++) #define repr(i, b, a) for (int i = int(b); i >= (a); i--) #define all(x) x.begin(), x.end() const ll mod = 998244...
replace
36
37
36
37
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long using namespace std; const int MAXN = 2010, P = 998244353; int n, s, a[MAXN], dp[MAXN], np[MAXN]; ll ans; int main() { scanf("%d%d", &n, &s); for (int i = 1; i <= n; i++) { scanf("%d", &a[i]); for (int j = s; j >= 1; j--) { dp[j + a[i]] = (dp[j + a[i]] + d...
#include <bits/stdc++.h> #define ll long long using namespace std; const int MAXN = 6010, P = 998244353; int n, s, a[MAXN], dp[MAXN], np[MAXN]; ll ans; int main() { scanf("%d%d", &n, &s); for (int i = 1; i <= n; i++) { scanf("%d", &a[i]); for (int j = s; j >= 1; j--) { dp[j + a[i]] = (dp[j + a[i]] + d...
replace
3
4
3
4
0
p02734
C++
Runtime Error
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #inclu...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #inclu...
replace
113
114
113
115
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define FOR(I, A, B) for (ll I = ll(A); I < ll(B); ++I) /* https://maspypy.com/atcoder-%E5%8F%82%E5%8A%A0%E6%84%9F%E6%83%B3-2019-03-22abc-159 ans = sum_(i<=j){ f(i,j) } = f(1,1) +f(1,2) +f(1,3) +... +f(2,2) +f(2,3) +... ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define FOR(I, A, B) for (ll I = ll(A); I < ll(B); ++I) /* https://maspypy.com/atcoder-%E5%8F%82%E5%8A%A0%E6%84%9F%E6%83%B3-2019-03-22abc-159 ans = sum_(i<=j){ f(i,j) } = f(1,1) +f(1,2) +f(1,3) +... +f(2,2) +f(2,3) +... ...
replace
28
29
28
29
0
p02734
C++
Runtime Error
#pragma GCC optimize("O2,Ofast,inline,unroll-all-loops,-ffast-math") using namespace std; #include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) #define per(i, a, n) for (int i = n - 1; i >= a; i--) #define pb(X) push_back(X) #define x first #define y second #define all(x) (x).begin(), (x).end() #def...
#pragma GCC optimize("O2,Ofast,inline,unroll-all-loops,-ffast-math") using namespace std; #include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) #define per(i, a, n) for (int i = n - 1; i >= a; i--) #define pb(X) push_back(X) #define x first #define y second #define all(x) (x).begin(), (x).end() #def...
replace
29
30
29
30
0
p02734
C++
Runtime Error
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <...
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <...
replace
82
83
82
85
0
p02734
C++
Runtime Error
/** * author: zjsdut * created: 2020/03/23 11:14:30 **/ #include <bits/stdc++.h> using namespace std; struct fast_ios { fast_ios() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); }; } fast_ios_; template <typename A, typename B> bool chkmin(A &a, const B ...
/** * author: zjsdut * created: 2020/03/23 11:14:30 **/ #include <bits/stdc++.h> using namespace std; struct fast_ios { fast_ios() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); }; } fast_ios_; template <typename A, typename B> bool chkmin(A &a, const B ...
replace
384
385
384
386
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long int; const ll mod = 998244353; vector<int> a(4000); int n, s; ll dp[4000][4000][3]; int ways(int l, int r, int S) { if (S == 0) { return 1; } if (r == l) { return 0; } return ways(l, r - 1, S) + (S >= a[r - 1] ? ways(l, r - 1, S - a[r ...
#include <bits/stdc++.h> using namespace std; using ll = long long int; const ll mod = 998244353; vector<int> a(4000); int n, s; ll dp[4000][4000][3]; int ways(int l, int r, int S) { if (S == 0) { return 1; } if (r == l) { return 0; } return ways(l, r - 1, S) + (S >= a[r - 1] ? ways(l, r - 1, S - a[r ...
replace
38
39
38
39
-11
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } #define MOD 998244353 int n, s; ...
#include <bits/stdc++.h> using namespace std; #define int long long template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } #define MOD 998244353 int n, s; ...
insert
31
31
31
34
-11
p02734
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; const ll MOD = 998244353; int main() { cin.tie(0); ios::sync_with_stdio(false); ll N, S; cin >> N >> S; vector<ll> A(N); rep(i, N) { cin >> A[i]; } vector<map<ll, ll>> mp_v(N); ll ans = ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; const ll MOD = 998244353; int main() { cin.tie(0); ios::sync_with_stdio(false); ll N, S; cin >> N >> S; vector<ll> A(N); rep(i, N) { cin >> A[i]; } vector<unordered_map<ll, ll>> mp_v(N); ...
replace
14
15
14
15
TLE
p02734
C++
Runtime Error
#include <bits/stdc++.h> #define pb push_back #define fst first #define snd second #define fore(i, a, b) for (int i = a, ggdem = b; i < ggdem; ++i) #define SZ(x) ((int)x.size()) #define ALL(x) x.begin(), x.end() #define mset(a, v) memset((a), (v), sizeof(a)) #define FIN ...
#include <bits/stdc++.h> #define pb push_back #define fst first #define snd second #define fore(i, a, b) for (int i = a, ggdem = b; i < ggdem; ++i) #define SZ(x) ((int)x.size()) #define ALL(x) x.begin(), x.end() #define mset(a, v) memset((a), (v), sizeof(a)) #define FIN ...
insert
21
21
21
23
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> #define int long long int #define ld long double #define pb push_back #define pf push_front #define ft first #define sc second #define all(v) v.begin(), v.end() using namespace std; const int maxn = 3011, mod = 998244353; int dp[maxn][maxn]; signed main() { ios_base::sync_with_stdio(false), c...
#include <bits/stdc++.h> #define int long long int #define ld long double #define pb push_back #define pf push_front #define ft first #define sc second #define all(v) v.begin(), v.end() using namespace std; const int maxn = 3011, mod = 998244353; int dp[maxn][maxn]; signed main() { ios_base::sync_with_stdio(false), c...
replace
39
41
39
43
0
p02734
C++
Time Limit Exceeded
// >>> TEMPLATES #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using i32 = int32_t; using i64 = int64_t; #define int ll #define double ld #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define repR(i, n) for (int ...
// >>> TEMPLATES #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using i32 = int32_t; using i64 = int64_t; #define int ll #define double ld #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define repR(i, n) for (int ...
replace
221
237
221
264
TLE
p02734
C++
Runtime Error
#include <bits/stdc++.h> #include <queue> #include <vector> using namespace std; typedef long long int64; const int P = 998244353; const int MAXN = 3011; int dp[MAXN]; int n, s, ans; inline int add(int x, int y) { x += y; x -= x >= P ? P : 0; return x; } inline int mul(int x, int y) { return 1ll * x * y % P; }...
#include <bits/stdc++.h> #include <queue> #include <vector> using namespace std; typedef long long int64; const int P = 998244353; const int MAXN = 3011; int dp[MAXN]; int n, s, ans; inline int add(int x, int y) { x += y; x -= x >= P ? P : 0; return x; } inline int mul(int x, int y) { return 1ll * x * y % P; }...
replace
25
26
25
26
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // #include "testlib.h" #define ff first #define ss second #define all(v) v.begin(), v.end() #define int long long #define ll long long #define M 1000000007 #define MM 998244353 #define inputarr(a, n) \ for (int i = ...
#include <bits/stdc++.h> using namespace std; // #include "testlib.h" #define ff first #define ss second #define all(v) v.begin(), v.end() #define int long long #define ll long long #define M 1000000007 #define MM 998244353 #define inputarr(a, n) \ for (int i = ...
replace
65
66
65
66
0
p02734
C++
Time Limit Exceeded
/*temp*/ // // // // // #undef _DEBUG // #pragma GCC optimize("Ofast") // 不動小数点の計算高速化 // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") // #include <boost/multiprecision/cpp_int.hpp> #ifdef _DEBUG #include "template.h" #else #if __cplusplus >= 201703L /*Atcoderでしか使えない(c++17 && このテンプレートが使え...
/*temp*/ // // // // // #undef _DEBUG // #pragma GCC optimize("Ofast") // 不動小数点の計算高速化 // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") // #include <boost/multiprecision/cpp_int.hpp> #ifdef _DEBUG #include "template.h" #else #if __cplusplus >= 201703L /*Atcoderでしか使えない(c++17 && このテンプレートが使え...
replace
8,443
8,444
8,443
8,444
TLE
p02734
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define V vector<long long> #define VV vector<vector<long long>> #define VVV vector<vector<vector<long long>>> #define P pair<ll, ll> #define rep(i, n) for (ll(i) = 0; (i) < (n); ++(i)) using namespace std; long long mod = 998244353; struct mint { long long x; mint(lon...
#include <bits/stdc++.h> #define ll long long #define V vector<long long> #define VV vector<vector<long long>> #define VVV vector<vector<vector<long long>>> #define P pair<ll, ll> #define rep(i, n) for (ll(i) = 0; (i) < (n); ++(i)) using namespace std; long long mod = 998244353; struct mint { long long x; mint(lon...
replace
58
59
58
59
0
p02734
Python
Runtime Error
# https://atcoder.jp/contests/abc159/submissions/11139734 def main(): MOD = 998244353 N, S = map(int, input().split()) (*a,) = map(int, input().split()) dp = [0] * (S + 1) ret = 0 for i, x in enumerate(a): dp[0] += 1 ret = (ret + dp[S - x] * (N - i)) % MOD for k in r...
# https://atcoder.jp/contests/abc159/submissions/11139734 def main(): MOD = 998244353 N, S = map(int, input().split()) (*a,) = map(int, input().split()) dp = [0] * (S + 1) ret = 0 for i, x in enumerate(a): dp[0] += 1 if x > S: continue ret = (ret + dp[S -...
insert
14
14
14
16
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using Int = int_fast64_t; constexpr Int mod = 998244353; int main() { cin.tie(0); ios::sync_with_stdio(false); Int n, s; cin >> n >> s; vector<Int> a(n); for (auto &i : a) cin >> i; vector<vector<Int>> dp(n, vector<Int>(s + 1, 0)); Int ans = 0; for (...
#include <bits/stdc++.h> using namespace std; using Int = int_fast64_t; constexpr Int mod = 998244353; int main() { cin.tie(0); ios::sync_with_stdio(false); Int n, s; cin >> n >> s; vector<Int> a(n); for (auto &i : a) cin >> i; vector<vector<Int>> dp(n, vector<Int>(s + 1, 0)); Int ans = 0; for (...
replace
27
29
27
31
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
42
45
42
43
-11
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define SZ(v) int((v).size()) #define ALL(vec) begin(vec), end(vec) #define pb push_back #define mk make_pair #define fi first #define se second typedef long long ll; template <typename T> inline bool uax(T &x, T y) { return (y > x) ? x = y, true : false; } template <ty...
#include <bits/stdc++.h> using namespace std; #define SZ(v) int((v).size()) #define ALL(vec) begin(vec), end(vec) #define pb push_back #define mk make_pair #define fi first #define se second typedef long long ll; template <typename T> inline bool uax(T &x, T y) { return (y > x) ? x = y, true : false; } template <ty...
insert
138
138
138
142
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> #define fr(i, n) for (int i = 0; i < (n); ++i) #define foor(i, a, b) for (int i = (a); i <= (b); ++i) #define rf(i, n) for (int i = (n); i-- > 0;) #define roof(i, b, a) for (int i = (b); i >= (a); --i) #define elsif else if #define all(x) x.begin(), x.end() #define Sort(x) sort(all(x)) #define ...
#include <bits/stdc++.h> #define fr(i, n) for (int i = 0; i < (n); ++i) #define foor(i, a, b) for (int i = (a); i <= (b); ++i) #define rf(i, n) for (int i = (n); i-- > 0;) #define roof(i, b, a) for (int i = (b); i >= (a); --i) #define elsif else if #define all(x) x.begin(), x.end() #define Sort(x) sort(all(x)) #define ...
replace
688
690
688
691
0
p02734
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <string> #include <unordered_map> #include <vector> using namespace std; using ll = long lo...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <string> #include <unordered_map> #include <vector> using namespace std; using ll = long lo...
replace
152
153
152
153
0
p02734
C++
Runtime Error
// Etavioxy #include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #define il inline #define ll long long #define rep(i, s, t) for (register int i = (s); i <= (t); i++) #define rev_rep(i, s, t) for (register int i = (s); i >= (t); i--) #define each(i, u) for (int i = head[u]; i; i ...
// Etavioxy #include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #define il inline #define ll long long #define rep(i, s, t) for (register int i = (s); i <= (t); i++) #define rev_rep(i, s, t) for (register int i = (s); i >= (t); i--) #define each(i, u) for (int i = head[u]; i; i ...
replace
34
37
34
39
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<ll> vll; #define repi(i, a, b) for (ll i = a; i < b; i++) #define rep(i, a) repi(i, 0, a) #define rrep(i, a) for (ll i = a - 1; i >= 0; i--) #define MOD 998244353 // debug #define debug(arr) ...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<ll> vll; #define repi(i, a, b) for (ll i = a; i < b; i++) #define rep(i, a) repi(i, 0, a) #define rrep(i, a) for (ll i = a - 1; i >= 0; i--) #define MOD 998244353 // debug #define debug(arr) ...
replace
30
31
30
32
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define ll long long #define ii pair<int, int> #define vi vector<int> #define vll vector<ll> #define vii vector<ii> const int maxn = 3e3 + 10; const int mod = 998244353; int n, ...
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define ll long long #define ii pair<int, int> #define vi vector<int> #define vll vector<ll> #define vii vector<ii> const int maxn = 3e3 + 10; const int mod = 998244353; int n, ...
insert
29
29
29
31
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> #define syosu(x) fixed << setprecision(x) using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; typedef pair<int, int> P; typedef pair<double, double> pdd; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<do...
#include <bits/stdc++.h> #define syosu(x) fixed << setprecision(x) using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; typedef pair<int, int> P; typedef pair<double, double> pdd; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<do...
insert
37
37
37
39
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> #include <algorithm> #include <array> #ifdef _MSC_VER #include <intrin.h> #endif namespace atcoder { namespace internal { // @param n `0 <= n` // @return minimum non-negative `x` s.t. `n <= 2**x` int ceil_pow2(int n) { int x = 0; while ((1U << x) < (unsigned int)(n)) x++; return ...
#include <bits/stdc++.h> #include <algorithm> #include <array> #ifdef _MSC_VER #include <intrin.h> #endif namespace atcoder { namespace internal { // @param n `0 <= n` // @return minimum non-negative `x` s.t. `n <= 2**x` int ceil_pow2(int n) { int x = 0; while ((1U << x) < (unsigned int)(n)) x++; return ...
replace
2,429
2,430
2,429
2,433
0
p02734
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; typedef long long ll; const ll MOD = 998244353; int main() { int n, s; cin >> n >> s; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; ll ret = 0; vector<ll> dp(s + 1); for (int i = 0; i < n; i++) { dp[a[i]] += i + 1; for...
#include <iostream> #include <vector> using namespace std; typedef long long ll; const ll MOD = 998244353; int main() { int n, s; cin >> n >> s; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; ll ret = 0; vector<ll> dp(s + 1); for (int i = 0; i < n; i++) { if (a[i] <= s) { dp[...
replace
18
24
18
26
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pb push_back #define all(n) n.begin(), n.end() #define eb emplace_back #define endl "\n" const ll maxn = 2e3 + 50; const ll maxx = 1e13; const ll mod1 = 1000000007; const ll mod = 998244353; ll dp[maxn][maxn][4]; ll a[...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pb push_back #define all(n) n.begin(), n.end() #define eb emplace_back #define endl "\n" const ll maxn = 3e3 + 50; const ll maxx = 1e13; const ll mod1 = 1000000007; const ll mod = 998244353; ll dp[maxn][maxn][4]; ll a[...
replace
10
11
10
11
-11
p02734
C++
Runtime Error
#include <bits/stdc++.h> /*#pragma GCC optimize("Ofast") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native") */ // #include <ext/pb_ds/assoc_container.hpp> using namespace std; // using namespace __gnu_pbds; #define s...
#include <bits/stdc++.h> /*#pragma GCC optimize("Ofast") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native") */ // #include <ext/pb_ds/assoc_container.hpp> using namespace std; // using namespace __gnu_pbds; #define s...
replace
44
45
44
45
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> #define mxn 1000010 #define db double #define LL long long #define ldb long double #define ull unsigned long long #define pb push_back #define ppb pop_back #define pf push_front #define pul pair<ull, LL> #define pii pair<int, int> #define mp make_pair #define fr first #define sc second #define ...
#include <bits/stdc++.h> #define mxn 1000010 #define db double #define LL long long #define ldb long double #define ull unsigned long long #define pb push_back #define ppb pop_back #define pf push_front #define pul pair<ull, LL> #define pii pair<int, int> #define mp make_pair #define fr first #define sc second #define ...
replace
51
59
51
60
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int mod = 998244353; int main() { int n, s; cin >> n >> s; int a[n + 1], dp[n + 1][s + 1]; for (int i = 1; i <= n; i++) cin >> a[i]; memset(dp, 0, sizeof(dp)); // dp[0][0]=1; int ans = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= s; ...
#include <bits/stdc++.h> using namespace std; const int mod = 998244353; int main() { int n, s; cin >> n >> s; int a[n + 1], dp[n + 1][3005]; for (int i = 1; i <= n; i++) cin >> a[i]; memset(dp, 0, sizeof(dp)); // dp[0][0]=1; int ans = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= s; j...
replace
7
8
7
8
0
p02734
C++
Runtime Error
// author:luckYrat(twitter:@luckYrat_) //<ここに一言> // せんげん! #include <iostream> #include <algorithm> #include <cmath> #include <iomanip> #include <bitset> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #include <cctype> #include <climits> #include <utility> // なまえ...
// author:luckYrat(twitter:@luckYrat_) //<ここに一言> // せんげん! #include <iostream> #include <algorithm> #include <cmath> #include <iomanip> #include <bitset> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #include <cctype> #include <climits> #include <utility> // なまえ...
replace
136
137
136
137
-11
p02734
C++
Runtime Error
#include "algorithm" #include "bitset" #include "cassert" #include "climits" #include "cmath" #include "cstdio" #include "ctime" #include "functional" #include "iomanip" #include "iostream" #include "list" #include "map" #include "numeric" #include "queue" #include "random" #include "set" #include "stack" #include "str...
#include "algorithm" #include "bitset" #include "cassert" #include "climits" #include "cmath" #include "cstdio" #include "ctime" #include "functional" #include "iomanip" #include "iostream" #include "list" #include "map" #include "numeric" #include "queue" #include "random" #include "set" #include "stack" #include "str...
replace
42
43
42
44
0
p02734
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; #define int ll #define pb push_back #define pii pair<int, int> #define...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; #define int ll #define pb push_back #define pii pair<int, int> #define...
replace
19
20
19
20
0
p02734
C++
Memory Limit Exceeded
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> #define MOD 1000000007 #...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> #define MOD 1000000007 #...
replace
113
114
113
114
MLE
p02734
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define InfL 1000000000 #define InfLL 1000000000000000000LL #define mod 998244353 #define rep(i, n) for (int(i) = 0; (i) ...
#include <algorithm> #include <cassert> #include <cmath> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define InfL 1000000000 #define InfLL 1000000000000000000LL #define mod 998244353 #define rep(i, n) for (int(i) = 0; (i) ...
replace
49
51
49
53
0