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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define sz(x) (int)(x.size())
using namespace std;
const int N = 1e3 + 5, inf = 1e18, mod = 1e9 + 7;
int n, a[N], dp[N][N];
int go(int L, int R) {
if (L > R)
return 0;
int &ans = dp[L][R];
if (~ans)
return ans;
int c1 = a[L] - go(L + 1, R);
int c2 = ... | #include <bits/stdc++.h>
#define int long long
#define sz(x) (int)(x.size())
using namespace std;
const int N = 3e3 + 5, inf = 1e18, mod = 1e9 + 7;
int n, a[N], dp[N][N];
int go(int L, int R) {
if (L > R)
return 0;
int &ans = dp[L][R];
if (~ans)
return ans;
int c1 = a[L] - go(L + 1, R);
int c2 = ... | replace | 5 | 6 | 5 | 6 | 0 | |
p03171 | C++ | Runtime Error | /*
Author: Racer5x
*************************************** UNAUTHORISED COPYING OF CODE
PROHIBITED **********************************
*/
/*#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")*/
... | /*
Author: Racer5x
*************************************** UNAUTHORISED COPYING OF CODE
PROHIBITED **********************************
*/
/*#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")*/
... | replace | 90 | 96 | 90 | 91 | -11 | |
p03171 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
int dp[4000][4000];
int a[8000];
int solve(int l, int r) {
if (l > r || l <= 0 || r <= 0)
return 0;
if (l == r)
return a[l];
if (dp[l][r] != -1)
return dp[l][r];
if (r - l + 1 == 2)
return max(a[l], a[r]);
return max(a[l] + mi... | #include <bits/stdc++.h>
using namespace std;
#define int long long
int dp[4000][4000];
int a[8000];
int solve(int l, int r) {
if (l > r || l <= 0 || r <= 0)
return 0;
if (l == r)
return a[l];
if (dp[l][r] != -1)
return dp[l][r];
if (r - l + 1 == 2)
return max(a[l], a[r]);
return dp[l][r] = ma... | replace | 14 | 16 | 14 | 16 | TLE | |
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MAXN = 3005;
vector<vector<vector<P>>> dp(MAXN, vector<vector<P>>(2, vector<P>(MAXN)));
vector<int> a(MAXN);
bool visited[MAXN][MAXN][2];
P q(int i, int j, int k) { // ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MAXN = 3005;
vector<vector<vector<P>>> dp(MAXN, vector<vector<P>>(MAXN, vector<P>(2)));
vector<int> a(MAXN);
bool visited[MAXN][MAXN][2];
P q(int i, int j, int k) { // ... | replace | 7 | 8 | 7 | 8 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03171 | C++ | Time Limit Exceeded |
#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, ... | insert | 33 | 33 | 33 | 34 | TLE | |
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long dp[2001][2001];
long long a[2001];
long long game(int i, int j, int c) {
// cout<<i<<" "<<j<<" "<<x<<" "<<y<<endl;
if (dp[i][j] != -1) {
return dp[i][j];
}
long long ans;
if (i > j) {
// cout<<x<<" "<<y<<"%%%%5"<<endl;
return 0;
} else {
... | #include <bits/stdc++.h>
using namespace std;
long long dp[3001][3001];
long long a[3001];
long long game(int i, int j, int c) {
// cout<<i<<" "<<j<<" "<<x<<" "<<y<<endl;
if (dp[i][j] != -1) {
return dp[i][j];
}
long long ans;
if (i > j) {
// cout<<x<<" "<<y<<"%%%%5"<<endl;
return 0;
} else {
... | replace | 2 | 4 | 2 | 4 | 0 | |
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long dp[3001][3001];
int main() {
int n;
cin >> n;
long long a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
// dp[i][j]=i-dp[i+1][j-1]||j-dp[]
for (int gap = 1; gap <= n; gap++) {
for (int i = 0; i < n; i++) {
int j = i + gap - 1;
if (i ... | #include <bits/stdc++.h>
using namespace std;
long long dp[3001][3001];
int main() {
int n;
cin >> n;
long long a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
// dp[i][j]=i-dp[i+1][j-1]||j-dp[]
for (int gap = 1; gap <= n; gap++) {
for (int i = 0; i < n; i++) {
int j = i + gap - 1;
if (i ... | replace | 15 | 16 | 15 | 16 | 0 | |
p03171 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespace std;
#define watch(x)... | #include <bits/stdc++.h>
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespace std;
#define watch(x)... | insert | 20 | 20 | 20 | 22 | TLE | |
p03171 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
long long int dp[3001][3001];
long long int min(long long int a, long long int b) {
if (a > b)
return b;
return a;
}
long long int max(long long int a, long long int b) {
if (a > b)
return a;
return b;
}
long long int util(vector<long lon... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
long long int dp[3001][3001];
long long int min(long long int a, long long int b) {
if (a > b)
return b;
return a;
}
long long int max(long long int a, long long int b) {
if (a > b)
return a;
return b;
}
long long int util(vector<long lon... | insert | 19 | 19 | 19 | 21 | TLE | |
p03171 | C++ | Time Limit Exceeded | // YA TOH WOH AAGE SE LEGA YA PHIR PICHE SE
// TOH BAS USKA MAXIMUM NIKALNA HAI
// DP[I][J] MAXIMUM OF X-Y IN THE SUBARRAY FROM I TO J
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespa... | // YA TOH WOH AAGE SE LEGA YA PHIR PICHE SE
// TOH BAS USKA MAXIMUM NIKALNA HAI
// DP[I][J] MAXIMUM OF X-Y IN THE SUBARRAY FROM I TO J
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespa... | insert | 63 | 63 | 63 | 64 | TLE | |
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespa... | #include <bits/stdc++.h>
#define int long long
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using namespa... | replace | 10 | 11 | 10 | 11 | 0 | |
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<int, null_type, less_equal<int>, rb_tree_tag, \
tree_order_statistic... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<int, null_type, less_equal<int>, rb_tree_tag, \
tree_order_statistic... | replace | 47 | 48 | 47 | 51 | 0 | |
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define f first
#define s second
#define int long long
#define pb push_back
#define pencho \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define f first
#define s second
#define int long long
#define pb push_back
#define pencho \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#... | replace | 10 | 11 | 10 | 11 | TLE | |
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define fastio() \
ios_base::sync_with_stdio(0); \
cin.tie(0)... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define fastio() \
ios_base::sync_with_stdio(0); \
cin.tie(0)... | delete | 43 | 47 | 43 | 43 | 0 | |
p03171 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
typedef long long LL;
const int MOD = 1e9 + 7;
LL dfs(int x, int y, vector<vector<LL>> &dp, vector<L... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
typedef long long LL;
const int MOD = 1e9 + 7;
LL dfs(int x, int y, vector<vector<LL>> &dp, vector<L... | replace | 32 | 33 | 32 | 43 | TLE | |
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
#define dd double
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, a, b) for (int i = a; i < b; i++)
#define rep1(i, b) for (int i = 1; i <= b; i++)
#define pb push_back
#define mp make_pair
#define clr(x) x.clear()
#d... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
#define dd double
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, a, b) for (int i = a; i < b; i++)
#define rep1(i, b) for (int i = 1; i <= b; i++)
#define pb push_back
#define mp make_pair
#define clr(x) x.clear()
#d... | replace | 20 | 21 | 20 | 21 | 0 | |
p03171 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define PB push_back
#define ALL(x) (x).begin(), (x).end()
#define ALLR(x) (x).rbegin(), (x).rend()
#define MP make_pair
#define debug(_x) cerr << #_x << '=' << (_x) << endl;
#define debug2(_x, _y) \
cerr << #_x <... | #include <bits/stdc++.h>
using namespace std;
#define PB push_back
#define ALL(x) (x).begin(), (x).end()
#define ALLR(x) (x).rbegin(), (x).rend()
#define MP make_pair
#define debug(_x) cerr << #_x << '=' << (_x) << endl;
#define debug2(_x, _y) \
cerr << #_x <... | replace | 41 | 42 | 41 | 42 | -11 | |
p03171 | C++ | Runtime Error |
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define int 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>
#define pqs priority_queue<int, vi, greater<int>>
#define setbits... |
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define int 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>
#define pqs priority_queue<int, vi, greater<int>>
#define setbits... | replace | 47 | 48 | 47 | 48 | -11 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<long long>
#define MEM(var, val) memset(var, (val), sizeof(var))
const int M = 1e9 + 7;
vll a;
ll n, k;
vector<vll> dp;
vll pref;
void dist(ll i) {
for (int j = 0; j <= k; j++)
if (j > a[i])
dp[i][j] = (pref[j] - pref[j -... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<long long>
#define MEM(var, val) memset(var, (val), sizeof(var))
const int M = 1e9 + 7;
vll a;
ll n, k;
vector<vll> dp;
vll pref;
void dist(ll i) {
for (int j = 0; j <= k; j++)
if (j > a[i])
dp[i][j] = (pref[j] - pref[j -... | replace | 38 | 39 | 38 | 40 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define MOD 1000000007
#define INF 100000000000000 // INF - 1e14
#define vi vector<ll>
#define pb push_back
#define mpl map<ll, ll>
#define ff first
#define ss second
#define pll pair<ll, ll>... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define MOD 1000000007
#define INF 100000000000000 // INF - 1e14
#define vi vector<ll>
#define pb push_back
#define mpl map<ll, ll>
#define ff first
#define ss second
#define pll pair<ll, ll>... | delete | 114 | 119 | 114 | 114 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
const ll INF = (1LL << 60);
const int MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
templa... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
const ll INF = (1LL << 60);
const int MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
templa... | replace | 30 | 31 | 30 | 31 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p03172 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
long long dp[110][1000010], sdp[1000010], a[1100], sa[1100], n, m;
int main() {
sa[0] = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++)
cin >> a[i], sa[i] = max(sa[i - 1] + a[i], m);
memset(dp, 0, sizeof dp);
dp[0][0] = 1;
for (int i = 1; i <= n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
long long dp[110][1000010], sdp[1000010], a[1100], sa[1100], n, m;
int main() {
sa[0] = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++)
cin >> a[i], sa[i] = min(sa[i - 1] + a[i], m);
memset(dp, 0, sizeof dp);
dp[0][0] = 1;
for (int i = 1; i <= n; i++) {
... | replace | 9 | 10 | 9 | 10 | TLE | |
p03172 | C++ | Runtime Error | /*Knapsack problem
Input:
N W
w1 v1
w2 v2
.
.
.
wn vn
Output: print ma possible sum of the values if time that knapsack of capacity W
can contain.
*/
#include <bits/stdc++.h>
using namespace std;
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) ... | /*Knapsack problem
Input:
N W
w1 v1
w2 v2
.
.
.
wn vn
Output: print ma possible sum of the values if time that knapsack of capacity W
can contain.
*/
#include <bits/stdc++.h>
using namespace std;
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) ... | replace | 83 | 84 | 83 | 86 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
int n, k;
cin >> n >> k;
vector<int> pref(k), dp(k);
dp[0] = 1;
for (int kid = 1; kid <= n; kid++) {
int c;
cin >> c;
pref[0] = dp[0];
dp[0] = 0;
for (int i = 1; i <= k; i++) {
pref[i] = (pref[i - ... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
int n, k;
cin >> n >> k;
vector<int> pref(k + 1), dp(k + 1);
dp[0] = 1;
for (int kid = 1; kid <= n; kid++) {
int c;
cin >> c;
pref[0] = dp[0];
dp[0] = 0;
for (int i = 1; i <= k; i++) {
pref[i] = (p... | replace | 9 | 10 | 9 | 10 | 0 | |
p03172 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unistd.h>
#include <unordered_map>
#include <vector>
using... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unistd.h>
#include <unordered_map>
#include <vector>
using... | replace | 74 | 75 | 74 | 75 | -6 | munmap_chunk(): invalid pointer
|
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define repl(i, l, r) for (ll i = (l); i < (r); i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define perl(i, r, l) for (ll i = r - 1; i >= l; i--)
#define fi first
#define se second
#define pb push_back
#define ins inse... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define repl(i, l, r) for (ll i = (l); i < (r); i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define perl(i, r, l) for (ll i = r - 1; i >= l; i--)
#define fi first
#define se second
#define pb push_back
#define ins inse... | replace | 98 | 99 | 98 | 99 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define all(v) v.begin(), v.end()
#define allarr(a) a, a + n
#define ll long long
#define ull unsigned long long
#define pb push_back
#define fastio \
... | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define all(v) v.begin(), v.end()
#define allarr(a) a, a + n
#define ll long long
#define ull unsigned long long
#define pb push_back
#define fastio \
... | replace | 42 | 43 | 42 | 43 | -11 | |
p03172 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include... | delete | 61 | 67 | 61 | 61 | TLE | |
p03172 | C++ | Runtime Error | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int long long
using namespace std;
int dp[105][200005];
int mod = 1e9 + 7;
signed main() {
ios_base::sync_with_stdio(false);
cin.t... | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int long long
using namespace std;
int dp[105][200005];
int mod = 1e9 + 7;
signed main() {
ios_base::sync_with_stdio(false);
cin.t... | replace | 12 | 16 | 12 | 16 | -11 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef long double ld;
ll mod = 1e9 + 7;
int main() {
ll n, k;
cin >> n >> k;
vector<ll> arr(n);
for (int z... | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef long double ld;
ll mod = 1e9 + 7;
int main() {
ll n, k;
cin >> n >> k;
vector<ll> arr(n + 1);
for (i... | replace | 12 | 13 | 12 | 13 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int, int> P;
constexpr int mod = 1e9 + 7;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
rep(i, n) cin >> a[i];
vector<int> dp(k + 2, 0);
dp[... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef pair<int, int> P;
constexpr int mod = 1e9 + 7;
int main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
rep(i, n) cin >> a[i];
vector<int> dp(k + 2, 0);
dp[... | replace | 16 | 17 | 16 | 17 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
// 自動でmodを取ってくれる整数型
// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = 1000000007;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
// 自動でmodを取ってくれる整数型
// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = 1000000007;... | replace | 115 | 116 | 115 | 116 | -11 | |
p03172 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define int long long int
#define pll pair<int, int>
#define dbl long double
#define ff first
#define ss second
#define endl "\n"
#define mod 1000000007
#define eps 0.00000001
#define inf 10000000000001
#define all(x) (x).begin(), (x).end()
#define size(x) (int)(x).size()
#define pb(x) push_bac... | #include <bits/stdc++.h>
#define int long long int
#define pll pair<int, int>
#define dbl long double
#define ff first
#define ss second
#define endl "\n"
#define mod 1000000007
#define eps 0.00000001
#define inf 10000000000001
#define all(x) (x).begin(), (x).end()
#define size(x) (int)(x).size()
#define pb(x) push_bac... | replace | 53 | 54 | 53 | 54 | TLE | |
p03172 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <utility>
#include <vector>
#define fir first
#define sec second
#define sz(s) (s).size()
#define pb push_back
#define get(n) scanf("%d", &n);
#define gets(s) ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <utility>
#include <vector>
#define fir first
#define sec second
#define sz(s) (s).size()
#define pb push_back
#define get(n) scanf("%d", &n);
#define gets(s) ... | replace | 274 | 276 | 274 | 276 | -6 | munmap_chunk(): invalid pointer
|
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
#define l_ength size
using ll = long long;
const int mod = 1000000007;
const ll infll = (1ll << 60);
using namespace std;
ll dp[110][100010];
ll sum[100010];
int main() {
int n, k;
cin >> n >> k;
vector<ll> a(n);
for (auto &k : a)
cin >> k;
dp[0][0] = 1;
for (int i = 0; i <= k... | #include <bits/stdc++.h>
#define l_ength size
using ll = long long;
const int mod = 1000000007;
const ll infll = (1ll << 60);
using namespace std;
ll dp[110][100010];
ll sum[100010];
int main() {
int n, k;
cin >> n >> k;
vector<ll> a(n);
for (auto &k : a)
cin >> k;
dp[0][0] = 1;
for (int i = 0; i <= k... | replace | 21 | 23 | 21 | 23 | 0 | |
p03172 | C++ | Runtime Error |
// WA
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int dp[100001];
vector<int> ar(100);
// ll solve(ll index, ll x) {
// // cout << "0\n";
// if(dp[index][x] != -1)
// return dp[index][x];
// ll ansl = 0;
// // cout << "1\n";
// if(x == 0)
// return d... |
// WA
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int dp[100001];
vector<int> ar(100);
// ll solve(ll index, ll x) {
// // cout << "0\n";
// if(dp[index][x] != -1)
// return dp[index][x];
// ll ansl = 0;
// // cout << "1\n";
// if(x == 0)
// return d... | replace | 53 | 56 | 53 | 58 | 0 | |
p03172 | C++ | Runtime Error | /*** author: yuji9511 ***/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lpair = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i < (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define printa(x, n) ... | /*** author: yuji9511 ***/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lpair = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i < (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define printa(x, n) ... | replace | 33 | 34 | 33 | 36 | 0 | |
p03172 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using VVV = V<VV<T>>;
template <class S, class T> using P = pair<S, T>;
template <class... T> using TP = tuple<T...>;
using ll = long long;
using ull = unsigned long long;
us... | #include <bits/stdc++.h>
using namespace std;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using VVV = V<VV<T>>;
template <class S, class T> using P = pair<S, T>;
template <class... T> using TP = tuple<T...>;
using ll = long long;
using ull = unsigned long long;
us... | replace | 1,395 | 1,400 | 1,395 | 1,404 | TLE | |
p03172 | C++ | Runtime Error | // Om Sree Sai Ram
#include "bits/stdc++.h"
using namespace std;
const int mod = 1e9 + 7;
int add_self(int &a, int b) {
a += b;
if (a >= mod) {
a -= mod;
}
}
int sub_self(int &a, int b) {
a -= b;
if (a <= 0) {
a += mod;
}
}
int main() {
int n, k;
cin >> n >> k;
vector<int> dp(k + 1);
//... | // Om Sree Sai Ram
#include "bits/stdc++.h"
using namespace std;
const int mod = 1e9 + 7;
int add_self(int &a, int b) {
a += b;
if (a >= mod) {
a -= mod;
}
}
int sub_self(int &a, int b) {
a -= b;
if (a <= 0) {
a += mod;
}
}
int main() {
int n, k;
cin >> n >> k;
vector<int> dp(k + 1);
//... | replace | 37 | 38 | 37 | 38 | 0 | |
p03172 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define FIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define pb push_back
#define eb emplace_b... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define FIO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define pb push_back
#define eb emplace_b... | replace | 56 | 57 | 56 | 57 | 0 | |
p03172 | C++ | Runtime Error | #pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
int main() {
using namespace std;
constexpr unsigned int MOD = 1000000007;
unsigned long N, K;
cin >> N >> K;
vector<unsigned int> dp(K + 1);
dp[0] = 1;
for (unsigned long i{0}, a; i < N; +... | #pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
int main() {
using namespace std;
constexpr unsigned int MOD = 1000000007;
unsigned long N, K;
cin >> N >> K;
vector<unsigned int> dp(K + 1);
dp[0] = 1;
for (unsigned long i{0}, a; i < N; ++... | replace | 0 | 1 | 0 | 1 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll mod = 1e9L + 7;
int n;
vector<int> inp;
vector<vector<ll>> dp;
ll candp(int k, int i = 0) {
// cout<<i<<" "<<j<<" "<<c<<" "<<sum<<'\n';
if (k == 0)
return 1;
if (i == n)
return 0;
if (dp[i][k] != -1)
return dp[i][k];
ll ... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll mod = 1e9L + 7;
int n;
vector<int> inp;
vector<vector<ll>> dp;
ll candp(int k, int i = 0) {
// cout<<i<<" "<<j<<" "<<c<<" "<<sum<<'\n';
if (k == 0)
return 1;
if (i == n)
return 0;
if (dp[i][k] != -1)
return dp[i][k];
ll ... | replace | 49 | 50 | 49 | 52 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define db long double
#define ull unsigned long long int
#define mp make_pair
#define F first
#define S second
#define pb push_back
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define all(a) a.begin(), a.end()
#define Nmax 1000005
#define INF 1000000000
#define MO... | #include <bits/stdc++.h>
#define ll long long int
#define db long double
#define ull unsigned long long int
#define mp make_pair
#define F first
#define S second
#define pb push_back
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define all(a) a.begin(), a.end()
#define Nmax 1000005
#define INF 1000000000
#define MO... | replace | 33 | 34 | 33 | 34 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define PI 3.14159265358979
#define EPS 1e-8
#define mod 1000000007
#define fi first
#define se second
#define mp make_pair
#define pb push_back
const ll INF = 1e18;
const int N = 1e5 + 50;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(N... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define PI 3.14159265358979
#define EPS 1e-8
#define mod 1000000007
#define fi first
#define se second
#define mp make_pair
#define pb push_back
const ll INF = 1e18;
const int N = 1e5 + 50;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(N... | replace | 46 | 47 | 46 | 53 | 0 | |
p03172 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e6;
int n;
vector<vector<int>> dp(n);
int query(int pos1, int l, int r) {
l += maxn;
r += maxn;
int res = 0;
while (l <= r) {
if (l % 2 == 1)
res += dp[pos1][l++];
if (r % 2 == 0)
r... | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 1e4;
int n;
vector<vector<int>> dp(n);
int query(int pos1, int l, int r) {
l += maxn;
r += maxn;
int res = 0;
while (l <= r) {
if (l % 2 == 1)
res += dp[pos1][l++];
if (r % 2 == 0)
... | replace | 4 | 5 | 4 | 5 | MLE | |
p03172 | C++ | Runtime Error | #include <iostream>
#include <stdio.h>
#define Re register int
#define mod int(1e9 + 7)
int N, K, A[105];
long long s[105], f[105][100005];
template <typename T> inline void read(T &var) {
T x = 0;
int w = 0;
char ch = 0;
while (!isdigit(ch))
w |= ch == '-', ch = getchar();
while (isdigit(ch))
x = (... | #include <iostream>
#include <stdio.h>
#define Re register int
#define mod int(1e9 + 7)
int N, K, A[105];
long long s[100005], f[105][100005];
template <typename T> inline void read(T &var) {
T x = 0;
int w = 0;
char ch = 0;
while (!isdigit(ch))
w |= ch == '-', ch = getchar();
while (isdigit(ch))
x ... | replace | 6 | 7 | 6 | 7 | 0 | |
p03172 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
template <int64_t MOD> struct Mint {
int64_t v;
Mint() { v = 0; }
Mint(int64_t x) {
v = x % MOD;
if (v < 0)
v += MOD;
}
Mint operator-() { return Mint{-v}; };
Mint operator+(Mint x) { return Mint(v + x.v); };
Mint op... | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
template <int64_t MOD> struct Mint {
int64_t v;
Mint() { v = 0; }
Mint(int64_t x) {
v = x % MOD;
if (v < 0)
v += MOD;
}
Mint operator-() { return Mint{-v}; };
Mint operator+(Mint x) { return Mint(v + x.v); };
Mint op... | insert | 124 | 124 | 124 | 125 | TLE | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, i, j, k;
cin >> n >> k;
ll a[n + 3];
for (i = 1; i <= n; i++)
cin >> a[i];
a[0] = 0;
sort(a, a + n + 1);
vector<vector<ll>> dp(k + 2, vector<ll>(n + 2, 1));
ll ans = 1;
ll mod = 1000000007;
for (i = 1; i <= k... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, i, j, k;
cin >> n >> k;
ll a[n + 3];
for (i = 1; i <= n; i++)
cin >> a[i];
a[0] = 0;
sort(a, a + n + 1);
vector<vector<ll>> dp(k + 2, vector<ll>(n + 2, 1));
ll ans = 1;
ll mod = 1000000007;
for (i = 1; i <= k... | replace | 29 | 30 | 29 | 30 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> vec;
typedef vector<vec> mat;
ll dp[101][100001];
ll mod = 1e9 + 7;
int main() {
int n, k, A[200001];
cin >> n >> k;
rep(i,... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> vec;
typedef vector<vec> mat;
ll dp[101][100001];
ll mod = 1e9 + 7;
int main() {
int n, k, A[200001];
cin >> n >> k;
rep(i,... | replace | 18 | 20 | 18 | 23 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.t... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.t... | replace | 48 | 49 | 48 | 49 | 0 | |
p03172 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define INF (1ll << 60)
long long M = 1000000007;
vector<vector<long long>> dp;
vector... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define INF (1ll << 60)
long long M = 1000000007;
vector<vector<long long>> dp;
vector... | replace | 32 | 36 | 32 | 41 | TLE | |
p03172 | C++ | Runtime Error | #include <iostream>
using namespace std;
const int mod = 1000000007;
int N, K;
int a[110];
int dp[110][100010];
int main() {
cin >> N >> K;
for (int i = 0; i < N; i++)
cin >> a[i];
dp[0][0] = 1;
for (int i = 0; i < N; i++) {
// 累積和を取る
int sum[100010];
sum[0] = 0;
for (int j = 0; j <= K;... | #include <iostream>
using namespace std;
const int mod = 1000000007;
int N, K;
int a[110];
int dp[110][100010];
int main() {
cin >> N >> K;
for (int i = 0; i < N; i++)
cin >> a[i];
dp[0][0] = 1;
for (int i = 0; i < N; i++) {
// 累積和を取る
int sum[100010];
sum[0] = 0;
for (int j = 0; j <= K;... | replace | 21 | 22 | 21 | 22 | -11 | |
p03172 | C++ | Runtime Error | /**
🍪 the_hyp0cr1t3
🍪 31.08.2020 16:36:44
**/
#ifdef W
#include "k_II.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define aylmao cin.tie(nullptr)->sync_with_stdio(false);
#endif
#define endl '\n'
#define pb emplace_back
// #define int int64_t
#define sz(x) (int)((x).size())
#define all(x) x.begin(), x.en... | /**
🍪 the_hyp0cr1t3
🍪 31.08.2020 16:36:44
**/
#ifdef W
#include "k_II.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define aylmao cin.tie(nullptr)->sync_with_stdio(false);
#endif
#define endl '\n'
#define pb emplace_back
// #define int int64_t
#define sz(x) (int)((x).size())
#define all(x) x.begin(), x.en... | replace | 111 | 112 | 111 | 112 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct Benri {
Benri() {
std::cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(12);
}
} benri;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<long long>;
using vvll... | #include <bits/stdc++.h>
using namespace std;
struct Benri {
Benri() {
std::cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(12);
}
} benri;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<long long>;
using vvll... | replace | 52 | 53 | 52 | 53 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 1e9 + 7
template <typename T> void printVector(const vector<T> &vec) {
for (const T x : vec) {
cout << x << " ";
}
cout << endl;
}
template <typename T> void printMatrix(const vector<vector<T>> &mat) {
for (const vector<T> vec... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 1e9 + 7
template <typename T> void printVector(const vector<T> &vec) {
for (const T x : vec) {
cout << x << " ";
}
cout << endl;
}
template <typename T> void printMatrix(const vector<vector<T>> &mat) {
for (const vector<T> vec... | replace | 65 | 68 | 65 | 70 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define forn(i, n) for (ll i = 0; i < n; i++)
#define fore(i, a, b) for (ll i = a; i <= b; i++)
#define ford(i, n) for (ll i = n - 1; i >= 0; i--)
#define fi first
#define se second
#defi... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define forn(i, n) for (ll i = 0; i < n; i++)
#define fore(i, a, b) for (ll i = a; i <= b; i++)
#define ford(i, n) for (ll i = n - 1; i >= 0; i--)
#define fi first
#define se second
#defi... | replace | 51 | 54 | 51 | 56 | 0 | |
p03172 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
static const int kModulo = 1000 * 1000 * 1000 + 7;
int main() {
ios::sync_with_stdio(false);
int N, K;
cin >> N >> K;
vector<int> ways(K + 1, 0);
ways[0] = 1;
for (int i = 0; i < N; ++i) {
int a;
cin >> a;
vector<int> partial(N + 1... | #include <iostream>
#include <vector>
using namespace std;
static const int kModulo = 1000 * 1000 * 1000 + 7;
int main() {
ios::sync_with_stdio(false);
int N, K;
cin >> N >> K;
vector<int> ways(K + 1, 0);
ways[0] = 1;
for (int i = 0; i < N; ++i) {
int a;
cin >> a;
vector<int> partial(K + 1... | replace | 19 | 20 | 19 | 20 | 0 | |
p03172 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define ... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define ... | replace | 105 | 106 | 105 | 106 | -11 | |
p03172 | 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 | 40 | 41 | 40 | 41 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define DUMP(x) std::cerr << (#x) << " = " << (x) << "\n"
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define EREP(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define RREP(i, a, b) for (int i = (int)(a)-1; i >= (int)(b); --i)
#define rep(i, n) R... | #include <bits/stdc++.h>
using namespace std;
#define DUMP(x) std::cerr << (#x) << " = " << (x) << "\n"
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define EREP(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define RREP(i, a, b) for (int i = (int)(a)-1; i >= (int)(b); --i)
#define rep(i, n) R... | replace | 188 | 189 | 188 | 189 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
ll n, m, t, k, a[105];
#define ari \
for (int i = 0; i < n; i++) \
cin >> a[i];
#define ginp ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
ll n, m, t, k, a[105];
#define ari \
for (int i = 0; i < n; i++) \
cin >> a[i];
#define ginp ... | replace | 52 | 55 | 52 | 57 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define LL long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pil pair<int, ll>
#define pli pair<ll, int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define vll vector<pll>
#define vil vector<pil>
#define vl... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define LL long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pil pair<int, ll>
#define pli pair<ll, int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define vll vector<pll>
#define vil vector<pil>
#define vl... | replace | 108 | 111 | 108 | 113 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int n, k, i, lim;
int dp[100001];
int pre[100001];
int main() {
scanf("%d%d", &n, &k);
fill(pre, pre + k + 1, 1);
while (n--) {
scanf("%d", &lim);
for (i = 0; i <= k; i++) {
dp[i] = pre[i];
if (i - lim - 1 >= 0) {
... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int n, k, i, lim;
int dp[100001];
int pre[100001];
int main() {
scanf("%d%d", &n, &k);
fill(pre, pre + k + 1, 1);
while (n--) {
scanf("%d", &lim);
for (i = 0; i <= k; i++) {
dp[i] = pre[i];
if (i - lim - 1 >= 0) {
... | replace | 16 | 17 | 16 | 17 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
// const ll mod=998244353;
const ll inf = 1LL << 61;
int main() {
ll n, k;
cin >> n >> k;
vec a(n);
for (ll i = 0; i < n; i++)
cin >> a[i];
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
// const ll mod=998244353;
const ll inf = 1LL << 61;
int main() {
ll n, k;
cin >> n >> k;
vec a(n);
for (ll i = 0; i < n; i++)
cin >> a[i];
... | replace | 19 | 20 | 19 | 20 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define pll pair<ll, ll>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define pll pair<ll, ll>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i... | replace | 39 | 40 | 39 | 40 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | replace | 67 | 68 | 67 | 68 | 0 | |
p03172 | C++ | Runtime Error | // Program.cpp
// Author : Aaryan Srivastava
#include <bits/stdc++.h>
#include <chrono>
#include <random>
#define pb push_back
#define popb pop_back
#define ull unsigned long long
#define beg begin
#define mp make_pair
#define pii pair<int, int>
#define piii pair<pii, int>
#define rep(i, n) for (int(i) = 0; i < (n); i+... | // Program.cpp
// Author : Aaryan Srivastava
#include <bits/stdc++.h>
#include <chrono>
#include <random>
#define pb push_back
#define popb pop_back
#define ull unsigned long long
#define beg begin
#define mp make_pair
#define pii pair<int, int>
#define piii pair<pii, int>
#define rep(i, n) for (int(i) = 0; i < (n); i+... | replace | 44 | 45 | 44 | 45 | -11 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<long long> dp(k + 1);
dp[0] = 1;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
vector<long long> dp2(k + 1);
for (int j = k - 1; j >... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<long long> dp(k + 1);
dp[0] = 1;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
vector<long long> dp2(k + 1);
for (int j = k - 1; j >... | replace | 21 | 25 | 21 | 22 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MODYYQ = 1e9 + 7;
int n, k, a[105], dp[100][100005];
int main() {
cin >> n >> k;
for (int i = 1; i <= n; i++)
cin >> a[i];
dp[0][0] = 1;
for (int i = 1; i <= n; i++) {
int sum = 0;
for (int j = 0; j <= k; j++) {
sum += dp[i - 1][j];
... | #include <bits/stdc++.h>
using namespace std;
const int MODYYQ = 1e9 + 7;
int n, k, a[105], dp[105][100005];
int main() {
cin >> n >> k;
for (int i = 1; i <= n; i++)
cin >> a[i];
dp[0][0] = 1;
for (int i = 1; i <= n; i++) {
int sum = 0;
for (int j = 0; j <= k; j++) {
sum += dp[i - 1][j];
... | replace | 3 | 4 | 3 | 4 | 0 | |
p03172 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define FAST_IO \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
usi... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define FAST_IO \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
usi... | delete | 32 | 36 | 32 | 32 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int MAXN = 1e2 + 10, MD = 1e9 + 7;
int n, k, a[MAXN];
ll dp[MAXN][MAXN << 2];
int main() {
ios::sync_with_stdio(0), cin.tie(0);
cout.tie(0);
cin >> n >> k;
for (int i = 1; i <= n; ++i)
cin >> a[i];
dp[0][0] = 1;
for (int i = 1... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int MAXN = 1e5 + 10, MD = 1e9 + 7;
int n, k, a[110];
ll dp[110][MAXN];
int main() {
ios::sync_with_stdio(0), cin.tie(0);
cout.tie(0);
cin >> n >> k;
for (int i = 1; i <= n; ++i)
cin >> a[i];
dp[0][0] = 1;
for (int i = 1; i <= ... | replace | 5 | 8 | 5 | 8 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
#ifdef __LOCAL
#define DBG(X) cout << #X << " = " << (X) << endl;
#define SAY(X) cout << (X) << endl;
#else
#define DBG(X)
#define SAY(X)
#endif
#ifdef __LOCAL
#include <filesystem>
namespace fs = std::filesystem;
#endif
using namespace std;
using ll = long long int;
using ull = unsigned lon... | #include <bits/stdc++.h>
#ifdef __LOCAL
#define DBG(X) cout << #X << " = " << (X) << endl;
#define SAY(X) cout << (X) << endl;
#else
#define DBG(X)
#define SAY(X)
#endif
#ifdef __LOCAL
#include <filesystem>
namespace fs = std::filesystem;
#endif
using namespace std;
using ll = long long int;
using ull = unsigned lon... | replace | 154 | 155 | 154 | 155 | 0 | |
p03172 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <climits>
#include <iostream>
#include <map>
#include <math.h>
#include <stack>
#include <string.h>
#include <unordered_map>
#include <vector>
using namespace std;
const int INF = 1e9;
#define ll long long
#define int ll
#define fast ... | #include <algorithm>
#include <bits/stdc++.h>
#include <climits>
#include <iostream>
#include <map>
#include <math.h>
#include <stack>
#include <string.h>
#include <unordered_map>
#include <vector>
using namespace std;
const int INF = 1e9;
#define ll long long
#define int ll
#define fast ... | replace | 98 | 99 | 98 | 99 | 0 | |
p03172 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <deque>
#include <iostream>
#include <map>
#include <vector>
static const int IINF = 1 << 30;
static const long long LINF = 1LL << 60;
static const long long MOD = 1.0e+9 + 7;
template <typename T> std::vector<T> vectors(std::size_t n, T val) {
return std::vector<T>(... | #include <algorithm>
#include <cassert>
#include <deque>
#include <iostream>
#include <map>
#include <vector>
static const int IINF = 1 << 30;
static const long long LINF = 1LL << 60;
static const long long MOD = 1.0e+9 + 7;
template <typename T> std::vector<T> vectors(std::size_t n, T val) {
return std::vector<T>(... | replace | 28 | 29 | 28 | 33 | 0 | |
p03172 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long int
#define hell 1000000007
#define vi vector<ll>
#define pb push_back
#define pii pair<ll, ll>
#define vii vector<pii>
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define sep(i, a, b) for (ll i = a - 1; i >= b; i--)
#define inf (ll)(1e16)
using namespace std;
ll hel... | #include <bits/stdc++.h>
#define ll long long int
#define hell 1000000007
#define vi vector<ll>
#define pb push_back
#define pii pair<ll, ll>
#define vii vector<pii>
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define sep(i, a, b) for (ll i = a - 1; i >= b; i--)
#define inf (ll)(1e16)
using namespace std;
ll hel... | replace | 36 | 38 | 36 | 57 | TLE | |
p03172 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return... | replace | 85 | 86 | 85 | 86 | TLE | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define endl "\n"
#define si set<int>
#define vi vector<int>
#define pii pair<int, int>
#define vpii vector<pii>
#define mii map<int, int>
#define... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define endl "\n"
#define si set<int>
#define vi vector<int>
#define pii pair<int, int>
#define vpii vector<pii>
#define mii map<int, int>
#define... | delete | 96 | 100 | 96 | 96 | TLE | |
p03172 | C++ | Time Limit Exceeded | # 1 "m.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "m.cpp"
# 1 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp" 1
# 12 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp"
# 1 "/home/tysm/dev/cpplib/bin/../stdlib/bits/stdc++.h" 1
#include <bits/stdc++.h>
# 13 "/home/tysm/dev/cpplib/bin/../include/cpplib... | # 1 "m.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "m.cpp"
# 1 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp" 1
# 12 "/home/tysm/dev/cpplib/bin/../include/cpplib/stdinc.hpp"
# 1 "/home/tysm/dev/cpplib/bin/../stdlib/bits/stdc++.h" 1
#include <bits/stdc++.h>
# 13 "/home/tysm/dev/cpplib/bin/../include/cpplib... | replace | 662 | 666 | 662 | 673 | TLE | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7, arr[105], pre[105], sum[105], dp[105][100005];
ll solve(ll n, ll k) {
dp[0][0] = 1;
for (int i = 1; i <= k; ++i)
dp[0][i] = 0;
for (int i = 1; i <= n; ++i) {
sum[0] = dp[i - 1][0];
for (int j = 1; j <= k; ++j)
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7, arr[105], pre[105], sum[100005], dp[105][100005];
ll solve(ll n, ll k) {
dp[0][0] = 1;
for (int i = 1; i <= k; ++i)
dp[0][i] = 0;
for (int i = 1; i <= n; ++i) {
sum[0] = dp[i - 1][0];
for (int j = 1; j <= k; ++j)
... | replace | 3 | 4 | 3 | 4 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll MOD = 1e9 + 7;
ll A[110];
ll n, k;
ll B[110][101000];
int main() {
cin >> n >> k;
ll a;
for (ll j = 0; j <= k; j++) {
B[0][j] = 0;
}
B[0][0] = 1;
A[0] = 0;
for (ll i = 1; i <= n; i++) {
cin >> a;
for (ll j = 0; j <= k; j++) ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll MOD = 1e9 + 7;
ll A[101000];
ll n, k;
ll B[110][101000];
int main() {
cin >> n >> k;
ll a;
for (ll j = 0; j <= k; j++) {
B[0][j] = 0;
}
B[0][0] = 1;
A[0] = 0;
for (ll i = 1; i <= n; i++) {
cin >> a;
for (ll j = 0; j <= k; j+... | replace | 4 | 5 | 4 | 5 | 0 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int mod = 1e9 + 7;
int a[110];
long long dp[110][N];
long long ps[110][N];
int main() {
int n, k;
cin >> n >> k;
for (int i = 1; i <= n; i++)
cin >> a[i];
dp[0][0] = 1;
for (int i = 1; i <= n; i++)
for (int j = 0; j <= k; j++)... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int mod = 1e9 + 7;
int a[110];
long long dp[110][N];
long long ps[110][N];
int main() {
int n, k;
cin >> n >> k;
for (int i = 1; i <= n; i++)
cin >> a[i];
dp[0][0] = 1;
for (int i = 1; i <= n; i++)
for (int j = 0; j <= k; j++)... | replace | 19 | 20 | 19 | 21 | -11 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 7;
signed main() {
int N, K;
cin >> N >> K;
vector<int> A(N);
for (int i = 0; i < N; i++)
cin >> A[i];
int dp[N + 1][K + 1];
for (int i = 0; i < N + 1; i++) {
for (int j = 0; j < K + 1; j++) {
dp[i][j]... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 7;
signed main() {
int N, K;
cin >> N >> K;
vector<int> A(N);
for (int i = 0; i < N; i++)
cin >> A[i];
int dp[N + 1][K + 1];
for (int i = 0; i < N + 1; i++) {
for (int j = 0; j < K + 1; j++) {
dp[i][j]... | replace | 27 | 28 | 27 | 28 | -11 | |
p03172 | Python | Time Limit Exceeded | N, K = map(int, input().split())
A = list(map(int, input().split()))
MOD = 10**9 + 7
dp = [0] * (K + 1)
dp[0] = 1
for i, a in enumerate(A, start=1):
accDp = [0] * (K + 2)
for k in range(1, K + 2):
accDp[k] = accDp[k - 1] + dp[k - 1]
for k in range(K + 1):
dp[k] += accDp[k] - accDp[max(0, ... | N, K = map(int, input().split())
A = list(map(int, input().split()))
MOD = 10**9 + 7
dp = [0] * (K + 1)
dp[0] = 1
for i, a in enumerate(A, start=1):
accDp = [0] * (K + 2)
for k in range(1, K + 2):
accDp[k] = accDp[k - 1] + dp[k - 1]
for k in range(K + 1):
dp[k] = (dp[k] + accDp[k] - accDp... | replace | 13 | 14 | 13 | 14 | TLE | |
p03172 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int mod = 1e9 + 7;
int N, K;
cin >> N >> K;
vector<int> a(N);
for (int i = 0; i < N; i++)
cin >> a[i];
vector<vector<long long>> dp(N, vector<long long>(K + 1, 0));
for (int i = 0; i < N; i++) {
for (int j = 0; j < K + 1; j++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int mod = 1e9 + 7;
int N, K;
cin >> N >> K;
vector<int> a(N);
for (int i = 0; i < N; i++)
cin >> a[i];
vector<vector<long long>> dp(N, vector<long long>(K + 1, 0));
for (int i = 0; i < N; i++) {
for (int j = 0; j < K + 1; j++) {
... | replace | 32 | 35 | 32 | 34 | TLE | |
p03172 | C++ | Runtime Error | // Created by Kira
#include <bits/stdc++.h>
using namespace std;
#define IOS \
cin.sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | // Created by Kira
#include <bits/stdc++.h>
using namespace std;
#define IOS \
cin.sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | replace | 55 | 58 | 55 | 60 | 0 | |
p03172 | C++ | Runtime Error | #pragma GCC optimize("-O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace std;
#define all(c) (c).begin(), (c).end()
#de... | #pragma GCC optimize("-O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
using namespace std;
#define all(c) (c).begin(), (c).end()
#de... | replace | 54 | 57 | 54 | 55 | -11 | |
p03172 | C++ | Runtime Error | /*
@author: Charan Sai
*/
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | /*
@author: Charan Sai
*/
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | replace | 112 | 114 | 112 | 114 | -11 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define m_p make_pair
#define rep(i, a, b) for (int i = a; i < b; i++)
#define sz(x) (int)x.size()
#define f first
#define debug cout << "##########3" << endl
#define mod 1000000007
#define ll long long int
#define lMax LLONG_MAX
// queue<int> , prefix_... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define m_p make_pair
#define rep(i, a, b) for (int i = a; i < b; i++)
#define sz(x) (int)x.size()
#define f first
#define debug cout << "##########3" << endl
#define mod 1000000007
#define ll long long int
#define lMax LLONG_MAX
// queue<int> , prefix_... | replace | 34 | 47 | 34 | 40 | -11 | |
p03172 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
typedef long long ll;
void normal(ll &a) {
a %= MOD;
(a < 0) && (a += MOD);
}
ll modMul(ll a, ll b) {
a %= MOD, b %= MOD;
normal(a), normal(b);
return (a * b) % MOD;
}
ll modAdd(ll a, ll b) {
a %= MOD, b %= MOD;
normal(a), normal(b);
... | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
typedef long long ll;
void normal(ll &a) {
a %= MOD;
(a < 0) && (a += MOD);
}
ll modMul(ll a, ll b) {
a %= MOD, b %= MOD;
normal(a), normal(b);
return (a * b) % MOD;
}
ll modAdd(ll a, ll b) {
a %= MOD, b %= MOD;
normal(a), normal(b);
... | replace | 68 | 69 | 68 | 70 | 0 | |
p03172 | C++ | Runtime Error | #include <algorithm> //swap function is here
#include <bits/stdc++.h>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream> // istringstream buffer(myString);
#include <stack>
#include <vec... | #include <algorithm> //swap function is here
#include <bits/stdc++.h>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream> // istringstream buffer(myString);
#include <stack>
#include <vec... | delete | 128 | 134 | 128 | 128 | -11 | |
p03173 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#include <unordered_map>
#define inputarr(a, n) \
for (ll i = 0; i < n; i++) \
cin >> a[i];
#define prllarr(a, n) ... | #include <bits/stdc++.h>
using namespace std;
#include <unordered_map>
#define inputarr(a, n) \
for (ll i = 0; i < n; i++) \
cin >> a[i];
#define prllarr(a, n) ... | replace | 69 | 73 | 69 | 73 | TLE | |
p03173 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long INF = 1LL << 60;
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long INF = 1LL << 60;
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;... | insert | 42 | 42 | 42 | 43 | TLE | |
p03173 | C++ | Runtime Error | /*------U Have To DO It------*/
/* BY-> RicoProg */
/* ___
__|__|
| |___ */
#include <bits/stdc++.h>
using namespace std;
//---------------------------------------------------MACROS----------------------------------------------------------
#define ll long long
#define ld long double
... | /*------U Have To DO It------*/
/* BY-> RicoProg */
/* ___
__|__|
| |___ */
#include <bits/stdc++.h>
using namespace std;
//---------------------------------------------------MACROS----------------------------------------------------------
#define ll long long
#define ld long double
... | replace | 74 | 75 | 74 | 75 | 0 | |
p03173 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
typedef pair<double, double> pdd;
#define MEM(a, b) memset(a, (b), sizeof(a))
#define SZ(i) ll(i.size())
#define FOR(i, j, k, in) for (ll i = j; i < k; i += in)
#define RFOR(i, j, k, in) for (ll i = j; i >= k; i -= in)
#define... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
typedef pair<double, double> pdd;
#define MEM(a, b) memset(a, (b), sizeof(a))
#define SZ(i) ll(i.size())
#define FOR(i, j, k, in) for (ll i = j; i < k; i += in)
#define RFOR(i, j, k, in) for (ll i = j; i >= k; i -= in)
#define... | replace | 94 | 95 | 94 | 95 | 0 | |
p03173 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e2 + 5;
const int MAXNN = 1e5 + 5;
const long long INF = 1e18 + 7;
#define ll long long
#define pb push_back
#define fast_io \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 4e2 + 5;
const long long INF = 1e18 + 7;
#define ll long long
#define pb push_back
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(N... | replace | 3 | 5 | 3 | 4 | 0 | |
p03173 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(a) (a).begin(), (a).end()
#define forn(i, a, b) for (int i = a; i <= b; i++)
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define rc(s) return cout << s, 0
#define rcc(s) cout << s, exit(0)
#define er erase
#... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(a) (a).begin(), (a).end()
#define forn(i, a, b) for (int i = a; i <= b; i++)
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define rc(s) return cout << s, 0
#define rcc(s) cout << s, exit(0)
#define er erase
#... | insert | 52 | 52 | 52 | 54 | 0 | |
p03173 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define oo 666666666
#define ll long long
#define ld long double
int n;
ll DP[303][303];
ll pf[303];
ll A[303];
ll solve(int l, int r) {
if (l >= r)
return 0;
if (l + 1 == r)
return A[l] + A[r];
if (DP[l][r] != 0)
return DP[l][r];
DP[l][r] = LLONG_MAX... | #include <bits/stdc++.h>
using namespace std;
#define oo 666666666
#define ll long long
#define ld long double
int n;
ll DP[404][404];
ll pf[404];
ll A[404];
ll solve(int l, int r) {
if (l >= r)
return 0;
if (l + 1 == r)
return A[l] + A[r];
if (DP[l][r] != 0)
return DP[l][r];
DP[l][r] = LLONG_MAX... | replace | 7 | 10 | 7 | 10 | 0 | |
p03173 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
using namespace std;
const long long oo = 1e16;
long long a[500];
long long s[500];
long long f[500][500];
bool c[500][500];
int n;
void inp() {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
s[i] = s[i - 1] + a[i];
}
}
long long tryyy(int l, int r) {
if (... | #include <cstdio>
#include <iostream>
using namespace std;
const long long oo = 1e16;
long long a[500];
long long s[500];
long long f[500][500];
bool c[500][500];
int n;
void inp() {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
s[i] = s[i - 1] + a[i];
}
}
long long tryyy(int l, int r) {
if (... | insert | 25 | 25 | 25 | 26 | TLE | |
p03173 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
// co... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
// co... | replace | 51 | 52 | 51 | 52 | 0 | |
p03173 | C++ | Runtime Error | #include <iostream>
using namespace std;
long long b[401][401];
long long suma[401];
int a[401];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
suma[0] = a[0];
for (int i = 1; i < n; i++) {
suma[i] = suma[i - 1] + a[i];
}
for (int i = 0; i < n; i++)
for (int j = 0; j ... | #include <iostream>
using namespace std;
long long b[401][401];
long long suma[401];
int a[401];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
suma[0] = a[0];
for (int i = 1; i < n; i++) {
suma[i] = suma[i - 1] + a[i];
}
for (int i = 0; i < n; i++)
for (int j = 0; j ... | replace | 17 | 18 | 17 | 18 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.