buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#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 ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
102
#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...
[["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 9, 0, 57, 64, 9, 0, 1, 0, 35]]
1
265
renzoku = 0 S = input() for i, weather in enumerate(S): if not weather == "R": continue if i == 0: renzoku += 1 try: if S[i+1] == "R": renzoku += 1 except: continue print(renzoku)
renzoku = 0 S = input() for i, weather in enumerate(S): if not weather == "R": continue if renzoku == 0: renzoku += 1 try: if S[i+1] == "R": renzoku += 1 except: continue print(renzoku)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22]]
5
59
#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 ...
[["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]]
1
112
s=input() if s.count("S")==0: print(0) elif s.count("S")==1: print(1) elif s.count("S")==3: print(3) else: if s[1]=="S": print(2) else: print(1)
s=input() if s.count("R")==0: print(0) elif s.count("R")==1: print(1) elif s.count("R")==3: print(3) else: if s[1]=="R": print(2) else: print(1)
[["-", 15, 666, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 15, 666, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6]]
5
75
#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...
[["-", 51, 16, 31, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 16, 31, 16, 31, 69, 341, 342, 0, 13]]
1
106
#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...
[["+", 8, 9, 0, 1, 0, 16, 12, 2, 63, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 25]]
1
236
#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++...
[["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
132
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int max = 0; int count = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == 'S') { count++; } else { count = 0; } ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int max = 0; int count = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == 'R') { count++; } else { count = 0; } ...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 252], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 252]]
3
118
#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[...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
142
#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...
[["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95]]
1
281
S = input() cnt = 0 for i in S: if i == 'R': cnt += 1 cnt_max = cnt else: cnt = 0 print(cnt_max)
S = input() cnt = 0 cnt_max = 0 for i in S: if i == 'R': cnt += 1 cnt_max = cnt else: cnt = 0 print(cnt_max)
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
35
import java.io.*; import java.lang.*; import java.math.*; import java.util.*; // import java.text.DecimalFormat; // import java.text.DecimalFormatSymbols; // Warning: Printing unwanted or ill-formatted data to output will cause the // test cases to fail public class Main { public static void main(String args[]) t...
import java.io.*; import java.lang.*; import java.math.*; import java.util.*; // import java.text.DecimalFormat; // import java.text.DecimalFormatSymbols; // Warning: Printing unwanted or ill-formatted data to output will cause the // test cases to fail public class Main { public static void main(String args[]) t...
[["-", 8, 196, 0, 1, 0, 492, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 22]]
3
336
#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...
[["+", 75, 76, 0, 9, 0, 57, 75, 76, 0, 95]]
1
216
s = input() maxCount = 0 count = 0 for i in s: if(i == 'R'): count += 1 else: maxCount = max(count, maxCount) count = 0 print(maxCount)
s = input() maxCount = 0 count = 0 for i in s: if(i == 'R'): count += 1 else: maxCount = max(count, maxCount) count = 0 print(max(count, maxCount))
[["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
45
#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; ...
[["-", 0, 52, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 52, 8, 9, 0, 7, 15, 16, 12, 13]]
1
165
#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...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
123
s=input() if s[0]=="R" and s[1]=="R" and s[2]=="R": print(3) elif s[0]=="R" and s[1]=="R": print(2) elif s[0]=="R" and s[2]=="R": print(2) elif s=="SSS": print(0) else: print(1)
s=input() if s[0]=="R" and s[1]=="R" and s[2]=="R": print(3) elif s[0]=="R" and s[1]=="R": print(2) elif s[1]=="R" and s[2]=="R": print(2) elif s=="SSS": print(0) else: print(1)
[["-", 75, 665, 15, 679, 31, 666, 0, 206, 206, 612], ["+", 75, 665, 15, 679, 31, 666, 0, 206, 206, 612]]
5
100
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; }
[["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45]]
1
89
S = str(input()) cnt = 0 cnt1 = 0 for i in range(len(S)): if S[i] == "R": cnt += 1 if S[i] == "S": cnt1 = cnt cnt = 0 if cnt > cnt1: print(cnt) else: print(cnt1)
S = str(input()) cnt = 0 cnt1 = 0 for i in range(len(S)): if S[i] == "R": cnt += 1 if S[i] == "S": cnt1 = max(cnt,cnt1) cnt = 0 if cnt > cnt1: print(cnt) else: print(cnt1)
[["+", 64, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
69
#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; }
[["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]]
1
93
A = input() if 'R' not in A: print(0) elif 'S' not in A: print(3) elif 'RR' in A: print(2) elif 'SS' in A: print(1)
A = input() if 'R' not in A: print(0) elif 'S' not in A: print(3) elif 'RR' in A: print(2) elif 'SS' or 'R' in A: print(1)
[["+", 0, 656, 0, 57, 75, 665, 15, 679, 17, 354], ["+", 75, 665, 15, 679, 12, 666, 0, 557, 0, 654], ["+", 75, 665, 15, 679, 12, 666, 0, 557, 0, 6], ["+", 75, 665, 15, 679, 12, 666, 0, 557, 0, 655]]
5
51
#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",...
[["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 104], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]]
1
218
#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; }
[["+", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 21], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]]
1
87
s=input() ans=1 for i in range(1,4): if s.count("R"*i): ans=max(ans,i) print(ans)
s=input() ans=0 for i in range(1,4): if s.count("R"*i): ans=max(ans,i) print(ans)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
42
#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...
[["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22]]
1
227
s=input() if s == 'RRR': print(3) elif s.count('RR') == 1: print(2) elif s.count('R') > 1: print(1) else: print(0)
s=input() if s == 'RRR': print(3) elif s.count('RR') == 1: print(2) elif s.count('R') >= 1: print(1) else: print(0)
[["-", 0, 656, 0, 57, 75, 665, 15, 666, 667, 47], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 20]]
5
54
/* ___ _ _ _ _ _____ |_ | | | | \ | | _ | | | | | | \| | | | | | | | | | . ` | | | | /\__/ / |_| | |\ \ \_/ / \____/ \___/\_| \_/\___/ * ...
/* ___ _ _ _ _ _____ |_ | | | | \ | | _ | | | | | | \| | | | | | | | | | . ` | | | | /\__/ / |_| | |\ \ \_/ / \____/ \___/\_| \_/\___/ * ...
[["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
276
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; const double pi = 3.14159265358979323846; #define all(s) s.begin(), s.end() #define speed \ ios_base::sync_with_stdio(0); ...
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double ld; const double pi = 3.14159265358979323846; #define all(s) s.begin(), s.end() #define speed \ ios_base::sync_with_stdio(0); ...
[["-", 75, 76, 0, 1, 0, 34, 31, 11, 31, 22], ["+", 75, 76, 0, 1, 0, 34, 31, 11, 31, 22]]
1
159
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s; cin >> s; int ans = 0; if (s[0] == s[1] && s[1] == s[2] && s[0] == 'R') ans = 3; else if (s[0] == s[1] && s[0] == 'R') ans = 2; else if (s[1] == s[2] && s[0] == 'R') ans = 2...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s; cin >> s; int ans = 0; if (s[0] == s[1] && s[1] == s[2] && s[0] == 'R') ans = 3; else if (s[0] == s[1] && s[0] == 'R') ans = 2; else if (s[1] == s[2] && s[1] == 'R') ans = 2...
[["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13]]
1
159
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; if (s.find("RRR") != string::npos) puts("3"); else if (s.find("RR") != string::npos) puts("2"); else if (s.find("R") != string::npos) puts("1"); else puts("1"); return 0; }
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; if (s.find("RRR") != string::npos) puts("3"); else if (s.find("RR") != string::npos) puts("2"); else if (s.find("R") != string::npos) puts("1"); else puts("0"); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
100
#include "bits/stdc++.h" #define rep(i, n) for (ll i = 0; i < n; ++i) #define ALL(x) x.begin(), x.end() using namespace std; typedef long long ll; template <typename T> T gcd(T a, T b) { if (a % b == 0) { return (b); } else { return (gcd(b, a % b)); } } template <typename T> T lcm(T a, T b) { return a ...
#include "bits/stdc++.h" #define rep(i, n) for (ll i = 0; i < n; ++i) #define ALL(x) x.begin(), x.end() using namespace std; typedef long long ll; template <typename T> T gcd(T a, T b) { if (a % b == 0) { return (b); } else { return (gcd(b, a % b)); } } template <typename T> T lcm(T a, T b) { return a ...
[["+", 8, 9, 0, 1, 0, 16, 12, 2, 63, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 25]]
1
167
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); string s; cin >> s; int ans = 0, num = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'S') num++; else { ans = max(num, ans); num = 0; } } ans = max(num, ans); cout << ...
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); string s; cin >> s; int ans = 0, num = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') num++; else { ans = max(num, ans); num = 0; } } ans = max(num, ans); cout << ...
[["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]]
1
111
#include <stdio.h> char s[4]; int main() { scanf("%s", &s); if (s[0] == 'R' && s[2] == 'R' && s[3] == 'R') { printf("3\n"); return 0; } if ((s[0] == 'R' && s[1] == 'R') || (s[1] == 'R' && s[2] == 'R')) { printf("2\n"); return 0; } if (s[0] == 'R' || s[1] == 'R' || s[2] == 'R') { printf("...
#include <stdio.h> char s[4]; int main() { scanf("%s", &s); if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R') { printf("3\n"); return 0; } if ((s[0] == 'R' && s[1] == 'R') || (s[1] == 'R' && s[2] == 'R')) { printf("2\n"); return 0; } if (s[0] == 'R' || s[1] == 'R' || s[2] == 'R') { printf("...
[["-", 31, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 31, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13]]
1
171
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { string s; cin >> s; int ans = 1; if (s == "RRR") ans = 3; else if (s == "SRR" || s == "RRS" || s == "RSR") ans = 2; else if (s == "SSS") ans ...
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { string s; cin >> s; int ans = 1; if (s == "RRR") ans = 3; else if (s == "SRR" || s == "RRS") ans = 2; else if (s == "SSS") ans = 0; cout <<...
[["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 62], ["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6]]
1
107
S = input() cnt = 0 ans = 0 for i in range(3): if S[i] == "R": cnt += 1 ans = max(cnt, ans) else: cnt = 0 print(cnt)
S = input() cnt = 0 ans = 0 for i in range(3): if S[i] == "R": cnt += 1 ans = max(cnt, ans) else: cnt = 0 print(ans)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
49
#include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using ll = long long; #define ...
#include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using ll = long long; #define ...
[["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60]]
1
283
ans = 0 answer = [] S = input() for s in S: if s == "R": ans += 1 else: answer.append(ans) ans = 0 print(max(answer))
ans = 0 answer = [] S = input() for s in S: if s == "R": ans += 1 else: answer.append(ans) ans = 0 answer.append(ans) print(max(answer))
[["+", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
45
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int c = 0; int res = 0; for (int i = 0; i < 3; i++) { if (s.at(i) == 'S') c++; else { res = max(res, c); c = 0; } } res = max(res, c); cout << res << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int c = 0; int res = 0; for (int i = 0; i < 3; i++) { if (s.at(i) == 'R') c++; else { res = max(res, c); c = 0; } } res = max(res, c); cout << res << endl; }
[["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]]
1
92
import java.awt.image.BandedSampleModel; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Array; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String a...
import java.awt.image.BandedSampleModel; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Array; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String a...
[["-", 64, 196, 0, 1, 0, 492, 3, 4, 0, 499], ["+", 64, 196, 0, 1, 0, 492, 3, 4, 0, 499], ["-", 75, 196, 0, 1, 0, 492, 3, 4, 0, 499], ["+", 75, 196, 0, 1, 0, 492, 3, 4, 0, 499]]
3
193
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long #define pb push_back #define ppb pop_back #define endl '\n' #define mii map<ll, ll> #define pii pair<ll, ll> #define vi vector<ll> #define vs vector<string> #define all(a) (a).begin(), (a).end() ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long #define pb push_back #define ppb pop_back #define endl '\n' #define mii map<ll, ll> #define pii pair<ll, ll> #define vi vector<ll> #define vs vector<string> #define all(a) (a).begin(), (a).end() ...
[["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]]
1
416
s = gets.chomp if s == "RRR" puts 0 elsif s == "SSS" puts 3 elsif s == "RRS" || s == "SRR" puts 2 else puts 1 end
s = gets.chomp if s == "RRR" puts 3 elsif s == "SSS" puts 0 elsif s == "RRS" || s == "SRR" puts 2 else puts 1 end
[["-", 0, 121, 64, 749, 0, 652, 3, 4, 0, 612], ["+", 0, 121, 64, 749, 0, 652, 3, 4, 0, 612], ["-", 75, 759, 64, 749, 0, 652, 3, 4, 0, 612], ["+", 75, 759, 64, 749, 0, 652, 3, 4, 0, 612]]
4
39
s = input() ans = 0 tmp = 0 for i in range(3): if s[i] == 'R': tmp += 1 else: ans = max(ans, tmp) tmp = 0 print(ans)
s = input() ans = 0 tmp = 0 for i in range(3): if s[i] == 'R': tmp += 1 else: ans = max(ans, tmp) tmp = 0 print(max(ans, tmp))
[["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
49
/* * TEMPLATE BY LOUIS NAVARRO * FREE OF USE * (inspired by other templates) */ #include <bits/stdc++.h> using namespace std; /* * * TYPE DEFINITIONS * */ // Basic types #define uint unsigned int #define ull unsigned long long #define ll long long #define ld long double // Vectors #define vt vector #define...
/* * TEMPLATE BY LOUIS NAVARRO * FREE OF USE * (inspired by other templates) */ #include <bits/stdc++.h> using namespace std; /* * * TYPE DEFINITIONS * */ // Basic types #define uint unsigned int #define ull unsigned long long #define ll long long #define ld long double // Vectors #define vt vector #define...
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 8, 9, 0, 14, 8, 9, 0, 1, 0, 35]]
1
1,313
#include <algorithm> #include <bitset> #include <cctype> #include <cstdlib> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include ...
#include <algorithm> #include <bitset> #include <cctype> #include <cstdlib> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include ...
[["-", 51, 16, 31, 16, 12, 16, 12, 5, 0, 6], ["-", 51, 16, 31, 16, 12, 16, 12, 5, 0, 62], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 62]]
1
788
#include <bits/stdc++.h> using namespace std; #define ll long long #define vl vector<ll> #define vi vector<int> #define pi pair<int, int> #define pl pair<ll, ll> #define all(a) a.begin(), a.end() #define mem(a, x) memset(a, x, sizeof(a)) #define pb push_back #define mp make_pair #define F first #define S second #define...
#include <bits/stdc++.h> using namespace std; #define ll long long #define vl vector<ll> #define vi vector<int> #define pi pair<int, int> #define pl pair<ll, ll> #define all(a) a.begin(), a.end() #define mem(a, x) memset(a, x, sizeof(a)) #define pb push_back #define mp make_pair #define F first #define S second #define...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
337
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define fori(a, b) for (int i = a; i < b; i++) #define forj(a, b) for (int j = a; j < b; j++) #define ford(b, a) for (int i = b; i >= a; i--) typedef pair<int, int> pi; #define PI 3.14159265359 #define vi vector<int> long long mod ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define fori(a, b) for (int i = a; i < b; i++) #define forj(a, b) for (int j = a; j < b; j++) #define ford(b, a) for (int i = b; i >= a; i--) typedef pair<int, int> pi; #define PI 3.14159265359 #define vi vector<int> long long mod ...
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
246
S = list(input()) ans = 0 day = 0 for i in range(len(S)): if S[i]=="R": day+=1 else: ans = max(ans,day) day=0 print(ans)
S = list(input()) ans = 0 day = 0 for i in range(len(S)): if S[i]=="R": day+=1 else: ans = max(ans,day) day=0 print(max(ans,day))
[["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
55
#include <bits/stdc++.h> using namespace std; #define fs first #define sc second #define pb push_back #define mp make_pair #define eb emplace_back #define ALL(A) A.begin(), A.end() #define RALL(A) A.rbegin(), A.rend() typedef long long ll; typedef pair<ll, ll> P; const ll mod = 1000000007; const ll LINF = 1LL << 60; co...
#include <bits/stdc++.h> using namespace std; #define fs first #define sc second #define pb push_back #define mp make_pair #define eb emplace_back #define ALL(A) A.begin(), A.end() #define RALL(A) A.rbegin(), A.rend() typedef long long ll; typedef pair<ll, ll> P; const ll mod = 1000000007; const ll LINF = 1LL << 60; co...
[["+", 0, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25]]
1
223
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; void solve() { int ct = 0; int mx = INT_MIN; string str; cin >> str; for (int i = 0; i < str.length(); i++) { if (str[i] == 'R') ct++; else { mx = max(ct, mx); } } mx = max(ct, mx); c...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; void solve() { int ct = 0; int mx = INT_MIN; string str; cin >> str; for (int i = 0; i < str.length(); i++) { if (str[i] == 'R') ct++; else { mx = max(ct, mx); ct = 0; } } mx = ma...
[["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]]
1
138
#include <iomanip> #include <iostream> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main(void) { ios::sync_with_stdio(false); string S; cin >> S; int answer = 0; int seq = 0; rep(i, 3) { if (S[i] == 'S') { answer = max(seq, answer); answer = 0; ...
#include <iomanip> #include <iostream> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main(void) { ios::sync_with_stdio(false); string S; cin >> S; int answer = 0; int seq = 0; rep(i, 3) { if (S[i] == 'S') { answer = max(seq, answer); seq = 0; ...
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22]]
1
108
#include <algorithm> #include <iostream> #include <math.h> #include <numeric> #include <queue> #include <string> #include <vector> #define all(x) (x).begin(), (x).end() typedef long long ll; const ll MOD = 1000000007; using namespace std; int main() { string S; cin >> S; if (S.substr(0, 3) == "RRR") cout <<...
#include <algorithm> #include <iostream> #include <math.h> #include <numeric> #include <queue> #include <string> #include <vector> #define all(x) (x).begin(), (x).end() typedef long long ll; const ll MOD = 1000000007; using namespace std; int main() { string S; cin >> S; if (S.substr(0, 3) == "RRR") cout <<...
[["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6], ["+", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6]]
1
125
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 0; if (s == "RRR") cout << 3 << endl; else if (s == "RRS" || s == "SRR") cout << 2 << endl; else if (s == "SSS") cout << 0 << endl; else cout << 0 << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 0; 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; }
[["-", 75, 76, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 75, 76, 0, 1, 0, 16, 31, 16, 12, 13]]
1
81
s = input() if s.count("R"): if s.count("RR"): if s.count("RRR"): print(3) else: print(2) else: print(1) print(0)
s = input() if s.count("R"): if s.count("RR"): if s.count("RRR"): print(3) else: print(2) else: print(1) else: print(0)
[["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102]]
5
55
#include <bits/stdc++.h> #define ALL(x) (x).begin(), (x).end() #define RALL(x) (x).rbegin(), (x).rend() #define FSP(x) fixed << setprecision(x) using namespace std; using ll = long long; constexpr ll INF = LLONG_MAX; constexpr long double PI = acosl(-1); void Yes() { cout << "Yes\n"; } void No() { cout << "No\n"; } voi...
#include <bits/stdc++.h> #define ALL(x) (x).begin(), (x).end() #define RALL(x) (x).rbegin(), (x).rend() #define FSP(x) fixed << setprecision(x) using namespace std; using ll = long long; constexpr ll INF = LLONG_MAX; constexpr long double PI = acosl(-1); void Yes() { cout << "Yes\n"; } void No() { cout << "No\n"; } voi...
[["-", 0, 7, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 51, 22]]
1
188
#include <algorithm> #include <chrono> #include <cmath> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <tuple> #include <vector> using namespace std; typedef long long ll; typedef long double ld; #define fastInp ...
#include <algorithm> #include <chrono> #include <cmath> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <tuple> #include <vector> using namespace std; typedef long long ll; typedef long double ld; #define fastInp ...
[["-", 51, 16, 31, 16, 12, 16, 12, 5, 0, 6], ["-", 51, 16, 31, 16, 12, 16, 12, 5, 0, 62], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 62]]
1
143
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int cnt = 0, i, m = 0; for (i = 0; i < s.length() - 1; ++i) { if (s[i] == 'R') cnt++; else { m = max(m, cnt); cnt = 0; } } m = max(m, cnt); cout << m; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int cnt = 0, i, m = 0; for (i = 0; i < s.length(); ++i) { if (s[i] == 'R') cnt++; else { m = max(m, cnt); cnt = 0; } } m = max(m, cnt); cout << m; return 0; }
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
97
#include <bits/stdc++.h> using namespace std; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } using ll = long long; using P = pair<int, int>; const i...
#include <bits/stdc++.h> using namespace std; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } using ll = long long; using P = pair<int, int>; const i...
[["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]]
1
225
#include <bits/stdc++.h> using namespace std; #define int ll #define ll long long #define I32_MAX 2147483647 #define I64_MAX 9223372036854775807LL #define I64_MAX2 1223372036854775807LL #define INF I64_MAX2 #define MOD 1000000007 // #define MOD 998244353 #define MEM_SIZE 1000100 #define DEBUG_OUT true #define ALL(x) (...
#include <bits/stdc++.h> using namespace std; #define int ll #define ll long long #define I32_MAX 2147483647 #define I64_MAX 9223372036854775807LL #define I64_MAX2 1223372036854775807LL #define INF I64_MAX2 #define MOD 1000000007 // #define MOD 998244353 #define MEM_SIZE 1000100 #define DEBUG_OUT true #define ALL(x) (...
[["-", 51, 16, 12, 23, 0, 16, 12, 5, 0, 6], ["+", 51, 16, 12, 23, 0, 16, 12, 5, 0, 6]]
1
462
s = input() if s.count("R") == 1: print(1) elif s.count("R") == 2: if s == 'RSR': print(1) else: print(2) elif s.count("R") == 3: print(3)
s = input() if s.count("R") == 1: print(1) elif s.count("R") == 2: if s == 'RSR': print(1) else: print(2) elif s.count("R") == 3: print(3) else: print(0)
[["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102], ["+", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
66
// AtCoder Beginner Contest 175 #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #include <bits/stdc++.h> #define ll long long using namespace std; const ll N = 1e6 + 5; const double E = 1e-9; //------------------------------------------------------------------...
// AtCoder Beginner Contest 175 #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #include <bits/stdc++.h> #define ll long long using namespace std; const ll N = 1e6 + 5; const double E = 1e-9; //------------------------------------------------------------------...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
133
#include <bits/stdc++.h> #define ull unsigned long long int #define ll long long #define FOR(i, n) for (int i = 0; i < n; i++) #define ii pair<int, int> #define vii vector<ii> #define vi vector<int> #define mii map<int, int> #define uii unordered_map<int, int> #define all(x) x.begin(), x.end() #define ff first #define ...
#include <bits/stdc++.h> #define ull unsigned long long int #define ll long long #define FOR(i, n) for (int i = 0; i < n; i++) #define ii pair<int, int> #define vii vector<ii> #define vi vector<int> #define mii map<int, int> #define uii unordered_map<int, int> #define all(x) x.begin(), x.end() #define ff first #define ...
[["+", 0, 57, 75, 76, 0, 1, 0, 34, 0, 21], ["+", 75, 76, 0, 1, 0, 34, 12, 11, 31, 22], ["+", 75, 76, 0, 1, 0, 34, 12, 11, 17, 32], ["+", 75, 76, 0, 1, 0, 34, 12, 11, 12, 13]]
1
314
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define PI acos(-1) #define ff first #define ss second #define endl '\n' #define vt vector #define all(c) (c).begin(), (c).end() #define REP(i, a, b) for (int i = a; i <= b; ++i) #define Rep(i, a, b) for (int i = a; i < b; ++i) #d...
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define PI acos(-1) #define ff first #define ss second #define endl '\n' #define vt vector #define all(c) (c).begin(), (c).end() #define REP(i, a, b) for (int i = a; i <= b; ++i) #define Rep(i, a, b) for (int i = a; i < b; ++i) #d...
[["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 21], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]]
1
453
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <functional> using namespace __gnu_pbds; using namespace std; typedef tree<long long, null_type, less<long long>, rb_tree_tag, tree_order_statistics_node_update> new_data_set; // defines ty...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <functional> using namespace __gnu_pbds; using namespace std; typedef tree<long long, null_type, less<long long>, rb_tree_tag, tree_order_statistics_node_update> new_data_set; // defines ty...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
208
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here int T = 1; while (T--) { string s; cin >> s; int ans = 0, ct = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') ct++; else { ans = max(ans, ct); ct = 0; } } cout << ...
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here int T = 1; while (T--) { string s; cin >> s; int ans = 0, ct = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') ct++; else { ans = max(ans, ct); ct = 0; } } cout << ...
[["+", 8, 9, 0, 1, 0, 16, 12, 2, 63, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 25]]
1
94
S=input() a=0 m=0 for i in range(3): if S[i]=='R': a+=1 else: m=a a=0 m=max(m,a) print(m)
S=input() a=0 m=0 for i in range(3): if S[i]=='R': a+=1 else: m=max(m,a) a=0 m=max(m,a) print(m)
[["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
52
#include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define PI 3.1415926535897932384626433832795 #define MOD 1000000007 using namespace std; ll power(ll a, ll n) { ll result = 1; while (n > 0) { if (n & 1) result = result * a; a = a * a; n = n >> 1; } return...
#include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define PI 3.1415926535897932384626433832795 #define MOD 1000000007 using namespace std; ll power(ll a, ll n) { ll result = 1; while (n > 0) { if (n & 1) result = result * a; a = a * a; n = n >> 1; } return...
[["+", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]]
1
395
s = input() sol = 0 if s == 'RRR': sol = 3 elif s == 'RRS' or s == 'SRR': sol == 2 elif s == 'SSS': sol = 0 else: sol = 1 print(sol)
s = input() sol = 0 if s == 'RRR': sol = 3 elif s == 'RRS' or s == 'SRR': sol = 2 elif s == 'SSS': sol = 0 else: sol = 1 print(sol)
[["-", 75, 665, 64, 196, 0, 1, 0, 666, 667, 60], ["+", 75, 665, 64, 196, 0, 1, 0, 662, 0, 32]]
5
53
s = input().strip().split('S') print(max(s, key = len))
s = input().strip().split('S') print(len(max(s, key = len)))
[["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
27
S = input() m = 0 c = 0 for s in S: if s == 'R': c += 1 else: c == 0 m = max(m, c) print(m)
S = input() m = 0 c = 0 for s in S: if s == 'R': c += 1 else: c = 0 m = max(m, c) print(m)
[["-", 75, 76, 8, 196, 0, 1, 0, 666, 667, 60], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32]]
5
43
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define MOD 1000000007 #define mod9 1000000009 #define fast \ ios_base ::sync_with_stdio(0); \ cin.tie(NULL); ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define MOD 1000000007 #define mod9 1000000009 #define fast \ ios_base ::sync_with_stdio(0); \ cin.tie(NULL); ...
[["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 106], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106]]
1
892
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { string s; cin >> s; ll ans = 0, curr = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') { curr++; } else { ans = max(ans, curr); } } ans = max(ans, curr); cout << ans << "\n"; }
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { string s; cin >> s; ll ans = 0, curr = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') { curr++; } else { ans = max(ans, curr); curr = 0; } } ans = max(ans, curr); cout << ans << "\n"; }
[["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]]
1
92
#include <bits/stdc++.h> #define ll long long #define vi vector<int> #define vll vector<ll> #define pb push_back #define ppb pop_back() #define fi first #define se second #define pi pair<int, int> #define rep(i, a, n) for (int i = a; i <= n; i++) #define REP(i, a, n) for (int i = a; i < n; i++) #define Y "YES" #define ...
#include <bits/stdc++.h> #define ll long long #define vi vector<int> #define vll vector<ll> #define pb push_back #define ppb pop_back() #define fi first #define se second #define pi pair<int, int> #define rep(i, a, n) for (int i = a; i <= n; i++) #define REP(i, a, n) for (int i = a; i < n; i++) #define Y "YES" #define ...
[["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60]]
1
131
#include <bits/stdc++.h> using namespace std; #define int long long int int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout << setprecision(30) << fixed; string s; cin >> s; s += '#'; int c = 0; int c1 = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') c1++; else { ...
#include <bits/stdc++.h> using namespace std; #define int long long int int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout << setprecision(30) << fixed; string s; cin >> s; s += '#'; int c = 0; int c1 = 0; for (int i = 0; i < 4; i++) { if (s[i] == 'R') c1++; else { ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
116
/*BISMILLAH THE WHITE WOLF NO DREAM IS TOO BIG AND NO DREAMER IS TOO SMALL*/ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef vector<long long> vll; typedef vector<int> vi; #define io ios_base::sync_with_stdio(false) #define pb pus...
/*BISMILLAH THE WHITE WOLF NO DREAM IS TOO BIG AND NO DREAMER IS TOO SMALL*/ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef vector<long long> vll; typedef vector<int> vi; #define io ios_base::sync_with_stdio(false) #define pb pus...
[["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13]]
1
242
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int len = 0; int ma = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') len++; else { ma = max(ma, len); } } if (len) { ma = max(ma, len); } cout << ma << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int len = 0; int ma = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') len++; else { ma = max(ma, len); len = 0; } } if (len) { ma = max(ma, len); } cout << ma << endl; return 0; }
[["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]]
1
95
#include <bits/stdc++.h> using namespace std; #define long long ll int main() { string s; cin >> s; int res = 0; if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R') { res = 3; } for (int i = 1; i < s.size(); i++) { if (s[i] == s[i - 1] && s[i] == 'R') res = max(res, 2); } for (int i = 1; i ...
#include <bits/stdc++.h> using namespace std; #define long long ll int main() { string s; cin >> s; int res = 0; if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R') { res = 3; } for (int i = 1; i < s.size(); i++) { if (s[i] == s[i - 1] && s[i] == 'R') res = max(res, 2); } for (int i = 0; i ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
161
s=input() if s=='RRR': print(3) elif s=='SSS': print(0) elif (s=='SRR' or s=='RRS'): prinr(2) else: print(1)
s=input() if s=='RRR': print(3) elif s=='SSS': print(0) elif (s=='SRR' or s=='RRS'): print(2) else: print(1)
[["-", 75, 665, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 75, 665, 64, 196, 0, 1, 0, 652, 63, 22]]
5
52
#include <iostream> #include <vector> #define F(i, n) for (int i = 0; i < n; i++) #define lli long long int #define vi vector<int> v #define vpb(x) v.push_back(x) #define spb(x) s.push_back(x) using namespace std; // int ans() // { // } int main() { string s; cin >> s; int count = 0, maxco = -1; for (int i = 0...
#include <iostream> #include <vector> #define F(i, n) for (int i = 0; i < n; i++) #define lli long long int #define vi vector<int> v #define vpb(x) v.push_back(x) #define spb(x) s.push_back(x) using namespace std; // int ans() // { // } int main() { string s; cin >> s; int count = 0, maxco = 0; for (int i = 0;...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
116
#define Oo \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #include <bits/stdc++.h> using namespace std; #define PI acos(...
#define Oo \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #include <bits/stdc++.h> using namespace std; #define PI acos(...
[["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 75, 76, 0, 93, 0, 35]]
1
114
package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func main() { scan_init() n := scan() s := strings.Split(n,"") count := 0 flag := false for i:= 0; i<3; i++ { if s[i] == "R" { flag = true } else { break } if flag { count ++ } } fmt.Println(count) } var sc = bufio.NewSca...
package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func main() { scan_init() n := scan() s := strings.Split(n,"") count := 0 flag := false for i:= 0; i<3; i++ { if s[i] == "R" { flag = true } else if flag{ break } if flag { count ++ } } fmt.Println(count) } var sc = bufio...
[["+", 0, 7, 8, 196, 0, 57, 75, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 57, 75, 57, 15, 22]]
7
435
#include <algorithm> #include <cassert> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define int long long int #def...
#include <algorithm> #include <cassert> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define int long long int #def...
[["-", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["-", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32]]
1
223
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; int main() { string s; cin >> s; int ans = 0, cnt = 0; rep(i, 3) { if (s[i] == 'R') cnt++; else { ans = cnt; cnt = 0...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; int main() { string s; cin >> s; int ans = 0, cnt = 0; rep(i, 3) { if (s[i] == 'R') cnt++; else { ans = max(ans, cnt); ...
[["+", 0, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25]]
1
107
def main(): S = input() ans = 0 tmp = 0 for s in S: if s == 'R': tmp += 1 else: ans = tmp tmp = 0 if ans < tmp: ans = tmp print(ans) if __name__ == "__main__": main()
def main(): S = input() ans = 0 tmp = 0 for s in S: if s == 'R': tmp += 1 else: if ans < tmp: ans = tmp tmp = 0 if ans < tmp: ans = tmp print(ans) if __name__ == "__main__": main()
[["+", 0, 57, 75, 76, 8, 196, 0, 57, 0, 121], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 57, 75, 76, 8, 196, 0, 57, 0, 102], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22]]
5
61
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ull unsigned long long #define pb push_back #define pp pop_back #define pi pair<ll, ll> #define pii pair<int, int> int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // freopen("input.txt","r",stdin); //...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ull unsigned long long #define pb push_back #define pp pop_back #define pi pair<ll, ll> #define pii pair<int, int> int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // freopen("input.txt","r",stdin); //...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
182
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0, mx = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') count++; else { mx = max(mx, count); count = 0; } } cout << mx; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0, mx = 0; for (int i = 0; i < 3; i++) { if (s[i] == 'R') count++; else { mx = max(mx, count); count = 0; } } cout << max(mx, count); return 0; }
[["+", 8, 9, 0, 1, 0, 16, 12, 2, 63, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 25]]
1
81
s=gets.chomp.chars if s.include?('RRR') puts 3 elsif s.include?('RR') puts 2 elsif s.include?('R') puts 1 else puts 0 end
s=gets.chomp if s.include?('RRR') puts 3 elsif s.include?('RR') puts 2 elsif s.include?('R') puts 1 else puts 0 end
[["-", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]]
4
44
#include <bits/stdc++.h> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repp(i, n, m) for (int i = m; i < (n); ++i) #define repl(i, n) for (long long i = 0; i < (n); ++i) #d...
#include <bits/stdc++.h> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repp(i, n, m) for (int i = m; i < (n); ++i) #define repl(i, n) for (long long i = 0; i < (n); ++i) #d...
[["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]]
1
477
puts gets.scan(/R+/).map!(&:length).max
puts gets.scan(/R+/).map!(&:length).max || 0
[["+", 0, 493, 0, 652, 3, 4, 0, 738, 17, 106], ["+", 0, 493, 0, 652, 3, 4, 0, 738, 12, 612]]
4
17
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k, in) for (int i = j; i < k; i += in) #define RFOR(i, j, k, in) for (int i = j; i >= k; i -= in) #define REP(i, j) FOR(i, 0, j, 1) #define RREP(i, j) RFOR(i, j, 0, 1) #define all(cont) cont.begin(), cont.end() #define INF (int)1e9 #define EPS 1e-6 #define...
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k, in) for (int i = j; i < k; i += in) #define RFOR(i, j, k, in) for (int i = j; i >= k; i -= in) #define REP(i, j) FOR(i, 0, j, 1) #define RREP(i, j) RFOR(i, j, 0, 1) #define all(cont) cont.begin(), cont.end() #define INF (int)1e9 #define EPS 1e-6 #define...
[["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]]
1
350
#include <bits/stdc++.h> #define endl '\n' #define ll long long #define double long double using namespace std; string s; ll kol, mux; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> s; s += 'R'; for (ll i = 0; i < 4; ++i) if (s[i] == 'S') ++kol; else { mux =...
#include <bits/stdc++.h> #define endl '\n' #define ll long long #define double long double using namespace std; string s; ll kol, mux; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> s; s += 'S'; for (ll i = 0; i < 4; ++i) if (s[i] == 'R') ++kol; else { mux =...
[["-", 8, 9, 0, 1, 0, 11, 12, 103, 0, 125], ["+", 8, 9, 0, 1, 0, 11, 12, 103, 0, 125], ["-", 8, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 8, 57, 15, 339, 51, 16, 12, 103, 0, 125]]
1
111
s=input() if s=='RRR': print(3) elif s=='RRS' or s=='SRR': print(2) elif s.count('R')==1: print(1) else: print(0)
s=input() if s=='RRR': print(3) elif s=='RRS' or s=='SRR': print(2) elif s.count('R')==1 or s=='RSR': print(1) else: print(0)
[["+", 0, 656, 0, 57, 75, 665, 15, 679, 17, 354], ["+", 0, 57, 75, 665, 15, 679, 12, 666, 0, 22], ["+", 0, 57, 75, 665, 15, 679, 12, 666, 667, 60], ["+", 75, 665, 15, 679, 12, 666, 0, 557, 0, 654], ["+", 75, 665, 15, 679, 12, 666, 0, 557, 0, 6], ["+", 75, 665, 15, 679, 12, 666, 0, 557, 0, 655]]
5
55
// Author- Vaibhav Singh #include <bits/stdc++.h> /* #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_multiset tree<long long , null_type,less_equal<long long >, rb_tree_tag,tree_order_statistics_node_update> #define ordered_set tree<long long , ...
// Author- Vaibhav Singh #include <bits/stdc++.h> /* #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_multiset tree<long long , null_type,less_equal<long long >, rb_tree_tag,tree_order_statistics_node_update> #define ordered_set tree<long long , ...
[["-", 0, 30, 0, 42, 0, 2, 3, 4, 0, 22], ["+", 0, 30, 0, 42, 0, 2, 3, 4, 0, 22]]
1
348
#include <bits/stdc++.h> using namespace std; #define ll long long #define vvi vector<vector<int>> #define vi vector<int> #define All(X) X.begin(), X.end() #define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define pb push_back #define pii pair<int, int>...
#include <bits/stdc++.h> using namespace std; #define ll long long #define vvi vector<vector<int>> #define vi vector<int> #define All(X) X.begin(), X.end() #define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define pb push_back #define pii pair<int, int>...
[["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]]
1
188
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define ff first #define ss second #define endl "\n" #define loop(i, s, e) for (int i = s; i < e; i++) #define int long long #define vi vector<int> #define S(v) sort(v...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define ff first #define ss second #define endl "\n" #define loop(i, s, e) for (int i = s; i < e; i++) #define int long long #define vi vector<int> #define S(v) sort(v...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
277
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define pb push_back #define debug(val) cerr << "The value of " << #val << " is = " << val << '\n'; typedef long long ll; typedef long double ld; const ld pi = 4 * atan((ld)1); const ll mod = 1e9 + 7; const ll inf = 922337203685477; const ...
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define pb push_back #define debug(val) cerr << "The value of " << #val << " is = " << val << '\n'; typedef long long ll; typedef long double ld; const ld pi = 4 * atan((ld)1); const ll mod = 1e9 + 7; const ll inf = 922337203685477; const ...
[["+", 0, 57, 15, 339, 51, 16, 31, 69, 28, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 70], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73]]
1
166
#include <bits/stdc++.h> using namespace std; #define sws \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define ll long ...
#include <bits/stdc++.h> using namespace std; #define sws \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define ll long ...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
139
#define _CRT_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <...
#define _CRT_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <...
[["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
848
s = input() if s == "SSS": print(0) elif s == "RRR": print(3) elif s == "RRS" or "SRR": print(2) else: print(1)
s = input() if s == "SSS": print(0) elif s == "RRR": print(3) elif s == "RRS" or s == "SRR": print(2) else: print(1)
[["+", 0, 57, 75, 665, 15, 679, 12, 666, 0, 22], ["+", 0, 57, 75, 665, 15, 679, 12, 666, 667, 60]]
5
48
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define sz(x) (int)((x).size()) #define endl "\n" #define jonathan ios_base::sync_with_stdio(0) #define livingston cin.tie(0) using namespace std; void yes() { cout << "YES" << endl; } void no() { cout << "NO" << e...
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define sz(x) (int)((x).size()) #define endl "\n" #define jonathan ios_base::sync_with_stdio(0) #define livingston cin.tie(0) using namespace std; void yes() { cout << "YES" << endl; } void no() { cout << "NO" << e...
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
260