Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p03171
#include <bits/stdc++.h> using namespace std; string s; long long dp[3000][3000][2]; long long a[3001]; long long solve(long long st, long long en, long long t) { // cout<<st<<" "<<en<<" "<<t<<endl; if (st == en) { if (t) { dp[st][st][1] = a[st]; return a[st]; } else { dp[st][st][...
#include <bits/stdc++.h> using namespace std; string s; long long dp[3000][3000][2]; long long a[3001]; long long solve(long long st, long long en, long long t) { // cout<<st<<" "<<en<<" "<<t<<endl; if (st == en) { if (t) { dp[st][st][1] = a[st]; return a[st]; } else { dp[st][st][...
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change" ]
979,455
979,456
u022311705
cpp
p03171
// zukonit14 - Kunal Raut #include <bits/stdc++.h> using namespace std; /*/-----------------------------DEFINES----------------------------------/*/ #define ll long long #define ld long double #define pb push_back #define mp make_pair #define fi first #define se second #define mod1 1000000007 #define pi 3.141592653...
// zukonit14 - Kunal Raut #include <bits/stdc++.h> using namespace std; /*/-----------------------------DEFINES----------------------------------/*/ #define ll long long #define ld long double #define pb push_back #define mp make_pair #define fi first #define se second #define mod1 1000000007 #define pi 3.141592653...
[ "call.arguments.change" ]
979,457
979,458
u104653385
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n; cin >> n; vector<int> A(n), pre(n); for (int i = 0; i < n; i++) cin >> A[i]; for (int i = 0; i < n; i++) pre[i] = (i == 0 ? A[i] : pre[i - 1] + A[i]); int sum = 0; for (int x : A) sum += x; vector<vector...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n; cin >> n; vector<ll> A(n), pre(n); for (int i = 0; i < n; i++) cin >> A[i]; for (int i = 0; i < n; i++) pre[i] = (i == 0 ? A[i] : pre[i - 1] + A[i]); ll sum = 0; for (int x : A) sum += x; vector<vector<l...
[ "variable_declaration.type.change", "call.arguments.change" ]
979,463
979,464
u155258214
cpp
p03171
/// problem link: http://lightoj.com/volume_showproblem.php?problem=1031 /// topic: dp #include <bits/stdc++.h> using namespace std; #define INF 1 << 30 #define endl '\n' #define maxn 100005 #define tc printf("Case %d: ", cs) #define tcn printf("Case %d:\n", cs); #define FASTIO ios_base::sync_with_stdio(false), cin.tie...
/// problem link: http://lightoj.com/volume_showproblem.php?problem=1031 /// topic: dp #include <bits/stdc++.h> using namespace std; #define INF 1 << 30 #define endl '\n' #define maxn 100005 #define tc printf("Case %d: ", cs) #define tcn printf("Case %d:\n", cs); #define FASTIO ios_base::sync_with_stdio(false), cin.tie...
[ "variable_declaration.value.change", "identifier.replace.remove", "literal.replace.add" ]
979,465
979,466
u802237789
cpp
p03171
#pragma region #include <algorithm> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> typedef long long ll; #define rep(i, a, n) for (long long i = a; i <= n; ++i) #define per(i, a, n) for (long long i = n; i >= a; --i) #define...
#pragma region #include <algorithm> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> typedef long long ll; #define rep(i, a, n) for (long long i = a; i <= n; ++i) #define per(i, a, n) for (long long i = n; i >= a; --i) #define...
[ "assignment.variable.change", "identifier.change", "call.function.change" ]
979,477
979,478
u035226457
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long long long int dp[3001][3001]; vector<ll> v; int solve(int i, int j) { if (dp[i][j] != -1) { return dp[i][j]; } if (i > j) { return 0; } if (i == j) { return v[i]; } if (j == i + 1) { return max(v[i], v[j]); } long...
#include <bits/stdc++.h> using namespace std; #define ll long long long long int dp[3001][3001]; vector<ll> v; ll solve(int i, int j) { if (dp[i][j] != -1) { return dp[i][j]; } if (i > j) { return 0; } if (i == j) { return v[i]; } if (j == i + 1) { return max(v[i], v[j]); } long ...
[]
979,479
979,480
u348267046
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mp make_pair #define pb push_back #define F first #define S second #define mod 1000000007 #define dbg(n) cout << #n << ' ' << n << endl; ll dp[101][101]; ll solve(int i, int j, ll a[]) { if (i == j) return dp[i][j] = a[i]; else if (j...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mp make_pair #define pb push_back #define F first #define S second #define mod 1000000007 #define dbg(n) cout << #n << ' ' << n << endl; ll dp[3001][3001]; ll solve(int i, int j, ll a[]) { if (i == j) return dp[i][j] = a[i]; else if ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "assignment.value.change" ]
979,485
979,484
u486906248
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mp make_pair #define pb push_back #define F first #define S second #define mod 1000000007 #define dbg(n) cout << #n << ' ' << n << endl; ll dp[101][101]; ll solve(int i, int j, ll a[]) { if (i == j) return dp[i][j] = a[i]; else if (j...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mp make_pair #define pb push_back #define F first #define S second #define mod 1000000007 #define dbg(n) cout << #n << ' ' << n << endl; ll dp[3001][3001]; ll solve(int i, int j, ll a[]) { if (i == j) return dp[i][j] = a[i]; else if ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.branch.if.condition.change" ]
979,485
979,488
u486906248
cpp
p03171
///...................................*****................................................./// /// Mujahidul Islam ( mujahidulislam2923@gmail.com ) /// /// Department of Ict /// Comilla University , Bangladesh. /// ///...................................*****..............................
///...................................*****................................................./// /// Mujahidul Islam ( mujahidulislam2923@gmail.com ) /// /// Department of Ict /// Comilla University , Bangladesh. /// ///...................................*****..............................
[ "assignment.change" ]
979,491
979,492
u191752096
cpp
p03171
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <stack> #include <vector> #define int long long using namespace std; int32_t main() { int N; cin >> N; vector<int> arr(N); for (int &e : arr) cin >> e; vector<vector<int>> dp(N + 1, vector<int>(N + 1)); for (int l...
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <stack> #include <vector> #define int long long using namespace std; int32_t main() { int N; cin >> N; vector<int> arr(N); for (int &e : arr) cin >> e; vector<vector<int>> dp(N + 1, vector<int>(N + 1)); for (int l...
[ "assignment.change" ]
979,495
979,496
u869736844
cpp
p03171
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <stack> #include <vector> #define int long long using namespace std; int32_t main() { int N; cin >> N; vector<int> arr(N); for (int &e : arr) cin >> e; vector<vector<int>> dp(N, vector<int>(N + 1)); for (int len =...
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <stack> #include <vector> #define int long long using namespace std; int32_t main() { int N; cin >> N; vector<int> arr(N); for (int &e : arr) cin >> e; vector<vector<int>> dp(N + 1, vector<int>(N + 1)); for (int l...
[ "assignment.change" ]
979,497
979,496
u869736844
cpp
p03171
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <stack> #include <vector> #define int long long using namespace std; int32_t main() { int N; cin >> N; vector<int> arr(N); for (int &e : arr) cin >> e; vector<vector<int>> dp(N, vector<int>(N + 1)); for (int len =...
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <stack> #include <vector> #define int long long using namespace std; int32_t main() { int N; cin >> N; vector<int> arr(N); for (int &e : arr) cin >> e; vector<vector<int>> dp(N + 1, vector<int>(N + 1)); for (int l...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "assignment.change" ]
979,498
979,496
u869736844
cpp
p03171
#include <bits/stdc++.h> using namespace std; const int MAX = 3005; int64_t dp[MAX][MAX]; vector<int> vals(MAX, 0); int main() { int n; cin >> n; for (int i = 0; i < n; i++) cin >> vals[i]; for (int L = n - 1; L >= 0; L--) { for (int R = L; R < n; R++) { if (L == R) { dp[L][R] = max(v...
#include <bits/stdc++.h> using namespace std; const int MAX = 3005; int64_t dp[MAX][MAX]; vector<int> vals(MAX, 0); int main() { int n; cin >> n; for (int i = 0; i < n; i++) cin >> vals[i]; for (int L = n - 1; L >= 0; L--) { for (int R = L; R < n; R++) { if (L != R) { dp[L][R] = max(v...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
979,499
979,500
u479813076
cpp
p03171
#include <algorithm> #include <cmath> #include <cstdio> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <unordered_map> #include <vector> #define fast ios_base::sync_with_stdio(fals...
#include <algorithm> #include <cmath> #include <cstdio> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <unordered_map> #include <vector> #define fast ios_base::sync_with_stdio(false...
[ "expression.operation.binary.remove" ]
979,503
979,504
u163525690
cpp
p03171
#include <stdio.h> long long int max(long long int a, long long int b) { if (a > b) return a; return b; } long long int min(long long int a, long long int b) { if (a < b) return a; return b; } long long int dp[3002][3002]; long long int D(long long int d[], int l, int r) { if (dp[l][r] > 0) retu...
#include <stdio.h> long long int max(long long int a, long long int b) { if (a > b) return a; return b; } long long int min(long long int a, long long int b) { if (a < b) return a; return b; } long long int dp[3002][3002]; long long int D(long long int d[], int l, int r) { if (dp[l][r] > 0) retu...
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
979,514
979,515
u681396939
cpp
p03171
// Harjot Singh Student NIT JALANDHAR #include <bits/stdc++.h> using namespace std; #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
// Harjot Singh Student NIT JALANDHAR #include <bits/stdc++.h> using namespace std; #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "variable_declaration.type.change" ]
979,518
979,519
u487912105
cpp
p03171
#include <bits/stdc++.h> #include <iomanip> #include <math.h> #include <queue> #include <string> #include <vector> using namespace std; using Graph = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < n; i++) #define rep_1 (i, j, n) for (int i = j; i < n; i++) typedef long long ll; typedef long l; const ll l_IN...
#include <bits/stdc++.h> #include <iomanip> #include <math.h> #include <queue> #include <string> #include <vector> using namespace std; using Graph = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < n; i++) #define rep_1 (i, j, n) for (int i = j; i < n; i++) typedef long long ll; typedef long l; const ll l_IN...
[ "variable_declaration.type.change" ]
979,520
979,521
u422725381
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vii = vector<vector<int>>; using Graph = vector<vector<int>>; const int INF = 1 << 30; const ll INFL = 1LL << 60; template <class T> inline bool ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vii = vector<vector<int>>; using Graph = vector<vector<int>>; const int INF = 1 << 30; const ll INFL = 1LL << 60; template <class T> inline bool ...
[ "expression.operation.binary.remove" ]
979,526
979,527
u919510700
cpp
p03171
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < (b); i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define all(x) (x).begin(), (x).end() using namespace std; using llong = long long; using P = pair<int, int>; const int inf = 1 << 20; const int mod = 1e9 + 7; bool flag[3005][3005]; llong dp[...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < (b); i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define all(x) (x).begin(), (x).end() using namespace std; using llong = long long; using P = pair<int, int>; const int inf = 1 << 20; const int mod = 1e9 + 7; bool flag[3005][3005]; llong dp[...
[]
979,528
979,529
u748577909
cpp
p03171
#include <bits/stdc++.h> using namespace std; int n; vector<int> arr(3025); int dp[3033][3033][2]; int solve(int i, int j, int turn) { if (i > j) return 0; if (dp[i][j][turn] != -1) return dp[i][j][turn]; if (turn == 1) return dp[i][j][turn] = max((arr[i] + solve(i + 1, j, 0)), ...
#include <bits/stdc++.h> using namespace std; #define int long long int n; vector<int> arr(3025); int dp[3033][3033][2]; int solve(int i, int j, int turn) { if (i > j) return 0; if (dp[i][j][turn] != -1) return dp[i][j][turn]; if (turn == 1) return dp[i][j][turn] = max((arr[i] + solve(i + 1, j, 0)),...
[ "variable_declaration.type.primitive.change" ]
979,530
979,531
u043140820
cpp
p03171
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define mod 1000000007 #define pb push_back #define mk make_pair #define precise(x) cout << fixed << setprecision(12) << x #define test cout << "#"; const ll INF = 1e18L + 5; ll ans[3001][3001][2]; ll solve(vector<ll> &v, ll s, ll e, ll turn) { if...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define mod 1000000007 #define pb push_back #define mk make_pair #define precise(x) cout << fixed << setprecision(12) << x #define test cout << "#"; const ll INF = 1e18L + 5; ll ans[3001][3001][2]; ll solve(vector<ll> &v, ll s, ll e, ll turn) { if...
[ "assignment.change" ]
979,532
979,533
u466535000
cpp
p03171
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int arr[a + 50], dp[a + 50][a + 50]; memset(dp, 0, sizeof(dp)); for (int i = 1; i <= a; i++) { cin >> arr[i]; dp[i][i] = arr[i]; } for (int i = 2; i <= a; i++) { for (int j = 1; j + i - 1 <= a; j++) { int l = j, ...
#include <bits/stdc++.h> using namespace std; typedef long long lli; int main() { int a; cin >> a; lli arr[a + 50], dp[a + 50][a + 50]; memset(dp, 0, sizeof(dp)); for (int i = 1; i <= a; i++) { cin >> arr[i]; dp[i][i] = arr[i]; } for (int i = 2; i <= a; i++) { for (int j = 1; j + i - 1 <= a; j...
[ "variable_declaration.type.change" ]
979,535
979,536
u073500051
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define f(i, x, y) for (int i = x; i < y; i++) #define ll long long #define mp make_pair #define F first #define S second #define N 100005 #define inf 1e9 + 1 int main() { int n; cin >> n; int a[n]; f(i, 0, n) cin >> a[i]; int dp[n][n]; f(i, 0, n) dp[i][i] = ...
#include <bits/stdc++.h> using namespace std; #define f(i, x, y) for (int i = x; i < y; i++) #define ll long long #define mp make_pair #define F first #define S second #define N 100005 #define inf 1e9 + 1 int main() { int n; cin >> n; int a[n]; f(i, 0, n) cin >> a[i]; ll dp[n][n]; f(i, 0, n) dp[i][i] = a...
[ "variable_declaration.type.change" ]
979,541
979,542
u440947888
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define int long long int int mod = INT_MAX; int memo[3005][3005]; int n; int top(int a[], int i, int j) { int &ans = memo[i][j]; if (i > j) return 0; if (ans != -1) return ans; int turn = (n - 1 - (j - i)) % 2; if (turn == 0) // player 1 turn { ans ...
#include <bits/stdc++.h> using namespace std; #define int long long int int mod = INT_MAX; int memo[3005][3005]; int n; int top(int a[], int i, int j) { int &ans = memo[i][j]; if (i > j) return 0; if (ans != -1) return ans; int turn = (n - 1 - (j - i)) % 2; if (turn == 0) // player 1 turn { ans ...
[ "expression.operation.binary.remove" ]
979,549
979,550
u362998653
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fi first #define se second #define pb push_back #define mod 1000000007 #define FIO \ ios_base::sync_with_stdio(false); \ cin.ti...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fi first #define se second #define pb push_back #define mod 1000000007 #define FIO \ ios_base::sync_with_stdio(false); \ cin.ti...
[ "variable_declaration.type.change" ]
979,551
979,552
u417639837
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fi first #define se second #define pb push_back #define mod 1000000007 #define FIO \ ios_base::sync_with_stdio(false); \ cin.ti...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fi first #define se second #define pb push_back #define mod 1000000007 #define FIO \ ios_base::sync_with_stdio(false); \ cin.ti...
[ "variable_declaration.type.change" ]
979,553
979,552
u417639837
cpp
p03171
#include <bits/stdc++.h> #define lli long long int #define endl "\n" #define forn(i, in, fin) for (int i = in; i < fin; i++) #define all(v) v.begin(), v.end() #define fastIO() \ ; ...
#include <bits/stdc++.h> #define lli long long int #define endl "\n" #define forn(i, in, fin) for (int i = in; i < fin; i++) #define all(v) v.begin(), v.end() #define fastIO() \ ; ...
[ "variable_declaration.type.change" ]
979,558
979,559
u987915219
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define faster \ cin.tie(0); \ ios_base::sync_with_stdio(0) #define ll long long int n, k; ll arr[3004]; // fun(i,j)=arr[i]+fun(i+1,j),arr[...
#include <bits/stdc++.h> using namespace std; #define faster \ cin.tie(0); \ ios_base::sync_with_stdio(0) #define ll long long int n, k; ll arr[3004]; // fun(i,j)=arr[i]+fun(i+1,j),arr[...
[ "expression.operation.binary.remove", "variable_declaration.type.change" ]
979,560
979,561
u829903680
cpp
p03171
#include <cstring> #include <iostream> using namespace std; /*long mem[3001][3001]; long rec(int a[], int n, int i, int j, int ch) { if(i==j) return ch?-a[i]:a[i]; if(mem[i][j]!=1e9+5) return mem[i][j]; long ans=0; long ans1=rec(a,n,i+1,j,!ch); long ans2=rec(a,n,i,j-1,!ch); if(ch==0) ans=max(a...
#include <cstring> #include <iostream> using namespace std; /*long mem[3001][3001]; long rec(int a[], int n, int i, int j, int ch) { if(i==j) return ch?-a[i]:a[i]; if(mem[i][j]!=1e9+5) return mem[i][j]; long ans=0; long ans1=rec(a,n,i+1,j,!ch); long ans2=rec(a,n,i,j-1,!ch); if(ch==0) ans=max(a...
[ "variable_declaration.type.primitive.change" ]
979,562
979,563
u933124026
cpp
p03171
#include "bits/stdc++.h" using namespace std; #define pb push_back #define eb emplace_back #define fi first #define se second #define FF first #define SS second #define pii pair<int, int> #define fr(i, a, b) for (int i = a; i <= b; i++) #define sz(x) (int)x.size() #define mp make_pair #define Mod 1000000007 typedef lon...
#include "bits/stdc++.h" using namespace std; #define pb push_back #define eb emplace_back #define fi first #define se second #define FF first #define SS second #define pii pair<int, int> #define fr(i, a, b) for (int i = a; i <= b; i++) #define sz(x) (int)x.size() #define mp make_pair #define Mod 1000000007 typedef lon...
[]
979,576
979,577
u918169477
cpp
p03171
#include "bits/stdc++.h" using namespace std; #define pb push_back #define eb emplace_back #define fi first #define se second #define FF first #define SS second #define pii pair<int, int> #define fr(i, a, b) for (int i = a; i <= b; i++) #define sz(x) (int)x.size() #define mp make_pair #define Mod 1000000007 typedef lon...
#include "bits/stdc++.h" using namespace std; #define pb push_back #define eb emplace_back #define fi first #define se second #define FF first #define SS second #define pii pair<int, int> #define fr(i, a, b) for (int i = a; i <= b; i++) #define sz(x) (int)x.size() #define mp make_pair #define Mod 1000000007 typedef lon...
[ "variable_declaration.remove" ]
979,578
979,577
u918169477
cpp
p03171
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define sz(x) ((long long)(x).size()) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() const ld eps = 1e-9; const ld pi = acosl(-1); const int mod = 998244353; co...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define sz(x) ((long long)(x).size()) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define int long long const ld eps = 1e-9; const ld pi = acosl(-1); const in...
[]
979,579
979,580
u834005964
cpp
p03171
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MOD (int)1e9 + 7 #define rep(i, a, b) for (int i = a; i < b; ++i) #define rrep(i, a, b) for (int i = a; i > b; --i) #define vi vector<int> #define vl vector<ll> #define ld long double #define vvi vector<vector<int>> #define vvl vector<vector...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MOD (int)1e9 + 7 #define rep(i, a, b) for (int i = a; i < b; ++i) #define rrep(i, a, b) for (int i = a; i > b; --i) #define vi vector<int> #define vl vector<ll> #define ld long double #define vvi vector<vector<int>> #define vvl vector<vector...
[ "literal.number.change", "variable_access.subscript.index.change", "io.output.change", "identifier.replace.add", "literal.replace.remove" ]
979,581
979,582
u499675841
cpp
p03171
#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 RFOR(i, b, a) for (int i = (b)-1; i >= (a); i--) #define ITER(it, a) for (typeof(a.begin()) it = a.begin(); it != a.end(); it++) #define FILL(a, value) memset(a, value, sizeof(a) #...
#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 RFOR(i, b, a) for (int i = (b)-1; i >= (a); i--) #define ITER(it, a) for (typeof(a.begin()) it = a.begin(); it != a.end(); it++) #define FILL(a, value) memset(a, value, sizeof(a) #...
[ "variable_declaration.type.change" ]
979,583
979,584
u368004512
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n; cin >> n; ll arr[n]; for (int i = 0; i < n; i++) cin >> arr[i]; ll dp[n + 1][n + 1]; for (int i = n - 2; i >= 0; i--) { for (int j = i; j < n; j++) { if (i == j) dp[i][j] = arr[i]; else ...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n; cin >> n; ll arr[n]; for (int i = 0; i < n; i++) cin >> arr[i]; ll dp[n + 1][n + 1] = {0}; for (int i = n - 1; i >= 0; i--) { for (int j = i; j < n; j++) { if (i == j) dp[i][j] = arr[i]; else...
[ "variable_declaration.value.change", "literal.number.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operation.binary.change" ]
979,594
979,595
u659210268
cpp
p03171
#include <iostream> #include <vector> using namespace std; int dp[3100][3100]; // int dp[30][30]; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; ++i) { cin >> a[i]; } for (int i = 0; i < N; ++i) { dp[i][i] = 0; } for (int len = 1; len <= N; ++len) { for (int i =...
#include <iostream> #include <vector> using namespace std; long long dp[3100][3100]; // int dp[30][30]; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; ++i) { cin >> a[i]; } for (int i = 0; i < N; ++i) { dp[i][i] = 0; } for (int len = 1; len <= N; ++len) { for (i...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
979,603
979,604
u218744484
cpp
p03171
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define int long long #define fill(x, v) memset(x, v, sizeof(x)) #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__) #define ios std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); template <typename Arg1> void __f(const...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define int long long #define fill(x, v) memset(x, v, sizeof(x)) #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__) #define ios std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); template <typename Arg1> void __f(const...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
979,608
979,609
u992312894
cpp
p03171
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int64_t> a(N); for (int i = 0; i < N; i++) cin >> a.at(i); int64_t dp[N][N]; for (int i = 0; i < N; i++) dp[i][i] = a.at(i); for (int i = 0; i < N - 1; i++) dp[i][i + 1] = max(a.at(i), a.at(i + 1)) - min(a.at(i)...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int64_t> a(N); for (int i = 0; i < N; i++) cin >> a.at(i); int64_t dp[N][N]; for (int i = 0; i < N; i++) dp[i][i] = a.at(i); for (int i = 0; i < N - 1; i++) dp[i][i + 1] = max(a.at(i), a.at(i + 1)) - min(a.at(i)...
[ "call.arguments.change" ]
979,610
979,611
u101018317
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define fi first #define se second #define endl '\n' #define mx 1e18 #define mod 1000000007 #define lb(v, x) lower_bound(v.begin(), v.end(), x) #define ub(v, x) upper_bound(v.begin(), v.end(), x) #define pb push_back #define i...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define fi first #define se second #define endl '\n' #define mx 1e18 #define mod 1000000007 #define lb(v, x) lower_bound(v.begin(), v.end(), x) #define ub(v, x) upper_bound(v.begin(), v.end(), x) #define pb push_back #define i...
[ "call.arguments.change" ]
979,616
979,617
u355913876
cpp
p03171
#include <bits/stdc++.h> // #define int long long int //comment for large arrays #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 10000000000000001 #define all(x) (x).begin(), (x).end() #define LB(v, x) (lo...
#include <bits/stdc++.h> #define int long long int // comment for large arrays #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 10000000000000001 #define all(x) (x).begin(), (x).end() #define LB(v, x) (lower...
[]
979,618
979,619
u889896098
cpp
p03171
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) cin >> a[i]; int dp[n][n], graph[n][n]; for (int i = 0; i < n; i++) { dp[i][i] = a[i]; graph[i][i] = 0; } for (int i = 1; i < n; i++) { for (int j = i - 1; j >= 0; j--) { ...
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int a[n]; for (int i = 0; i < n; i++) cin >> a[i]; long long int dp[n][n], graph[n][n]; for (int i = 0; i < n; i++) { dp[i][i] = a[i]; graph[i][i] = 0; } for (int i = 1; i < n; i++) { for (in...
[ "variable_declaration.type.widen.change" ]
979,620
979,621
u561103039
cpp
p03171
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vl; typedef pair<ll, ll> pll; #define MOD 1000000007 #define INF 1000000000 #define mp make_pair #define pb push_back #define ss second #define ff first #define endl '\n' #define pl cout << endl; #define tc ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vl; typedef pair<ll, ll> pll; #define MOD 1000000007 #define INF 1000000000 #define mp make_pair #define pb push_back #define ss second #define ff first #define endl '\n' #define pl cout << endl; #define tc ...
[ "variable_declaration.type.change" ]
979,622
979,623
u014905136
cpp
p03171
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vl; typedef pair<ll, ll> pll; #define MOD 1000000007 #define INF 1000000000 #define mp make_pair #define pb push_back #define ss second #define ff first #define endl '\n' #define pl cout << endl; #define tc ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vl; typedef pair<ll, ll> pll; #define MOD 1000000007 #define INF 1000000000 #define mp make_pair #define pb push_back #define ss second #define ff first #define endl '\n' #define pl cout << endl; #define tc ...
[ "variable_declaration.type.change", "literal.number.change", "variable_declaration.array_dimensions.change" ]
979,624
979,623
u014905136
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007 #define f(i, a, b) for (ll(i) = (a); (i) < (b); (i)++) ll n; ll a[10000]; ll dp[3010][3010]; ll find(ll i, ll j) { if (i > j) { return 0; } if (dp[i][j] != -1) { return dp[i][j]; } ll c1 = a[i] + min(find(i ...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007 #define f(i, a, b) for (ll(i) = (a); (i) < (b); (i)++) ll n; ll a[10000]; ll dp[3100][3100]; ll find(ll i, ll j) { if (i > j) { return 0; } if (dp[i][j] != -1) { return dp[i][j]; } ll c1 = a[i] + min(find(i ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "expression.operation.binary.remove", "call.arguments.change", "expression.operation.binary.change" ]
979,631
979,632
u778436491
cpp
p03171
// We only fail when we stop trying #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define endl '\n' #define D(x) cerr << #x << " = " << (x) << '\n' #define sz(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() const int N = 3007; int n; int arr[N]; int dp[N][N]; int ...
// We only fail when we stop trying #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define endl '\n' #define D(x) cerr << #x << " = " << (x) << '\n' #define sz(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() const int N = 3007; int n; int arr[N]; long long dp[N][N];...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
979,635
979,636
u371586991
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define fastio ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define int long long const int N = 5007, inf = 1e18; int n, a[N], dp[N][N]; int rec(int l, int r) { if (dp[l][r] != -inf) return dp[l][r]; dp[l][r] = max(a[l] - rec(l + 1, r), a[r] - rec(l, r -...
#include <bits/stdc++.h> using namespace std; #define fastio ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define int long long const int N = 5007, inf = 1e18; int n, a[N], dp[N][N]; int rec(int l, int r) { if (dp[l][r] != -inf) return dp[l][r]; dp[l][r] = max(a[l] - rec(l + 1, r), a[r] - rec(l, r -...
[ "expression.operation.binary.remove" ]
979,639
979,640
u740487324
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define int long long int #define ld long double #define F first #define S second #define P pair<int, int> #define pb push_back #define db(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char *name, Arg1 &&arg1) { cout << name << " : " << ar...
#include <bits/stdc++.h> using namespace std; #define int long long int #define ld long double #define F first #define S second #define P pair<int, int> #define pb push_back #define db(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char *name, Arg1 &&arg1) { cout << name << " : " << ar...
[ "expression.operation.binary.remove", "assignment.change" ]
979,641
979,642
u064488844
cpp
p03171
#include <iostream> int a[3003]; int dp[3003][3003]; int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { std::cin >> a[i]; } for (int len = 1; len <= n; len++) { for (int i = 0; i + len <= n; i++) { int j = i + len; if ((n - len) % 2 == 0) { dp[i][j] = std::max(dp[i ...
#include <iostream> int a[3003]; long long dp[3003][3003]; int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { std::cin >> a[i]; } for (int len = 1; len <= n; len++) { for (int i = 0; i + len <= n; i++) { int j = i + len; if ((n - len) % 2 == 0) { dp[i][j] = std::max...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
979,643
979,644
u718277423
cpp
p03171
#include <bits/stdc++.h> #define fin \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); using namespace std; #define ll long long ll dp[3005][3005][2]; int a[3005]; int mod = 1e9 + 7; #define MAX 1e18 + 5...
#include <bits/stdc++.h> #define fin \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); using namespace std; #define ll long long ll dp[3005][3005][2]; int a[3005]; int mod = 1e9 + 7; #define MAX 1e18 + 5...
[]
979,645
979,646
u559274475
cpp
p03171
#include <bits/stdc++.h> using namespace std; const long long INF = 1e12; int main() { int n; cin >> n; vector<vector<int>> dp(n, vector<int>(n)); vector<int> v(n); for (int &x : v) cin >> x; for (int i = 0; i < n; ++i) dp[i][i] = v[i]; for (int l = n - 1; l >= 0; --l) for (int r = l + 1; r...
#include <bits/stdc++.h> using namespace std; const long long INF = 1e12; int main() { int n; cin >> n; vector<vector<long long>> dp(n, vector<long long>(n)); vector<int> v(n); for (int &x : v) cin >> x; for (int i = 0; i < n; ++i) dp[i][i] = v[i]; for (int l = n - 1; l >= 0; --l) for (int ...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
979,649
979,650
u158312277
cpp
p03171
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define f(i, a, b) for (ll i = (a); i < (b); i++) #define frr(i, a, b) for (ll i = (a - 1); i >= (b); i--) #define vi vector<int> #define de deque<int> #define del deque<ll> #define vl vector<ll> #define pb push_back #define ppb pop_back() #define pf p...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define f(i, a, b) for (ll i = (a); i < (b); i++) #define frr(i, a, b) for (ll i = (a - 1); i >= (b); i--) #define vi vector<int> #define de deque<int> #define del deque<ll> #define vl vector<ll> #define pb push_back #define ppb pop_back() #define pf p...
[ "variable_declaration.type.change", "call.arguments.change" ]
979,656
979,657
u550103492
cpp
p03171
#include "bits/stdc++.h" #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define pbds \ tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> //#include <boost/math/co...
#include "bits/stdc++.h" #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define pbds \ tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> //#include <boost/math/co...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
979,666
979,667
u526674581
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, n) for (int i = (int)(n); i > 0; i++) using ll = long long; int n; vector<int> a(3300); int dp[3300][3300]; int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> n; rep(i, n) cin >> a[i]; ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, n) for (int i = (int)(n); i > 0; i++) using ll = long long; ll n; vector<ll> a(3300); ll dp[3300][3300]; int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> n; rep(i, n) cin >> a[i]; ...
[ "variable_declaration.type.change" ]
979,670
979,671
u297398560
cpp
p03171
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long long *a = new long long[n]; for (int i = 0; i < n; i++) cin >> a[i]; long long dp[n][n]; // memset(dp,0,sizeof(dp)); for (int l = n - 1; l >= 0; l--) { for (int r = l; r < n; r++) { if (l == r) dp[l][r] ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; long long *a = new long long[n]; for (int i = 0; i < n; i++) cin >> a[i]; long long dp[n][n]; // memset(dp,0,sizeof(dp)); for (int l = n - 1; l >= 0; l--) { for (int r = l; r < n; r++) { if (l == r) dp[l][r] ...
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
979,676
979,677
u186260353
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define pb push_back #define mp make_pair #define ff first #define ss second #define endl "\n" #define fast \ ios::sync_with_stdio(0); ...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define pb push_back #define mp make_pair #define ff first #define ss second #define endl "\n" #define fast \ ios::sync_with_stdio(0); ...
[ "variable_declaration.type.change" ]
979,680
979,681
u538921852
cpp
p03171
// It doesn't matter how slow you go, Unless you don't stop. #include <algorithm> #include <bitset> #include <iostream> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <map> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> #include ...
// It doesn't matter how slow you go, Unless you don't stop. #include <algorithm> #include <bitset> #include <iostream> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <map> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> #include ...
[ "variable_declaration.type.change" ]
979,682
979,683
u287813289
cpp
p03171
/* * User: Isanchez_Aguilar * Problem: AtCoder ABC134B - Golden Apple */ #include <bits/stdc++.h> using namespace std; using Long = long long; const int MAX_N = 3001; Long vals[MAX_N]; vector<vector<Long>> memo(MAX_N, vector<Long>(MAX_N, LONG_MIN)); Long dp(int i, int j) { if (i == j) return vals[i]; if...
/* * User: Isanchez_Aguilar * Problem: AtCoder ABC134B - Golden Apple */ #include <bits/stdc++.h> using namespace std; using Long = long long; const int MAX_N = 3001; Long vals[MAX_N]; vector<vector<Long>> memo(MAX_N, vector<Long>(MAX_N, LONG_MIN)); Long dp(int i, int j) { if (i == j) return vals[i]; if...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
979,690
979,691
u858584587
cpp
p03171
#pragma optimization_level 3 #pragma GCC optimize( \ "Ofast") // Comment optimisations for an interatcive problem - use endl #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #include <bits/stdc++.h> using namespace std; #define fa...
#pragma optimization_level 3 #pragma GCC optimize( \ "Ofast") // Comment optimisations for an interatcive problem - use endl #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #include <bits/stdc++.h> using namespace std; #define fa...
[ "call.remove", "call.arguments.change" ]
979,694
979,695
u849660048
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define per(i, n) for (int i = n - 1; i >= 0; i--) typedef long long ll; typedef pair<int, int> P; typedef pair<long long, long long> Pll; typedef vector<int> vi; typedef vector<ll> vll; int dp[3300][3300]; int main() { int ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define per(i, n) for (int i = n - 1; i >= 0; i--) typedef long long ll; typedef pair<int, int> P; typedef pair<long long, long long> Pll; typedef vector<int> vi; typedef vector<ll> vll; ll dp[3300][3300]; int main() { int n...
[ "variable_declaration.type.change" ]
979,702
979,703
u615662061
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define N 3005 #define ll long long ll dp[N][N], n, arr[N]; int main() { // memset(dp, -1, sizeof(dp)); cin >> n; for (int i = 1; i <= n; i++) cin >> arr[i]; for (int i = n; i >= 1; i--) { for (int j = 1; j <= n; j++) { dp[i][j] = max(arr[i] - dp[i +...
#include <bits/stdc++.h> using namespace std; #define N 3005 #define ll long long ll dp[N][N], n, arr[N]; int main() { // memset(dp, -1, sizeof(dp)); cin >> n; for (int i = 1; i <= n; i++) cin >> arr[i]; for (int i = n; i >= 1; i--) { for (int j = i; j <= n; j++) { dp[i][j] = max(arr[i] - dp[i +...
[ "variable_declaration.value.change", "identifier.replace.add", "literal.replace.remove", "control_flow.loop.for.initializer.change" ]
979,710
979,711
u399167105
cpp
p03171
/* @Author: Shubham Anand */ #include <algorithm> #include <chrono> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <vector> #define FILEIN freopen("input.txt", "r", stdin) #defi...
/* @Author: Shubham Anand */ #include <algorithm> #include <chrono> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <vector> #define FILEIN freopen("input.txt", "r", stdin) #defi...
[ "variable_declaration.type.change" ]
979,712
979,713
u958610807
cpp
p03171
#include <bits/stdc++.h> typedef int ll; using namespace std; #define endl '\n' #define N 4005 ll a[N], dp[N][N], n, k; int main() { ios_base::sync_with_stdio(false), cin.tie(NULL); cin >> n; ll sum = 0; for (ll i = 1; i <= n; i++) { cin >> a[i]; sum += a[i]; } for (ll i = 1; i <= n; i++) { for ...
#include <bits/stdc++.h> typedef long long int ll; using namespace std; #define endl '\n' #define N 4005 ll a[N], dp[N][N], n, k; int main() { ios_base::sync_with_stdio(false), cin.tie(NULL); cin >> n; ll sum = 0; for (ll i = 1; i <= n; i++) { cin >> a[i]; sum += a[i]; } for (ll i = 1; i <= n; i++) ...
[ "variable_declaration.type.widen.change" ]
979,718
979,719
u822543121
cpp
p03171
#include <bits/stdc++.h> typedef int ll; using namespace std; #define endl '\n' #define N 2005 ll a[N], dp[N][N], n, k; int main() { ios_base::sync_with_stdio(false), cin.tie(NULL); cin >> n; ll sum = 0; for (ll i = 1; i <= n; i++) { cin >> a[i]; sum += a[i]; } for (ll i = 1; i <= n; i++) { for ...
#include <bits/stdc++.h> typedef long long int ll; using namespace std; #define endl '\n' #define N 4005 ll a[N], dp[N][N], n, k; int main() { ios_base::sync_with_stdio(false), cin.tie(NULL); cin >> n; ll sum = 0; for (ll i = 1; i <= n; i++) { cin >> a[i]; sum += a[i]; } for (ll i = 1; i <= n; i++) ...
[ "preprocessor.define.value.change", "literal.integer.change" ]
979,720
979,719
u822543121
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll long ...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll long ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
979,723
979,724
u266346465
cpp
p03171
// Author: Sparsh Agarwal #include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin >> n; int v[n]; int dp[n][n]; for (int i = 0; i < n; i++) { cin >> v[i]; } for (int l = n - 1; l >= 0; l--) { for (int r = l; r < n; r++) { if (l == r) { dp[l][r] = ...
// Author: Sparsh Agarwal #include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin >> n; int v[n]; ll dp[n][n]; for (int i = 0; i < n; i++) { cin >> v[i]; } for (int l = n - 1; l >= 0; l--) { for (int r = l; r < n; r++) { if (l == r) { dp[l][r] = v...
[ "variable_declaration.type.change" ]
979,727
979,728
u960776830
cpp
p03171
#include <bits/stdc++.h> using namespace std; typedef long long ll; const long long mod = 1000000007; const int mx = 3005; int dp[mx][mx]; int main() { int n; cin >> n; int a[n]; int i, j, k; for (i = 0; i < n; i++) cin >> a[i]; for (int l = n - 1; l >= 0; l--) { for (int r = l; r < n; r++...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const long long mod = 1000000007; const int mx = 3005; ll dp[mx][mx]; int main() { int n; cin >> n; int a[n]; int i, j, k; for (i = 0; i < n; i++) cin >> a[i]; for (int l = n - 1; l >= 0; l--) { for (int r = l; r < n; r++)...
[ "variable_declaration.type.change" ]
979,735
979,736
u919005705
cpp
p03171
#include <bits/stdc++.h> #define fast_io \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define forit(it, a) ...
#include <bits/stdc++.h> #define fast_io \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define forit(it, a) ...
[]
979,737
979,738
u360212177
cpp
p03171
#include <algorithm> #include <iomanip> #include <iostream> #include <limits> #include <utility> #include <vector> using namespace std; int N; vector<long long> v; vector<vector<long long>> dp; long long LIM = std::numeric_limits<long long>::min(); long long deque(long long i, long long j) { long long c = (N - (j ...
#include <algorithm> #include <iomanip> #include <iostream> #include <limits> #include <utility> #include <vector> using namespace std; int N; vector<long long> v; vector<vector<long long>> dp; long long LIM = std::numeric_limits<long long>::min(); long long deque(long long i, long long j) { long long c = (N - j -...
[ "assignment.change" ]
979,741
979,742
u395287489
cpp
p03171
#include <iostream> using namespace std; int dp[3007][3007]; int tab[3007]; int main() { int N; cin >> N; for (int i = 1; i <= N; i++) { cin >> dp[i][i]; tab[i] = dp[i][i]; } cout << "\n"; for (int i = 1; i <= N; i++) for (int j = i - 1; j > 0; j--) dp[j][i] = max(tab[j] - dp[j + 1][i],...
#include <iostream> using namespace std; long long dp[3007][3007]; int tab[3007]; int main() { int N; cin >> N; for (int i = 1; i <= N; i++) { cin >> dp[i][i]; tab[i] = dp[i][i]; } cout << "\n"; for (int i = 1; i <= N; i++) for (int j = i - 1; j > 0; j--) dp[j][i] = max(tab[j] - dp[j + ...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
979,743
979,744
u098482829
cpp
p03171
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> #define st first #define nd second #define turbo \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> #define st first #define nd second #define turbo \ ios_base::sync_with_stdio(false); \ cin.tie(0); ...
[ "variable_declaration.type.change" ]
979,751
979,752
u317997849
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i) #define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i > 0; i--) #define irep(i, m, n) for (int i = ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i) #define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i > 0; i--) #define irep(i, m, n) for (int i = ...
[ "variable_declaration.type.change" ]
979,755
979,756
u530107518
cpp
p03171
// Created by conan1024hao in 2020. // Copyright © 2020 conan1024hao. All rights reserved. // 専用ライブラリです、自由にコピーして構いません。 // 感谢看我的代码!Wechat:conan1024hao Twitter/QQ:810396815 #pragma GCC optimize("O3") #include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #inclu...
// Created by conan1024hao in 2020. // Copyright © 2020 conan1024hao. All rights reserved. // 専用ライブラリです、自由にコピーして構いません。 // 感谢看我的代码!Wechat:conan1024hao Twitter/QQ:810396815 #pragma GCC optimize("O3") #include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #inclu...
[ "control_flow.branch.if.condition.change" ]
979,757
979,758
u220212997
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define inf INT_MAX int n; int a[3005]; int dp[3005][3005][2]; int turn = 0; int recur(int i, int j, int turn) { if (i == j) { return (turn == 0 ? a[i] : -a[i]); } int &r = dp[i][j][turn]; if (r != inf) return dp[i][j][turn]; if (turn == 0) { return r...
#include <bits/stdc++.h> using namespace std; #define inf INT_MAX int n; int a[3005]; long long dp[3005][3005][2]; int turn = 0; long long recur(int i, int j, int turn) { if (i == j) { return (turn == 0 ? a[i] : -a[i]); } long long &r = dp[i][j][turn]; if (r != inf) return dp[i][j][turn]; if (turn ==...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
979,759
979,760
u083367057
cpp
p03171
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() #defin...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() #defin...
[ "variable_declaration.type.change" ]
979,761
979,762
u277556971
cpp
p03171
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int n; int *a = new int[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } long **dp = new long *[n + 1]; for (int i = 0; i <= n; i++) { dp[i] = new long[n + 1]; } for (int i = 0; i <= n; i++) { for (int j = ...
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int n; cin >> n; int *a = new int[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } long **dp = new long *[n + 1]; for (int i = 0; i <= n; i++) { dp[i] = new long[n + 1]; } for (int i = 0; i <= n; i++) { f...
[]
979,763
979,764
u534223360
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long vector<vector<ll>> v[2]; ll f(ll a[], ll n, ll i, ll j, ll turn) { if (i == n || j == -1) { return 0; } if (v[turn][i][j] != 0) { return v[turn][i][j]; } if (turn == 0) { ll x = 0, y = 0; y = f(a, n, i + 1, j, 1) + a[i]; x ...
#include <bits/stdc++.h> using namespace std; #define ll long long vector<vector<ll>> v[2]; ll f(ll a[], ll n, ll i, ll j, ll turn) { if (i == n || j == -1 || i > j) { return 0; } if (v[turn][i][j] != 0) { return v[turn][i][j]; } if (turn == 0) { ll x = 0, y = 0; y = f(a, n, i + 1, j, 1) + a[i...
[ "control_flow.branch.if.condition.change" ]
979,765
979,766
u273273876
cpp
p03171
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define ll long long #define endl '\n' using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; ll memo[3001][3001], arr[3001]; int a; ll s...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define ll long long #define endl '\n' using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; ll memo[3001][3001], arr[3001]; int a; ll s...
[]
979,767
979,768
u366023106
cpp
p03171
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; #define rep(i, n) for (ll i = 0; i < n; i++)...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; #define rep(i, n) for (ll i = 0; i < n; i++)...
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change" ]
979,771
979,772
u828388155
cpp
p03171
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; #define rep(i, n) for (ll i = 0; i < n; i++)...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; #define rep(i, n) for (ll i = 0; i < n; i++)...
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change" ]
979,771
979,773
u828388155
cpp
p03171
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; #define rep(i, n) for (ll i = 0; i < n; i++)...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; #define rep(i, n) for (ll i = 0; i < n; i++)...
[ "assignment.change" ]
979,774
979,775
u828388155
cpp
p03171
#include <bits/stdc++.h> using namespace std; using ll = long long int; int n; ll *a, **dp; int recur(int i, int j) { if (i == j) return a[i]; if (dp[i][j]) return dp[i][j]; return dp[i][j] = max(a[i] - recur(i + 1, j), a[j] - recur(i, j - 1)); } int main() { cin >> n; a = new ll[n]; dp = new ll...
#include <bits/stdc++.h> using namespace std; using ll = long long int; int n; ll *a, **dp; ll recur(int i, int j) { if (i == j) return a[i]; if (dp[i][j]) return dp[i][j]; return dp[i][j] = max(a[i] - recur(i + 1, j), a[j] - recur(i, j - 1)); } int main() { cin >> n; a = new ll[n]; dp = new ll ...
[]
979,780
979,781
u093929604
cpp
p03171
#include <bits/stdc++.h> using namespace std; using ll = long long int; int n; int *a, **dp; int recur(int i, int j) { if (i == j) return a[i]; if (dp[i][j]) return dp[i][j]; return dp[i][j] = max(a[i] - recur(i + 1, j), a[j] - recur(i, j - 1)); } int main() { cin >> n; a = new int[n]; dp = new ...
#include <bits/stdc++.h> using namespace std; using ll = long long int; int n; ll *a, **dp; ll recur(int i, int j) { if (i == j) return a[i]; if (dp[i][j]) return dp[i][j]; return dp[i][j] = max(a[i] - recur(i + 1, j), a[j] - recur(i, j - 1)); } int main() { cin >> n; a = new ll[n]; dp = new ll ...
[ "variable_declaration.type.change", "assignment.value.change" ]
979,782
979,781
u093929604
cpp
p03171
#include <bits/stdc++.h> using namespace std; int n; int dp[3100][3100]; int a[3100]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int r = 1; r <= n; r++) { for (int l = r; l >= 1; l--) { dp[r][l] = ma...
#include <bits/stdc++.h> using namespace std; int n; long long dp[3100][3100]; long long a[3100]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int r = 1; r <= n; r++) { for (int l = r; l >= 1; l--) { d...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
979,783
979,784
u064458730
cpp
p03171
#include <bits/stdc++.h> #define pb push_back #define INF 0x3f3f3f3 #define LINF 0x3f3f3f3f3f3f3f #define MAXN int(3005) #define fim '\n' #define ll long long #define f first #define s second #define FAST cin.tie(0), cout.tie(0), ios::sync_with_stdio(0) #define debug(x) cout << "DEBUG " << x << fim #define debug2(x, y)...
#include <bits/stdc++.h> #define pb push_back #define INF 0x3f3f3f3 #define LINF 0x3f3f3f3f3f3f3f #define MAXN int(3005) #define fim '\n' #define ll long long #define f first #define s second #define FAST cin.tie(0), cout.tie(0), ios::sync_with_stdio(0) #define debug(x) cout << "DEBUG " << x << fim #define debug2(x, y)...
[ "variable_declaration.type.change" ]
979,785
979,786
u562998528
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f const int N = 3e3 + 5; ll a[N], dp[N][N]; int main() { int n, i, j, L, R; scanf("%d", &n); for (i = 1; i <= n; i++) scanf("%lld", a[i]); for (L = n; i >= 1; L--) { for (R = L; R <= n; R++) { dp[L][R] = max(a[...
#include <bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f const int N = 3e3 + 5; ll a[N], dp[N][N]; int main() { int n, i, j, L, R; scanf("%d", &n); for (i = 1; i <= n; i++) scanf("%lld", &a[i]); for (L = n; L >= 1; L--) { for (R = L; R <= n; R++) { dp[L][R] = max(a...
[ "expression.operation.unary.reference.add", "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
979,799
979,800
u856968104
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define anuj \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define fo(i, n) for (int i = 0; i < n; i++) #define Fo(i, k, n) for (int i = k; i < n; i++) #de...
#include <bits/stdc++.h> using namespace std; #define anuj \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define fo(i, n) for (int i = 0; i < n; i++) #define Fo(i, k, n) for (int i = k; i < n; i++) #de...
[ "variable_declaration.type.change" ]
979,803
979,804
u494437461
cpp
p03171
#include <bits/stdc++.h> #define ll long long #define re register #define IL inline using namespace std; const int maxn = 3e3 + 10; template <typename T> void read(T &x) { T f = 1; x = 0; char s = getchar(); while (s < '0' || s > '9') { if (s == '-') f = -1; s = getchar(); } while (s >= '0' &&...
#include <bits/stdc++.h> #define ll long long #define re register #define IL inline using namespace std; const int maxn = 3e3 + 10; template <typename T> void read(T &x) { T f = 1; x = 0; char s = getchar(); while (s < '0' || s > '9') { if (s == '-') f = -1; s = getchar(); } while (s >= '0' &&...
[ "variable_declaration.type.change", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
979,811
979,812
u343169347
cpp
p03171
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, a, b) for (int i = a; i <= b; i++) #define ii pair<in...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, a, b) for (int i = a; i <= b; i++) #define ii pair<in...
[]
979,823
979,824
u091780713
cpp
p03171
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, a, b) for (int i = a; i <= b; i++) #define ii pair<in...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i, a, b) for (int i = a; i <= b; i++) #define ii pair<in...
[]
979,825
979,824
u091780713
cpp
p03171
#include <bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define mi map<int, int> #define mii map<pii, int> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (int)x.size() #define endl '\n' #define he...
#include <bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define mi map<int, int> #define mii map<pii, int> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (int)x.size() #define endl '\n' #define he...
[]
979,828
979,829
u054956994
cpp
p03171
#include <algorithm> #include <cctype> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> using namespace std; vector<long long> a; vector<vector<long long>> dp; long long sa(long long b, long long e) { if (dp[b][e] != INFINITY) ...
#include <algorithm> #include <cctype> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> using namespace std; vector<long long> a; vector<vector<long long>> dp; long long sa(long long b, long long e) { if (dp[b][e] != 1000000000)...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.branch.if.condition.change", "assignment.value.change", "call.arguments.change" ]
979,834
979,835
u834415466
cpp
p03171
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <iostream> #include <limits> #include <map> #include <queue> #include <tuple> #include <vector> using namespace std; #define INF 1100000000000 #define MAX 1100000 #define MOD 1000000007 typedef long...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <iostream> #include <limits> #include <map> #include <queue> #include <tuple> #include <vector> using namespace std; #define INF 1100000000000 #define MAX 1100000 #define MOD 1000000007 typedef long...
[]
979,836
979,837
u591914971
cpp
p03171
#include <iostream> using namespace std; int n, i, a[3001], d[3001][3001], k; int main() { cin >> n; for (i = 1; i <= n; i++) { cin >> a[i]; d[i][i] = a[i]; } for (k = 2; k <= n; k++) { for (i = 1; i <= n - k + 1; i++) { d[i][i + k - 1] = max(a[i] - d[i + 1][i + k - 1], a[i + k - 1]...
#include <iostream> using namespace std; long long n, i, a[3005], d[3005][3005], k; int main() { cin >> n; for (i = 1; i <= n; i++) { cin >> a[i]; d[i][i] = a[i]; } for (k = 2; k <= n; k++) { for (i = 1; i <= n - k + 1; i++) { d[i][i + k - 1] = max(a[i] - d[i + 1][i + k - 1], a[i + ...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change", "literal.number.change", "variable_declaration.array_dimensions.change" ]
979,838
979,839
u283337016
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define y1 as214 #define ii pair<int, int> #define iii pair<int, ii> #define iv pair<ii, ii> #define fi first #define se second #define fr front() #define pb push_back #define FOR(i, x, n) for (int i = x; i <= n; ++i) #define REP(i, n) for (int i = 0; i < n; ++i) #define...
#include <bits/stdc++.h> using namespace std; #define y1 as214 #define ii pair<int, int> #define iii pair<int, ii> #define iv pair<ii, ii> #define fi first #define se second #define fr front() #define pb push_back #define FOR(i, x, n) for (int i = x; i <= n; ++i) #define REP(i, n) for (int i = 0; i < n; ++i) #define...
[ "assignment.variable.change", "identifier.change", "call.function.change", "call.arguments.change", "call.arguments.add" ]
979,842
979,841
u812951529
cpp
p03171
#include <cstring> #include <iostream> using namespace std; int n, arr[3001], dp[3001][3001][2]; int recursive(int l, int r, int tur) { if (dp[l][r][tur] != -1) return dp[l][r][tur]; if (l == r && tur == 1) return arr[l]; if (l == r && tur == 2) return -arr[l]; if (tur == 1) dp[l][r][tur] = ...
#include <cstring> #include <iostream> using namespace std; long long int n, arr[3001], dp[3001][3001][2]; long long int recursive(int l, int r, int tur) { if (dp[l][r][tur] != -1) return dp[l][r][tur]; if (l == r && tur == 1) return arr[l]; if (l == r && tur == 2) return -arr[l]; if (tur == 1) ...
[ "variable_declaration.type.widen.change" ]
979,845
979,846
u768735561
cpp
p03171
#include <iostream> #include <vector> int main() { int n; std::cin >> n; std::vector<int> arr(n + 1, 0); for (int i = 0; i < n; i++) { std::cin >> arr[i]; } int dp[n + 2][n + 2] = {0}; for (int i = n - 1; i >= 0; i--) { for (int j = i; j < n; j++) { if (i == j) { dp[i][j] = arr[i]...
#include <iostream> #include <vector> int main() { int n; std::cin >> n; std::vector<long long> arr(n + 1, 0); for (int i = 0; i < n; i++) { std::cin >> arr[i]; } long long dp[n + 2][n + 2] = {0}; for (int i = n - 1; i >= 0; i--) { for (int j = i; j < n; j++) { if (i == j) { dp[i]...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change" ]
979,849
979,850
u290926443
cpp
p03171
#include <bits/stdc++.h> #define mp make_pair #define f first #define se second #define pb push_back #define ms memset #define MOD 1000000007 #define sp fixed << setprecision #define sz sizeof #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() using namespace std; typedef long long ll; typedef unsig...
#include <bits/stdc++.h> #define mp make_pair #define f first #define se second #define pb push_back #define ms memset #define MOD 1000000007 #define sp fixed << setprecision #define sz sizeof #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() using namespace std; typedef long long ll; typedef unsig...
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
979,853
979,854
u165403340
cpp
p03171
#include <bits/stdc++.h> using namespace std; #define N (int)3e3 + 5 #define f1 first #define s2 second #define pb push_back #define ll long long #define mod (int)1e9 #define INF 99999999 #define ull unsigned long long #define all(a) a.begin(), a.end() #define fri(a) freopen((a), "r", stdin); #define fro(a) freopen((a...
#include <bits/stdc++.h> using namespace std; #define N (int)3e3 + 5 #define f1 first #define s2 second #define pb push_back #define ll long long #define mod (int)1e9 #define INF 99999999 #define ull unsigned long long #define all(a) a.begin(), a.end() #define fri(a) freopen((a), "r", stdin); #define fro(a) freopen((a...
[ "variable_declaration.type.change" ]
979,859
979,860
u291900927
cpp
p03171
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #includ...
[ "assignment.change" ]
979,861
979,862
u832095504
cpp
p03171
#include <bits/stdc++.h> #define NMAX 3005 using namespace std; int n, a[NMAX], d[NMAX][NMAX]; int main() { cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; for (int i = 1; i <= n; i++) d[i][i] = a[i]; for (int i = 2; i <= n; i++) { for (int j = 1; j <= n - i + 1; j++) { d[j][j + i - 1] = ...
#include <bits/stdc++.h> #define NMAX 3005 using namespace std; int n; long long a[NMAX], d[NMAX][NMAX]; int main() { cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; for (int i = 1; i <= n; i++) d[i][i] = a[i]; for (int i = 2; i <= n; i++) { for (int j = 1; j <= n - i + 1; j++) { d[j][j + ...
[ "variable_declaration.type.widen.change" ]
979,863
979,864
u644497121
cpp