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
p02582
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; const int N = 5e4 + 5; int arr[N]; vector<int> vc; bool cmp(int a, int b) { return a > b; } int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); string s; cin >> s; if (s[0] == 'R' && s[1] == 'R' &&...
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; const int N = 5e4 + 5; int arr[N]; vector<int> vc; bool cmp(int a, int b) { return a > b; } int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); string s; cin >> s; if (s[0] == 'R' && s[1] == 'R' &&...
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
282,430
282,431
u451868485
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s == "RRR") { cout << 3 << endl; } else if (s == "RRS" || s == "RSR" || s == "SRR") { cout << 2 << endl; } else if (s == "SSS") { cout << 0 << endl; } else { cout << 1 << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s == "RRR") { cout << 3 << endl; } else if (s == "RRS" || s == "SRR") { cout << 2 << endl; } else if (s == "SSS") { cout << 0 << endl; } else { cout << 1 << endl; } }
[ "expression.operation.binary.remove" ]
282,441
282,442
u625745764
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; int sum = 0, res = 0; for (int i = 0; i < a.size() - 1; i++) { if (a[i] == 'R') { while (a[i] == 'R') { sum++; i++; } i--; res = max(res, sum); sum = 0; } } cout << res << end...
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; int sum = 0, res = 0; for (int i = 0; i < a.size(); i++) { if (a[i] == 'R') { while (a[i] == 'R') { sum++; i++; } i--; res = max(res, sum); sum = 0; } } cout << res << endl; ...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
282,447
282,448
u151321014
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (find(s.begin(), s.end(), 'R') == s.end()) { cout << 0 << endl; } else if (s.find("RRR") != string::npos) { cout << 3 << endl; } else if (s.find("R") != string::npos) { cout << 2 << endl; } else { cout << 1 <...
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (find(s.begin(), s.end(), 'R') == s.end()) { cout << 0 << endl; } else if (s.find("RRR") != string::npos) { cout << 3 << endl; } else if (s.find("RR") != string::npos) { cout << 2 << endl; } else { cout << 1 ...
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,451
282,452
u682054763
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (find(s.begin(), s.end(), 'S') == s.end()) { cout << 0 << endl; } else if (s.find("SSS") != string::npos) { cout << 3 << endl; } else if (s.find("SS") != string::npos) { cout << 2 << endl; } else { cout << 1 ...
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (find(s.begin(), s.end(), 'R') == s.end()) { cout << 0 << endl; } else if (s.find("RRR") != string::npos) { cout << 3 << endl; } else if (s.find("RR") != string::npos) { cout << 2 << endl; } else { cout << 1 ...
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,453
282,452
u682054763
cpp
p02582
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; using ll = long long; int main() { string s; cin >> s; size_t n; n = s.size(); bool flag = true; int ans = 0; int cnt = 0; rep(i, n) { if (s[i] == 'R') { if (flag == true) cnt++; else ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; using ll = long long; int main() { string s; cin >> s; size_t n; n = s.size(); bool flag = true; int ans = 0; int cnt = 0; rep(i, n) { if (s[i] == 'R') { if (flag == true) cnt++; else { ...
[ "expression.unary.arithmetic.add" ]
282,454
282,455
u975472502
cpp
p02582
#include <bits/stdc++.h> #include <iostream> #include <vector> using namespace std; int main() { int count = 0; int temp = 0; vector<char> c(3); for (int a = 0; a < 2; a++) { cin >> c.at(a); } for (int i = 0; i < 2; i++) { if (c.at(i) == 'S') { if (temp <= count) { temp = count; ...
#include <bits/stdc++.h> #include <iostream> #include <vector> using namespace std; int main() { int count = 0; int temp = 0; vector<char> c(3); for (int a = 0; a < 3; a++) { cin >> c.at(a); } for (int i = 0; i < 3; i++) { if (c.at(i) == 'S') { if (temp <= count) { temp = count; ...
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
282,474
282,475
u561441716
cpp
p02582
#include <iostream> using namespace std; int main() { string s; cin >> s; int cnt = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'S') { cnt++; } } if (cnt == 0 || cnt == 3) { cout << cnt << endl; } else if (cnt == 1) { cout << 1 << endl; } else if (cnt == 2) { if (s[0] == 'S' ...
#include <iostream> using namespace std; int main() { string s; cin >> s; int cnt = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') { cnt++; } } if (cnt == 0 || cnt == 3) { cout << cnt << endl; } else if (cnt == 1) { cout << 1 << endl; } else if (cnt == 2) { if (s[0] == 'R' ...
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,480
282,481
u160247118
cpp
p02582
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; const int N = 2e5 + 10, OO = 0x3f3f3f3f, mod = 1e9 + 7; #define PI acos(-1) #define clr(arr, val) memset(arr, val, sizeof(arr)) #define loop(i, n) for (int i = 0; i < int(n); i++) #...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; const int N = 2e5 + 10, OO = 0x3f3f3f3f, mod = 1e9 + 7; #define PI acos(-1) #define clr(arr, val) memset(arr, val, sizeof(arr)) #define loop(i, n) for (int i = 0; i < int(n); i++) #...
[]
282,484
282,485
u551374420
cpp
p02582
/* @uthor: Kashish Gilhotra user: CodeChef, CodeForces, HackerEarth, HackerRank, SPOJ: kashish001 */ #include <bits/stdc++.h> using namespace std; #define int long long int typedef vector<int> vi; typedef vector<pair<int, int>> vpi; typedef vector<vi> vvi; const int mod = 1e9 + 7; #define FAST ...
/* @uthor: Kashish Gilhotra user: CodeChef, CodeForces, HackerEarth, HackerRank, SPOJ: kashish001 */ #include <bits/stdc++.h> using namespace std; #define int long long int typedef vector<int> vi; typedef vector<pair<int, int>> vpi; typedef vector<vi> vvi; const int mod = 1e9 + 7; #define FAST ...
[ "literal.number.change", "variable_declaration.value.change", "identifier.change", "io.output.change" ]
282,493
282,494
u495169435
cpp
p02582
// Author: Fuadul Hasan(fuadul202@gmail.com) #include <bits/stdc++.h> using namespace std; #define ll long long const int N = 2e5 + 5; int main() { string s; cin >> s; if (s[0] == 'R' and s[1] == 'R' and s[2] == 'R') { cout << 3 << endl; } else if (s[1] != 'R' and s[0] == 'R' or s[2] == 'R') { cout ...
// Author: Fuadul Hasan(fuadul202@gmail.com) #include <bits/stdc++.h> using namespace std; #define ll long long const int N = 2e5 + 5; int main() { string s; cin >> s; if (s[0] == 'R' and s[1] == 'R' and s[2] == 'R') { cout << 3 << endl; } else if (s[1] != 'R' and (s[0] == 'R' or s[2] == 'R')) { cou...
[ "control_flow.branch.if.condition.change" ]
282,497
282,498
u526278960
cpp
p02582
#include <bits/stdc++.h> #define ll long long int #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define fr(i, a, b) for (long long int i = a; i < b; i++) #define pb push_back #define mp m...
#include <bits/stdc++.h> #define ll long long int #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define fr(i, a, b) for (long long int i = a; i < b; i++) #define pb push_back #define mp m...
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add" ]
282,501
282,502
u560153852
cpp
p02582
#include <bits/stdc++.h> using namespace std; long long mx(long long a, long long b) { if (a > b) return a; else return b; } long long mn(long long a, long long b) { if (a < b) return a; else return b; } long long cei(long long a, long long b) { if (a % b == 0) return a / b; else ret...
#include <bits/stdc++.h> using namespace std; long long mx(long long a, long long b) { if (a > b) return a; else return b; } long long mn(long long a, long long b) { if (a < b) return a; else return b; } long long cei(long long a, long long b) { if (a % b == 0) return a / b; else ret...
[ "variable_declaration.value.change", "identifier.replace.remove", "literal.replace.add" ]
282,511
282,512
u693934949
cpp
p02582
#include <bits/stdc++.h> using namespace std; long long mx(long long a, long long b) { if (a > b) return a; else return b; } long long mn(long long a, long long b) { if (a < b) return a; else return b; } long long cei(long long a, long long b) { if (a % b == 0) return a / b; else ret...
#include <bits/stdc++.h> using namespace std; long long mx(long long a, long long b) { if (a > b) return a; else return b; } long long mn(long long a, long long b) { if (a < b) return a; else return b; } long long cei(long long a, long long b) { if (a % b == 0) return a / b; else ret...
[ "variable_declaration.value.change", "identifier.replace.remove", "literal.replace.add", "assignment.value.change", "identifier.change", "call.function.change" ]
282,513
282,512
u693934949
cpp
p02582
#include <bits/stdc++.h> using namespace std; long long mx(long long a, long long b) { if (a > b) return a; else return b; } long long mn(long long a, long long b) { if (a < b) return a; else return b; } long long cei(long long a, long long b) { if (a % b == 0) return a / b; else ret...
#include <bits/stdc++.h> using namespace std; long long mx(long long a, long long b) { if (a > b) return a; else return b; } long long mn(long long a, long long b) { if (a < b) return a; else return b; } long long cei(long long a, long long b) { if (a % b == 0) return a / b; else ret...
[ "variable_declaration.value.change", "identifier.replace.remove", "literal.replace.add", "assignment.value.change", "identifier.change", "call.function.change", "io.output.change" ]
282,514
282,512
u693934949
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s; int count = 0, max = 0; cin >> s; for (int i = 0; i < s.size() - 1; i++) { count = 0; while (i < s.size() && s[i] == 'R') { count++; i++; } if (count > max) ...
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s; int count = 0, max = 0; cin >> s; for (int i = 0; i < s.size(); i++) { count = 0; while (i < s.size() && s[i] == 'R') { count++; i++; } if (count > max) max...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
282,515
282,516
u510930851
cpp
p02582
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int i, j, k, n, r = 0; string s; cin >> s; if (s[0] == 'R') r++; for (i = 1; i < 2; i++) { if (s[i] == 'R') { if (s[i - 1] == 'R') r++; } } cout << r; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int i, j, k, n, r = 0; string s; cin >> s; if (s[0] == 'R') r++; for (i = 1; i < 3; i++) { if (s[i] == 'R') { if (s[i - 1] == 'R') r++; else r = 1; } } cout << r; return 0; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "assignment.add" ]
282,519
282,520
u853801469
cpp
p02582
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; bool flg = false; int cnt = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') { if (flg) { cnt++; } else { flg = true; cnt = 1; } } else { flg = false; cnt ...
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; bool flg = false; int cnt = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') { if (flg) { cnt++; } else { flg = true; cnt = 1; } } else { flg = false; } } ...
[]
282,523
282,524
u697641414
cpp
p02582
#include <bits/stdc++.h> // pratt3000 #define mcqn \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); \ cout.tie(nullptr); #define test ...
#include <bits/stdc++.h> // pratt3000 #define mcqn \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); \ cout.tie(nullptr); #define test ...
[ "variable_declaration.value.change" ]
282,525
282,526
u703646047
cpp
p02582
#include <bits/stdc++.h> // pratt3000 #define mcqn \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); \ cout.tie(nullptr); #define test ...
#include <bits/stdc++.h> // pratt3000 #define mcqn \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); \ cout.tie(nullptr); #define test ...
[ "variable_declaration.value.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
282,527
282,526
u703646047
cpp
p02582
#include <bits/stdc++.h> using namespace std; // TEMPLATE #define pb push_back #define mp make_pair #define ll long long #define ld long double #define pii pair<ll, ll> #define piii pair<ll, pii> #define F first #define S second #define newline printf("\n") #define minusone printf("-1\n") #define zeroo printf("0\n") ...
#include <bits/stdc++.h> using namespace std; // TEMPLATE #define pb push_back #define mp make_pair #define ll long long #define ld long double #define pii pair<ll, ll> #define piii pair<ll, pii> #define F first #define S second #define newline printf("\n") #define minusone printf("-1\n") #define zeroo printf("0\n") ...
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
282,528
282,529
u589099084
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S == "RRR") cout << 3 << endl; else if (S == "SSS") cout << 0 << endl; else if (S == "RSS" || S == "SRR") cout << 2 << endl; else cout << 1 << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S == "RRR") cout << 3 << endl; else if (S == "SSS") cout << 0 << endl; else if (S == "RRS" || S == "SRR") cout << 2 << endl; else cout << 1 << endl; }
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,530
282,531
u616958747
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ll long long int // #define mp make_pair #define S second #define F first ll mod = 1e9 + 7; #define fastIO \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ll long long int // #define mp make_pair #define S second #define F first ll mod = 1e9 + 7; #define fastIO \ ios_base::sync_with_stdio(false); ...
[]
282,538
282,539
u066630187
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define ll long long #define ar array #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) int n, k, tmp; string s; bool compare(const pair<int, bool> &p1, const pair<int, bool> &p2) { return p1.first > p2.first; } void solve() { cin ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ar array #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) int n, k, tmp; string s; bool compare(const pair<int, bool> &p1, const pair<int, bool> &p2) { return p1.first > p2.first; } void solve() { cin ...
[ "control_flow.branch.if.add" ]
282,543
282,544
u132525821
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { string s; cin >> s; vector<ll> v(3, 0); ll maxi = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') v[i] = 1; if (i > 0 && v[i] == 'R' && v[i - 1] == 'R') v[i] += v[i - 1]; maxi = max(maxi, v[i]); } ...
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { string s; cin >> s; vector<ll> v(3, 0); ll maxi = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') v[i] = 1; if (i > 0 && s[i] == 'R' && s[i - 1] == 'R') v[i] += v[i - 1]; maxi = max(maxi, v[i]); } ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
282,545
282,546
u324282259
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define ALL(x) (x).begin(), (x).end() #define COUT(x) cout << (x) << "\n" #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define ALL(x) (x).begin(), (x).end() #define COUT(x) cout << (x) << "\n" #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
[]
282,549
282,550
u303884911
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string s; int C = 0; cin >> s; for (int i = 0; i < 3; i++) { if (s.at(i) == 'R') { C++; } } string SS = "SRS"; if (C == 2 && s == SS) { C = 1; } cout << C << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; int C = 0; cin >> s; for (int i = 0; i < 3; i++) { if (s.at(i) == 'R') { C++; } } string SS = "RSR"; if (C == 2 && s == SS) { C = 1; } cout << C << endl; }
[ "literal.string.change", "variable_declaration.value.change" ]
282,555
282,556
u927463074
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string s; int res = 0, best = 0; cin >> s; for (char c : s) { if (c == 'R') { res++; } else { best = max(best, res); res = 0; } } cout << best; }
#include <bits/stdc++.h> using namespace std; int main() { string s; int res = 0, best = 0; cin >> s; for (char c : s) { if (c == 'R') { res++; } else { best = max(best, res); res = 0; } } cout << max(res, best); }
[ "call.add", "call.arguments.change" ]
282,559
282,560
u417147392
cpp
p02582
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; int main() { string s; cin >> s; int ans = 0; int state = 1; rep(i, 3) { if (s[i] == 'R') { if (state == 1) { ans++; } state = 1; } else { state = 0; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; int main() { string s; cin >> s; int ans = 0; int state = 1; rep(i, 3) { if (s[i] == 'R') { if (ans == 0 || state == 1) { ans++; } state = 1; } else { s...
[ "control_flow.branch.if.condition.change" ]
282,561
282,562
u014968288
cpp
p02582
#include <algorithm> #include <bitset> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> #define db double #define vi vector<int> #define pb push_back #define fi first #define se second #define ll long long #define ld long double #define maxn...
#include <algorithm> #include <bitset> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> #define db double #define vi vector<int> #define pb push_back #define fi first #define se second #define ll long long #define ld long double #define maxn...
[ "literal.number.change", "io.output.change" ]
282,574
282,575
u302934691
cpp
p02582
#include <iostream> #include <string> using namespace std; int main() { string a; cin >> a; if (a[0] == 'S') { if (a[1] == 'S') { if (a[2] == 'S') { cout << 3 << endl; } else { cout << 2 << endl; } } else { cout << 1 << endl; } } else { if (a[1] == 'S') {...
#include <iostream> #include <string> using namespace std; int main() { string a; cin >> a; if (a[0] == 'R') { if (a[1] == 'R') { if (a[2] == 'R') { cout << 3 << endl; } else { cout << 2 << endl; } } else { cout << 1 << endl; } } else { if (a[1] == 'R') {...
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,580
282,581
u161418539
cpp
p02582
#include <iostream> using namespace std; int main(void) { string str; cin >> str; if (str.find("SSS") != -1) { cout << 3 << endl; } else if (str.find("SS") != -1) { cout << 2 << endl; } else if (str.find("S") != -1) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
#include <iostream> using namespace std; int main(void) { string str; cin >> str; if (str.find("RRR") != -1) { cout << 3 << endl; } else if (str.find("RR") != -1) { cout << 2 << endl; } else if (str.find("R") != -1) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,582
282,583
u380844736
cpp
p02582
#include <algorithm> #include <cassert> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string.h> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; typedef long l...
#include <algorithm> #include <cassert> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string.h> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; typedef long l...
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
282,586
282,587
u114234520
cpp
p02582
#include <algorithm> #include <cassert> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string.h> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; typedef long l...
#include <algorithm> #include <cassert> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string.h> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; typedef long l...
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
282,588
282,587
u114234520
cpp
p02582
// ★★ ASHWINI SHARMA ★★ #include <bits/stdc++.h> using namespace std; #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define fr(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)...
// ★★ ASHWINI SHARMA ★★ #include <bits/stdc++.h> using namespace std; #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define fr(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)...
[ "literal.number.change", "call.arguments.change", "io.output.change" ]
282,599
282,598
u909051929
cpp
p02582
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> //#include <boost/multiprecision/cpp_int.hpp> // // using namespace boost::multiprecision; using namespace __gnu_pbds; using namespace std; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> //#include <boost/multiprecision/cpp_int.hpp> // // using namespace boost::multiprecision; using namespace __gnu_pbds; using namespace std; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_...
[ "variable_declaration.value.change", "expression.operation.unary.remove" ]
282,602
282,603
u403290660
cpp
p02582
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { string s; cin >> s; int ans = 0; rep(i, 3) { if (s[i] == 'R') ans++; } if (s[1] == 'S') ans = 1; cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { string s; cin >> s; int ans = 0; rep(i, 3) { if (s[i] == 'R') ans++; } if (s[1] == 'S' && ans > 1) ans = 1; cout << ans << endl; }
[ "control_flow.branch.if.condition.change" ]
282,606
282,607
u259578308
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++) #define FORD(i, a, b) for (ll i = a; i >= (l...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++) #define FORD(i, a, b) for (ll i = a; i >= (l...
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
282,612
282,613
u393698851
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { int a = 0; string b; cin >> b; if (b == "SSS") cout << "0" << endl; else if (b == "SSR" || b == "RSS") cout << "1" << endl; else if (b == "RRR") cout << "3" << endl; else cout << "2" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a = 0; string b; cin >> b; if (b == "SSS") cout << "0" << endl; else if (b == "RRS" || b == "SRR") cout << "2" << endl; else if (b == "RRR") cout << "3" << endl; else cout << "1" << endl; }
[ "literal.string.change", "control_flow.branch.if.condition.change", "io.output.change" ]
282,628
282,629
u079532978
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { int a = 0; string b; cin >> b; if (b == "SSS") cout << "3" << endl; else if (b == "SSR" || b == "RSS") cout << "2" << endl; else if (b == "RRR") cout << "0" << endl; else cout << "1" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a = 0; string b; cin >> b; if (b == "SSS") cout << "0" << endl; else if (b == "RRS" || b == "SRR") cout << "2" << endl; else if (b == "RRR") cout << "3" << endl; else cout << "1" << endl; }
[ "literal.string.change", "io.output.change", "control_flow.branch.if.condition.change" ]
282,630
282,629
u079532978
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { int a = 0; string b; cin >> b; if (b == "SSS") cout << "3" << endl; else if (b == "SSR" || b == "RSS") cout << "2" << endl; else if (b == "RRR") cout << "0" << endl; else cout << "1" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a = 0; string b; cin >> b; if (b == "SSS") cout << "0" << endl; else if (b == "RRS" || b == "SRR") cout << "2" << endl; else if (b == "RRR") cout << "3" << endl; else cout << "1" << endl; }
[ "literal.string.change", "io.output.change", "control_flow.branch.if.condition.change" ]
282,631
282,629
u079532978
cpp
p02582
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define eb emplace_back const int MAX = 1000000; int main() { ll t; t = 0; while (t--) { string str; cin >> str; ll cnt = 0, ans = 0; for (ll i = 0; str[i]; i++) { if (str[i] == 'R') cnt++...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define eb emplace_back const int MAX = 1000000; int main() { ll t; t = 1; while (t--) { string str; cin >> str; ll cnt = 0, ans = 0; for (ll i = 0; str[i]; i++) { if (str[i] == 'R') cnt++...
[ "literal.number.change", "assignment.value.change" ]
282,634
282,635
u082512737
cpp
p02582
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stdio.h> #include <string> #include <unordered_map> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define repn(i, n) for (int i = 1; i <= n; i++) #define repr(e, x) f...
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stdio.h> #include <string> #include <unordered_map> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define repn(i, n) for (int i = 1; i <= n; i++) #define repr(e, x) f...
[ "variable_declaration.value.change" ]
282,656
282,657
u731886385
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define vi vector<int> #define vll vector<ll> #define vvll vector<vll> #define vvi vector<vector<int>> #define vvb vector<vector<bool>> #define vb vector<bool> #define pii pair<int, int> #define vpli vector<pair<long long, int>> #d...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define vi vector<int> #define vll vector<ll> #define vvll vector<vll> #define vvi vector<vector<int>> #define vvb vector<vector<bool>> #define vb vector<bool> #define pii pair<int, int> #define vpli vector<pair<long long, int>> #d...
[ "control_flow.loop.for.update.change" ]
282,666
282,667
u308723881
cpp
p02582
// #include <bits/stdc++.h> using namespace std; #define PB push_back #define f first #define s second #define what_is(x) cerr << #x << " is " << x << endl; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<int, int> pii; const int INF = 1000000007; const ll MOD = 1000000007; int main() { ios_base::sy...
// #include <bits/stdc++.h> using namespace std; #define PB push_back #define f first #define s second #define what_is(x) cerr << #x << " is " << x << endl; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<int, int> pii; const int INF = 1000000007; const ll MOD = 1000000007; int main() { ios_base::sy...
[ "expression.operation.binary.remove" ]
282,676
282,677
u374512062
cpp
p02582
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <stdio.h> #include <vector> #define N 100010 #define ff first #define ss second #define ll long long #define pb push_back #define mod 1000000007 #define pii pair<ll, ll> using namespace std; string s; i...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <stdio.h> #include <vector> #define N 100010 #define ff first #define ss second #define ll long long #define pb push_back #define mod 1000000007 #define pii pair<ll, ll> using namespace std; string s; i...
[ "call.add", "call.arguments.add" ]
282,686
282,687
u979649250
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s == "RRR") cout << 3 << endl; if (s == "SSS") cout << 0 << endl; if (s == "RRS" || s == "SRR") cout << 2 << endl; else cout << 1 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s == "RRR") cout << 3 << endl; else if (s == "SSS") cout << 0 << endl; else if (s == "RRS" || s == "SRR") cout << 2 << endl; else cout << 1 << endl; return 0; }
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
282,688
282,689
u965787387
cpp
p02582
/* https://codeforces.com/contest/1360/problem/H */ #include <bits/stdc++.h> using namespace std; using ll = long long; using vs = vector<string>; using vi = vector<int>; using vl = vector<ll>; using vb = vector<bool>; using pi = pair<int, int>; using pl = pair<ll, ll>; using vpi = vector<pair<int, int>>; using vpl = ...
/* https://codeforces.com/contest/1360/problem/H */ #include <bits/stdc++.h> using namespace std; using ll = long long; using vs = vector<string>; using vi = vector<int>; using vl = vector<ll>; using vb = vector<bool>; using pi = pair<int, int>; using pl = pair<ll, ll>; using vpi = vector<pair<int, int>>; using vpl = ...
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
282,695
282,696
u595839806
cpp
p02582
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { string s; cin >> s; int ans = 0, ans1 = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') ans1++; else { ans = max(ans, ans1); ans = 0; } } ans = max(ans, ans1); cout << ans; return 0; }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { string s; cin >> s; int ans = 0, ans1 = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') ans1++; else { ans = max(ans, ans1); ans1 = 0; } } ans = max(ans, ans1); cout << ans; return 0; }
[ "assignment.variable.change", "identifier.change" ]
282,697
282,698
u787623491
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string s; int n, i, ans = 0, sum = 0; cin >> s; n = 3; for (i = 0; i < n; i++) { if (s[i] == 'R') { sum++; if (sum > ans) ans = sum; } else { sum = 0; } } cout << sum; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; int n, i, ans = 0, sum = 0; cin >> s; n = 3; for (i = 0; i < n; i++) { if (s[i] == 'R') { sum++; if (sum > ans) ans = sum; } else { sum = 0; } } cout << ans; return 0; }
[ "identifier.change", "io.output.change" ]
282,711
282,712
u410216325
cpp
p02582
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; if (s == "RRR") cout << 3; else if (s == "RRS") cout << 2; else if (s == "SRR") cout << 2; else if (s == "RRR") cout << 0; else cout << 1; }
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; if (s == "RRR") cout << 3; else if (s == "RRS") cout << 2; else if (s == "SRR") cout << 2; else if (s == "SSS") cout << 0; else cout << 1; }
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,718
282,719
u987692976
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define sz size() #define S second #define F first #define all(x) x.begin(), x.end() typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<vector<int>> vvi; void solve() { string s; cin >> s; int cnt = 0; if...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define sz size() #define S second #define F first #define all(x) x.begin(), x.end() typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<vector<int>> vvi; void solve() { string s; cin >> s; int cnt = 0; if...
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change" ]
282,720
282,721
u548444550
cpp
p02582
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(0); cin.tie(0); string s; cin >> s; int ans = 0; if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R') cout << "3\n"; else if ((s[0] == 'R' && s[1] == 'R') || (s[1] == 'R' && s[2] == 'R')) cout << "...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(0); cin.tie(0); string s; cin >> s; int ans = 0; if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R') cout << "3\n"; else if ((s[0] == 'R' && s[1] == 'R') || (s[1] == 'R' && s[2] == 'R')) cout << "...
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
282,726
282,727
u238930677
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e5 + 5; signed main() { string s; cin >> s; int sum = 0; int maxn = -1; for (int i = 0; i < s.size(); i++) { if (s[i] == 'R') sum++, maxn = max(sum, maxn); else sum = 0; } cout << maxn << "\n"; }
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e5 + 5; signed main() { string s; cin >> s; int sum = 0; int maxn = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'R') sum++, maxn = max(sum, maxn); else sum = 0; } cout << maxn << "\n"; }
[ "literal.number.change", "variable_declaration.value.change" ]
282,732
282,733
u523843533
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e5 + 5; signed main() { string s; cin >> s; int sum = 0; int maxn = -1; for (int i = 0; i < s.size(); i++) { if (s[i] == 'R') sum++, maxn = max(sum, maxn); else sum = 0; } cout << sum << "\n"; }
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e5 + 5; signed main() { string s; cin >> s; int sum = 0; int maxn = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'R') sum++, maxn = max(sum, maxn); else sum = 0; } cout << maxn << "\n"; }
[ "literal.number.change", "variable_declaration.value.change", "identifier.change", "io.output.change" ]
282,734
282,733
u523843533
cpp
p02582
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> #define ll long long #define MAX 25 * 1e13 #define N 200010 #define SIZE(A) ((int)A.size()) #define LEN(A) ((int)A.length()) #define MP(A, B) make_pair(A, B) #define PB(X) push_back(X) #de...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> #define ll long long #define MAX 25 * 1e13 #define N 200010 #define SIZE(A) ((int)A.size()) #define LEN(A) ((int)A.length()) #define MP(A, B) make_pair(A, B) #define PB(X) push_back(X) #de...
[ "assignment.add" ]
282,743
282,744
u682965461
cpp
p02582
#include <bits/stdc++.h> #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define int long long #define endl ...
#include <bits/stdc++.h> #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define int long long #define endl ...
[ "assignment.change" ]
282,753
282,754
u748438648
cpp
p02582
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #pragma GCC target("sse4") #include <algorithm> #include <bitset> #include <cassert> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stac...
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #pragma GCC target("sse4") #include <algorithm> #include <bitset> #include <cassert> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stac...
[ "control_flow.branch.if.condition.change" ]
282,759
282,760
u841694668
cpp
p02582
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> PL; #define int ll const ll MOD = 1000000007; const ll INF_LL = (ll)1000000007 * 1000000007; const int INF_INT = (int)1000000007; const double PI = 3.14159265358979323846; const int dx[4] = {1, 0, -1, 0...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> PL; #define int ll const ll MOD = 1000000007; const ll INF_LL = (ll)1000000007 * 1000000007; const int INF_INT = (int)1000000007; const double PI = 3.14159265358979323846; const int dx[4] = {1, 0, -1, 0...
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
282,774
282,775
u322110493
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int m; int c = 0; for (char d : s) { if (d == 'R') { c++; m = max(m, c); } else { c = 0; } } cout << m << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int m = 0; int c = 0; for (char d : s) { if (d == 'R') { c++; m = max(m, c); } else { c = 0; } } cout << m << endl; }
[ "variable_declaration.value.change" ]
282,778
282,779
u435068735
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, m, n) for (int i = (m); i < (n); i++) #define rep(i, n) REP(i, 0, n) #define pb push_back #define all(a) a.begin(), a.end() #define rall(c) (c).rbegin(), (c).rend() #define mp make_pair #define endl '\n' #define vec vector<ll> #define ma...
#include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, m, n) for (int i = (m); i < (n); i++) #define rep(i, n) REP(i, 0, n) #define pb push_back #define all(a) a.begin(), a.end() #define rall(c) (c).rbegin(), (c).rend() #define mp make_pair #define endl '\n' #define vec vector<ll> #define ma...
[ "literal.number.change", "call.arguments.change" ]
282,782
282,783
u339937125
cpp
p02582
#include <bits/stdc++.h> using namespace std; void solve() { string s; cin >> s; int sm = 0, cnt = 0; sm += (s[0] == 'R' ? 1 : 0); cnt = sm; for (int i = 1; i < 2; i++) { if (s[i] == 'R') cnt++; else cnt = 0; sm = max(cnt, sm); } cout << sm << '\n'; } int main() { ios::sync_w...
#include <bits/stdc++.h> using namespace std; void solve() { string s; cin >> s; int sm = 0, cnt = 0; sm += (s[0] == 'R' ? 1 : 0); cnt = sm; for (int i = 1; i <= 2; i++) { if (s[i] == 'R') cnt++; else cnt = 0; sm = max(cnt, sm); } cout << sm << '\n'; } int main() { ios::sync_...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
282,788
282,789
u126793530
cpp
p02582
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; using Graph = vector<vector<int>>; typedef pair<int, int> P; const int MOD = 1000000007; const int INF_32 = 1LL << 30; co...
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; using Graph = vector<vector<int>>; typedef pair<int, int> P; const int MOD = 1000000007; const int INF_32 = 1LL << 30; co...
[ "control_flow.branch.else.add" ]
282,790
282,791
u715366261
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define S size() #define E end() #define B begin() #define L length() #define endl "\n" #define cnt count #define in insert #define er erase #define fi first #define se second #define fl float #define ld long double #define ll long long #define gcd __gcd #define mp make_...
#include <bits/stdc++.h> using namespace std; #define S size() #define E end() #define B begin() #define L length() #define endl "\n" #define cnt count #define in insert #define er erase #define fi first #define se second #define fl float #define ld long double #define ll long long #define gcd __gcd #define mp make_...
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,792
282,793
u295478208
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define int l...
#include <bits/stdc++.h> using namespace std; #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define int l...
[ "literal.number.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
282,796
282,797
u386049672
cpp
p02582
#include <bits/stdc++.h> using namespace std; constexpr long long int mod = 1000000007, MOD = 998244353; constexpr double PI = 3.14159265358979323846; int main() { int A, B, C; string D, E, F; cin >> D; A = 0; for (size_t i = 0; i < 3; i++) { if (D.at(i) == 'R') A++; } if (A != 0 && D.at(1) != ...
#include <bits/stdc++.h> using namespace std; constexpr long long int mod = 1000000007, MOD = 998244353; constexpr double PI = 3.14159265358979323846; int main() { int A, B, C; string D, E, F; cin >> D; A = 0; for (size_t i = 0; i < 3; i++) { if (D.at(i) == 'R') A++; } if (A == 2 && D.at(1) != ...
[]
282,798
282,799
u627214330
cpp
p02582
#include <algorithm> #include <cstdio> using namespace std; char buf[5]; int main() { scanf("%s", buf); int ans = 0; int cur = 0; for (int i = 0; i < 3; i++) { if (buf[cur] == 'S') cur = 0; else cur++, ans = max(ans, cur); } printf("%d\n", ans); return 0; }
#include <algorithm> #include <cstdio> using namespace std; char buf[5]; int main() { scanf("%s", buf); int ans = 0; int cur = 0; for (int i = 0; i < 3; i++) { if (buf[i] == 'S') cur = 0; else cur++, ans = max(ans, cur); } printf("%d\n", ans); return 0; }
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
282,815
282,816
u406669772
cpp
p02582
#include <algorithm> #include <cctype> #include <cmath> #include <cstdlib> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long...
#include <algorithm> #include <cctype> #include <cmath> #include <cstdlib> #include <iomanip> #include <iostream> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long...
[ "expression.operation.binary.remove" ]
282,817
282,818
u544397444
cpp
p02582
#include <bits/stdc++.h> #define pb push_back typedef long long ll; using namespace std; int main() { string s; cin >> s; int cnt = 0; if (s[0] == 'R' or s[1] == 'R' or s[2] == 'R') cnt = 1; if ((s[0] == s[1] and s[0] == 'R') or (s[0] == s[1] and s[0] == 'R')) cnt = 2; if (s[0] == 'R' and s[1] == 'R...
#include <bits/stdc++.h> #define pb push_back typedef long long ll; using namespace std; int main() { string s; cin >> s; int cnt = 0; if (s[0] == 'R' or s[1] == 'R' or s[2] == 'R') cnt = 1; if ((s[0] == s[1] and s[0] == 'R') or (s[1] == s[2] and s[1] == 'R')) cnt = 2; if (s[0] == 'R' and s[1] == 'R...
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
282,819
282,820
u559654669
cpp
p02582
#include <bits/stdc++.h> using namespace std; void solve() { string s; cin >> s; if (s == "RRR") { cout << 3 << endl; } else if (s == "RRS" || "SRR") { cout << 2 << endl; } else if (s == "SSS") { cout << 0 << endl; } else { cout << 1 << endl; } } int main() { long long m; m = 1; w...
#include <bits/stdc++.h> using namespace std; void solve() { string s; cin >> s; if (s == "RRR") { cout << 3 << endl; } else if (s == "RRS" || s == "SRR") { cout << 2 << endl; } else if (s == "SSS") { cout << 0 << endl; } else { cout << 1 << endl; } } int main() { long long m; m = 1...
[ "control_flow.branch.if.condition.change" ]
282,825
282,826
u855709113
cpp
p02582
#include <bits/stdc++.h> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) #define ll long long #define all(a) a.begin(), a.end() using namespace std; int main() { char a, b, c; cin >> a >> b >> c; char r = 'R'; if (a == r && b == r && c == r) cout << 3 << endl; else if ((a == r && b == r) ...
#include <bits/stdc++.h> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) #define ll long long #define all(a) a.begin(), a.end() using namespace std; int main() { char a, b, c; cin >> a >> b >> c; char r = 'R'; if (a == r && b == r && c == r) cout << 3 << endl; else if ((a == r && b == r) ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
282,827
282,828
u912766486
cpp
p02582
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { string s; int Max = 0; cin >> s; int a = s.size(); int sum = 0; if (s[0] == 'R') sum++; for (int i = 1; i < a; i++) { if (s[i] == s[i - 1] && s[i] == 'R') sum++; else if (s[i] == 'R' && s[i - 1] == 'S') ...
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { string s; int Max = 0; cin >> s; int a = s.size(); int sum = 0; if (s[0] == 'R') sum++; Max = sum; for (int i = 1; i < a; i++) { if (s[i] == s[i - 1] && s[i] == 'R') sum++; else if (s[i] == 'R' && s[i - 1] ...
[ "assignment.add", "identifier.change", "io.output.change" ]
282,849
282,850
u916695530
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define FASTER \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) typedef long long...
#include <bits/stdc++.h> using namespace std; #define FASTER \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) typedef long long...
[]
282,857
282,858
u299123532
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define FASTER \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) typedef long long...
#include <bits/stdc++.h> using namespace std; #define FASTER \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) typedef long long...
[ "assignment.add" ]
282,859
282,858
u299123532
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < 3; i++) { if (S[i] == 'R') ans = 1; } if (S[0] == S[1] && S[0] == 'R') ans = 2; if (S[2] == S[2] && S[1] == 'R') ans = 2; if (S[0] == S[1] && S[1] == S[2] && S[0] == 'R') ...
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < 3; i++) { if (S[i] == 'R') ans = 1; } if (S[0] == S[1] && S[0] == 'R') ans = 2; if (S[1] == S[2] && S[1] == 'R') ans = 2; if (S[0] == S[1] && S[1] == S[2] && S[0] == 'R') ...
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
282,862
282,863
u650243369
cpp
p02582
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; // DEEP using namespace std; #define boost \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; // DEEP using namespace std; #define boost \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[ "assignment.add" ]
282,864
282,865
u915716225
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; const int MAX = 3000000; const int MOD = 1000000007; int main() { string s; cin >> s; int rain = 0, sun = 0; rep(i, 3) { if (s[i] == 'R') rain++; else sun++; } if (s == ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; const int MAX = 3000000; const int MOD = 1000000007; int main() { string s; cin >> s; int rain = 0, sun = 0; rep(i, 3) { if (s[i] == 'R') rain++; else sun++; } if (s == ...
[ "literal.string.change", "literal.string.case.change", "control_flow.branch.if.condition.change" ]
282,866
282,867
u478911746
cpp
p02582
#include <bits/stdc++.h> #include <stdlib.h> using namespace std; #define ll long long #define ld long double #define pb push_back #define pr pair<ll, ll> #define vct vector<ll> #define vpt vector<pr> #define st set<ll> #define pq priority_queue<ll> #define mat vector<vector<ll>> #define all(x) x.begin(), x.end() #def...
#include <bits/stdc++.h> #include <stdlib.h> using namespace std; #define ll long long #define ld long double #define pb push_back #define pr pair<ll, ll> #define vct vector<ll> #define vpt vector<pr> #define st set<ll> #define pq priority_queue<ll> #define mat vector<vector<ll>> #define all(x) x.begin(), x.end() #def...
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "call.add" ]
282,870
282,871
u176464463
cpp
p02582
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<bool> vb; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pii> vpii; typedef vector<pll> vpl; typedef vector<vi> vvi; typedef vector<vll> vvll; void __print(int x) {...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<bool> vb; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pii> vpii; typedef vector<pll> vpl; typedef vector<vi> vvi; typedef vector<vll> vvll; void __print(int x) {...
[ "assignment.add" ]
282,875
282,876
u955539037
cpp
p02582
#include <bits/stdc++.h> #define ll long long #define ld long double #define pb push_back #define ip pair<ll, ll> #define vii vector<ll> #define vpp vector<ip> #define vdd vector<ld> #define vb vector<bool> #define pi pair<ll, ip> #define sc(x) scanf("%lli", &x) #define c(x) cin >> x #define fo(i, k, n) for (int i = k;...
#include <bits/stdc++.h> #define ll long long #define ld long double #define pb push_back #define ip pair<ll, ll> #define vii vector<ll> #define vpp vector<ip> #define vdd vector<ld> #define vb vector<bool> #define pi pair<ll, ip> #define sc(x) scanf("%lli", &x) #define c(x) cin >> x #define fo(i, k, n) for (int i = k;...
[ "control_flow.continue.remove", "control_flow.break.add" ]
282,877
282,878
u701558984
cpp
p02582
#include <bits/stdc++.h> #include <string> using namespace std; int main() { string str; int i, r = 0; cin >> str; for (i = 0; i < 2; i++) { if (str[i] == 'R') r++; } if (r == 2) { if (str[0] == 'R' && str[2] == 'R') cout << 1; else cout << 2; } else cout << r; return ...
#include <bits/stdc++.h> #include <string> using namespace std; int main() { string str; int i, r = 0; cin >> str; for (i = 0; i < 3; i++) { if (str[i] == 'R') r++; } if (r == 2) { if (str[0] == 'R' && str[2] == 'R') cout << 1; else cout << 2; } else cout << r; return ...
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
282,883
282,884
u089173009
cpp
p02582
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <string> #include <tuple> #include <vector> #define rep(i, n) for (int i = 0; i < (int)n; i++) // n回繰り返す #define rrep(i, n) for...
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <string> #include <tuple> #include <vector> #define rep(i, n) for (int i = 0; i < (int)n; i++) // n回繰り返す #define rrep(i, n) for...
[ "assignment.add" ]
282,885
282,886
u690272026
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string str; int n; n = 0; cin >> str; for (int i = 0; i < str.size(); i++) { if (str.at(i) == 'S') { n = n + 1; } } if (n != 2) { cout << n << endl; } else if (str.at(1) == 'S') { cout << n << endl; } else { cout ...
#include <bits/stdc++.h> using namespace std; int main() { string str; int n; n = 0; cin >> str; for (int i = 0; i < str.size(); i++) { if (str.at(i) == 'R') { n = n + 1; } } if (n != 2) { cout << n << endl; } else if (str.at(1) == 'R') { cout << n << endl; } else { cout ...
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,891
282,892
u831314901
cpp
p02582
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int MOD = (int)1e9 + 7; const double PI = 3.14159265358979323846; int main(void) { string s; cin >> s; int res = 0; rep(i, 3) { if (s[i] == 'R') res++; } if (s[2] != 'R' && re...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int MOD = (int)1e9 + 7; const double PI = 3.14159265358979323846; int main(void) { string s; cin >> s; int res = 0; rep(i, 3) { if (s[i] == 'R') res++; } if (s[1] != 'R' && re...
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
282,895
282,896
u442523045
cpp
p02582
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int MOD = (int)1e9 + 7; const double PI = 3.14159265358979323846; int main(void) { string s; cin >> s; int res = 0; rep(i, 3) { if (s[i] == 'R') res++; } if (s[2] != 'R' && re...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int MOD = (int)1e9 + 7; const double PI = 3.14159265358979323846; int main(void) { string s; cin >> s; int res = 0; rep(i, 3) { if (s[i] == 'R') res++; } if (s[1] != 'R' && re...
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "expression.operator.compare.change" ]
282,897
282,896
u442523045
cpp
p02582
#include <bits/stdc++.h> #define pii pair<int, int> #define fi first #define se second #define int long long #define pb push_back #define mod 1000000007 #define pll pair<long long, long long> using namespace std; long long power(long long a, long long b) { long long ans = 1; while (b > 0) { if (b & 1) { a...
#include <bits/stdc++.h> #define pii pair<int, int> #define fi first #define se second #define int long long #define pb push_back #define mod 1000000007 #define pll pair<long long, long long> using namespace std; long long power(long long a, long long b) { long long ans = 1; while (b > 0) { if (b & 1) { a...
[ "call.add", "call.arguments.change" ]
282,898
282,899
u828869971
cpp
p02582
#include <iomanip> #include <iostream> using namespace std; void Main() { // input string S; cin >> S; int count = 0; if (S == "RSR") { count = 1; cout << 2 << endl; return; } for (int i = 0; i < 3; i++) { if (S[i] == 'R') { while (S[i] == 'R') { count++; i++; ...
#include <iomanip> #include <iostream> using namespace std; void Main() { // input string S; cin >> S; int count = 0; if (S == "RSR") { count = 1; cout << count << endl; return; } for (int i = 0; i < 3; i++) { if (S[i] == 'R') { while (S[i] == 'R') { count++; i++...
[ "identifier.replace.add", "literal.replace.remove", "io.output.change" ]
282,904
282,905
u798361174
cpp
p02582
#include <iomanip> #include <iostream> using namespace std; void Main() { // input string S; cin >> S; int count = 0; if (S == "RSR") { count = 2; cout << 2 << endl; return; } for (int i = 0; i < 3; i++) { if (S[i] == 'R') { while (S[i] == 'R') { count++; i++; ...
#include <iomanip> #include <iostream> using namespace std; void Main() { // input string S; cin >> S; int count = 0; if (S == "RSR") { count = 1; cout << count << endl; return; } for (int i = 0; i < 3; i++) { if (S[i] == 'R') { while (S[i] == 'R') { count++; i++...
[ "literal.number.change", "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "io.output.change" ]
282,906
282,905
u798361174
cpp
p02582
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main() { string s; cin >> s; if (s.size() < 3) { cout << 0 << endl; return 0; } int count = 1, flag = 0; for (int i = 0; i < s.size() - 1; i++) { if (s[i] == 'R') flag = 1; if...
#include <algorithm> #include <iostream> #include <vector> typedef long long ll; using namespace std; int main() { string s; cin >> s; if (s.size() < 3) { cout << 0 << endl; return 0; } int count = 1, flag = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'R') flag = 1; if (s[...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
282,911
282,912
u627223378
cpp
p02582
#include <algorithm> #include <bitset> #include <chrono> #include <cmath> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #def...
#include <algorithm> #include <bitset> #include <chrono> #include <cmath> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> #def...
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
282,917
282,918
u982234424
cpp
p02582
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define sz(x) int(x.size()) #define pb push_back #define eb emplace_back using ll = long long; using P = pair<int, int>; using LP = pair<ll, int>; #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) const ll MO...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define sz(x) int(x.size()) #define pb push_back #define eb emplace_back using ll = long long; using P = pair<int, int>; using LP = pair<ll, int>; #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) const ll MO...
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
282,925
282,926
u387221709
cpp
p02582
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int k = 0, l; for (int i = 0; i < 3; i++) { if (s[i] == 'R') k++; else { if (k > 0) l = k; k = 0; } } if (k > 0) l = k; cout << l; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int k = 0, l = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') k++; else { if (k > 0) l = k; k = 0; } } if (k > 0) l = k; cout << l; return 0; }
[ "variable_declaration.value.change" ]
282,932
282,933
u226475436
cpp
p02582
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define pii pair<int, int> using namespace std; long long mod = 1000000007; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; // cin>>t; while (t--) { string s; cin >> s; int cnt = 0; ...
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define pii pair<int, int> using namespace std; long long mod = 1000000007; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; // cin>>t; while (t--) { string s; cin >> s; int cnt = 0; ...
[ "literal.number.change", "control_flow.loop.condition.change" ]
282,938
282,939
u073315560
cpp
p02582
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod = 1e5 + 7; const int N = 1e5 + 5; int main() { string s; cin >> s; int cnt = 0; for (int i = 0; i < 2; i++) if (s[i] == 'R') cnt++; if (cnt == 3 || cnt == 0 || cnt == 1) cout << cnt << endl; else if (s[1] == 'R'...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod = 1e5 + 7; const int N = 1e5 + 5; int main() { string s; cin >> s; int cnt = 0; for (int i = 0; i <= 2; i++) if (s[i] == 'R') cnt++; if (cnt == 3 || cnt == 0 || cnt == 1) cout << cnt << endl; else if (s[1] == 'R...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
282,940
282,941
u718362745
cpp
p02582
using namespace std; #include <bits/stdc++.h> int main() { string s; cin >> s; int ans = 0, count = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'R') { count++; } else { ans = max(ans, count); count = 0; } } cout << ans << endl; return 0; }
using namespace std; #include <bits/stdc++.h> int main() { string s; cin >> s; int ans = 0, count = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'R') { count++; ans = max(ans, count); } else { count = 0; } } cout << ans << endl; return 0; }
[ "control_flow.branch.else.add" ]
282,950
282,951
u572787531
cpp
p02582
#include <iostream> signed main() { std::string s; std::cin >> s; int max = 0, count = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == 'S') { count++; max = std::max(max, count); } else count = 0; } std::cout << max << std::endl; return 0; }
#include <iostream> signed main() { std::string s; std::cin >> s; int max = 0, count = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == 'R') { count++; max = std::max(max, count); } else count = 0; } std::cout << max << std::endl; return 0; }
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
282,954
282,955
u923848310
cpp
p02582
#include <bits/stdc++.h> #define Fast \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define Freed freopen("0in.txt", "r",...
#include <bits/stdc++.h> #define Fast \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define Freed freopen("0in.txt", "r",...
[ "control_flow.branch.if.condition.change" ]
282,960
282,961
u224216923
cpp
p02582
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; int ans = 0, cnt = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') cnt++; else { ans = max(cnt, ans); cnt = 0; } } cout << ans << endl; return 0; }
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; int ans = 0, cnt = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') cnt++; else { ans = max(cnt, ans); cnt = 0; } } cout << max(cnt, ans) << endl; return 0; }
[ "call.add", "call.arguments.change" ]
282,964
282,965
u028582153
cpp
p02582
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #inc...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #inc...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change" ]
282,980
282,981
u048588980
cpp
p02582
/* ___ _ _ _ _ _____ |_ | | | | \ | | _ | | | | | | \| | | | | | | | | | . ` | | | | /\__/ / |_| | |\ \ \_/ / \____/ \___/\_| \_/\___/ * ...
/* ___ _ _ _ _ _____ |_ | | | | \ | | _ | | | | | | \| | | | | | | | | | . ` | | | | /\__/ / |_| | |\ \ \_/ / \____/ \___/\_| \_/\___/ * ...
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove", "identifier.change", "io.output.change" ]
282,984
282,985
u926424693
cpp