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 |
|---|---|---|---|---|
s = input()
ans = s.count('R')
if s=='RSR':
ans = 1
print(1)
| s = input()
ans = s.count('R')
if s=='RSR':
ans = 1
print(ans) | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 29 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
#define Endl "\n"
#define in(n) \
int n; \
cin >> n;
#define take(v, n) ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
#define Endl "\n"
#define in(n) \
int n; \
cin >> n;
#define take(v, n) ... | [["+", 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 | 192 |
S = input()
ans = 0
c = []
for i in range(len(S)):
if S[i] =="R":
ans += 1
else:
c.append(ans)
ans = 0
print(max(c)) | S = input()
ans = 0
c = []
for i in range(len(S)):
if S[i] =="R":
ans += 1
else:
c.append(ans)
ans = 0
c.append(ans)
print(max(c)) | [["+", 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 | 54 |
#include <bits/stdc++.h>
using namespace std;
#define ONSPEED \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define pb p... | #include <bits/stdc++.h>
using namespace std;
#define ONSPEED \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define pb p... | [["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 354], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 355]] | 1 | 169 |
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// Scanner myObj = new Scanner(System.in);
Scanner ret = new Scanner(System.in);
int a, b, t;
String s;
s = ret.nextLine();
if ((s.charAt(0) == 'R') ... | import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// Scanner myObj = new Scanner(System.in);
Scanner ret = new Scanner(System.in);
int a, b, t;
String s;
s = ret.nextLine();
if ((s.charAt(0) == 'R') ... | [["-", 12, 23, 0, 16, 31, 492, 3, 4, 0, 499], ["+", 12, 23, 0, 16, 31, 492, 3, 4, 0, 499]] | 3 | 231 |
s=input()
count=0
for i in range(len(s)):
if s[i]=='R':
count+=1
max1=count
elif s[i]=='S':
count=0
print(max1) | s=input()
count=0
max=0
for i in range(len(s)):
if s[i]=='R':
count+=1
max=count
elif s[i]=='S':
count=0
print(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], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 52 |
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
int main() {
string S;
cin >> S;
int counter = 0;
bool loopfrag = true;
for (int i = 0; i < 3; i++) {
if (S.at(i) == 'R' && loopfrag == true)
counter++;
else if (S.at(i) == 'R') {
loopfrag = true;
counter = 1;
... | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
int main() {
string S;
cin >> S;
int counter = 0;
bool loopfrag = true;
for (int i = 0; i < 3; i++) {
if (S.at(i) == 'R' && loopfrag == true)
counter++;
else if (S.at(i) == 'R') {
loopfrag = true;
counter = 1;
... | [["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 12, 147], ["+", 75, 76, 0, 57, 75, 76, 0, 1, 0, 35]] | 1 | 97 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 0;
int tmp = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R')
ans++;
else {
tmp = ans;
ans = 0;
}
}
cout << max(ans, tmp) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 0;
int tmp = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R')
ans++;
else {
tmp = max(tmp, ans);
ans = 0;
}
}
cout << max(ans, tmp) << endl;
} | [["+", 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 | 81 |
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define loop(i, x, n) for (ll i = x; i < n; i++)
#define loopr(i, x, n) for (ll i = n - 1; i >= x; i--)
#define S(v) sort(v.begin(), v.end());
#define ff first
#define ss second
int main() { // freopen("in.txt", "r", stdin);
string s;
cin >> s;
i... | #include "bits/stdc++.h"
using namespace std;
#define ll long long
#define loop(i, x, n) for (ll i = x; i < n; i++)
#define loopr(i, x, n) for (ll i = n - 1; i >= x; i--)
#define S(v) sort(v.begin(), v.end());
#define ff first
#define ss second
int main() { // freopen("in.txt", "r", stdin);
string s;
cin >> s;
i... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60]] | 1 | 105 |
#include <bits/stdc++.h>
#define ll long long int
#define nl '\n'
using namespace std;
int main(void) {
ll t, x, y, n, m, mx = 0;
string s;
cin >> s;
int cnt = 0;
if (s == "RRR")
cnt = 3;
else if (s == "SSS")
cnt = 0;
else if (s == "RRs")
cnt = 2;
else if (s == "SRR")
cnt = 2;
else
... | #include <bits/stdc++.h>
#define ll long long int
#define nl '\n'
using namespace std;
int main(void) {
ll t, x, y, n, m, mx = 0;
string s;
cin >> s;
int cnt = 0;
if (s == "RRR")
cnt = 3;
else if (s == "SSS")
cnt = 0;
else if (s == "RRS")
cnt = 2;
else if (s == "SRR")
cnt = 2;
else
... | [["-", 0, 57, 15, 339, 51, 16, 12, 5, 0, 6], ["+", 0, 57, 15, 339, 51, 16, 12, 5, 0, 6]] | 1 | 106 |
#include <bits/stdc++.h>
using namespace std;
using graph = vector<vector<int>>;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
const ll mod = 1000000007;
const ll INF = 1e+14;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define Rep(i, sta, n... | #include <bits/stdc++.h>
using namespace std;
using graph = vector<vector<int>>;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
const ll mod = 1000000007;
const ll INF = 1e+14;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define Rep(i, sta, n... | [["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]] | 1 | 172 |
#include <bits/stdc++.h>
#define int long long
#define rep(i, a, b) for (int i = a; i < b; i += 1)
#define reps(i, a, b) for (int i = a; i >= b; i -= 1)
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pi pair<int, int>
#define mp make_pair
#define ff first
#define ss second
#define i... | #include <bits/stdc++.h>
#define int long long
#define rep(i, a, b) for (int i = a; i < b; i += 1)
#define reps(i, a, b) for (int i = a; i >= b; i -= 1)
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pi pair<int, int>
#define mp make_pair
#define ff first
#define ss second
#define i... | [["-", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22]] | 1 | 440 |
#include <bits/stdc++.h>
#define endl "\n"
#define ll long long int
#define ain cin >>
#define aout cout <<
#define avec vector<int>
#define aloop(i, k, n) for (int i = k; i < n; i++)
using namespace std;
int error(string s) {
if (count(s.begin(), s.end(), 'R') == 0)
return 0; // no R
if (count(s.begin(), s.en... | #include <bits/stdc++.h>
#define endl "\n"
#define ll long long int
#define ain cin >>
#define aout cout <<
#define avec vector<int>
#define aloop(i, k, n) for (int i = k; i < n; i++)
using namespace std;
int error(string s) {
if (count(s.begin(), s.end(), 'R') == 0)
return 0; // no R
if (count(s.begin(), s.en... | [["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]] | 1 | 205 |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sn = new Scanner(System.in);
String s = sn.next();
String[] a = s.split("");
int max = 0;
int aux = 0;
for (int i = 0; i < a.length; i++) {
if (a[i].equals("R")) {
aux++;
} else ... | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sn = new Scanner(System.in);
String s = sn.next();
String[] a = s.split("");
int max = 0;
int aux = 0;
for (int i = 0; i < a.length; i++) {
if (a[i].equals("R")) {
aux++;
max =... | [["-", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 196, 0, 45], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 196, 0, 45]] | 3 | 131 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String weather = sc.next();
if (weather.equals("SSS")) {
System.out.println(0);
return;
}
if (weather.equals("RRR")) {
System.out.println(3);
re... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String weather = sc.next();
if (weather.equals("SSS")) {
System.out.println(0);
return;
}
if (weather.equals("RRR")) {
System.out.println(3);
re... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 98], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 106]] | 3 | 134 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
string S;
int count = 0;
cin >> S;
if (S.at(1) == 'R') {
if (S.at(0) == 'R' && S.at(2) == 'R') {
count = 3;
} else if (S.at(0) == 'S' && S.at(2) == 'S') {
count = 0;
} else {
count = 2;
}
} else {
... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
string S;
int count = 0;
cin >> S;
if (S.at(1) == 'R') {
if (S.at(0) == 'R' && S.at(2) == 'R') {
count = 3;
} else if (S.at(0) == 'S' && S.at(2) == 'S') {
count = 1;
} else {
count = 2;
}
} else {
... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 1 | 153 |
#include <stdio.h>
int main() {
char str[3];
scanf("%s", &str);
int i, count = 0, result;
for (i = 0; i < 3; i++) {
if (str[i] == 'R') {
count++;
result = count;
} else if (str[i] == 'S') {
count = 0;
}
}
printf("%d", count);
}
| #include <stdio.h>
int main() {
char str[3];
scanf("%s", &str);
int i, count = 0, result = 0;
for (i = 0; i < 3; i++) {
if (str[i] == 'R') {
count++;
result = count;
} else if (str[i] == 'S') {
count = 0;
}
}
printf("%d", result);
}
| [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 95 |
// warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬████╬╬╬╬╬╬███
// ... | // warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬████╬╬╬╬╬╬███
// ... | [["+", 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 | 407 |
/// Bismillahir Rahmanir Rahim
// Author: Tanvir Hussain
// ICE,NSTU
#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;
const long long MOD = 1000000007;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
... | /// Bismillahir Rahmanir Rahim
// Author: Tanvir Hussain
// ICE,NSTU
#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;
const long long MOD = 1000000007;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 697 |
def clean(max_r, count):
if max_r < count:
max_r = count
return max_r
mojiretsu = input()
count = 0
max_r = 0
for moji in mojiretsu:
if moji == 'R':
count += 1
else:
max_r = clean(max_r, count)
if count != 0:
max_r = clean(max_r, count)
print(max_r) | def clean(max_r, count):
if max_r < count:
max_r = count
return max_r
mojiretsu = input()
count = 0
max_r = 0
for moji in mojiretsu:
if moji == 'R':
count += 1
else:
max_r = clean(max_r, count)
count = 0
if count != 0:
max_r = clean(max_r, count)
print(max_r) | [["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 71 |
#include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace... | #include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 62], ["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 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]] | 1 | 123 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R')
sum++;
}
if (sum == 1 || sum == 3)
cout << sum;
else {
if (s[1] == 'R')
cout << 2;
else
cout << 1;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int sum = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R')
sum++;
}
if (sum == 1 || sum == 3 || sum == 0)
cout << sum;
else {
if (s[1] == 'R')
cout << 2;
else
cout << 1;
}
} | [["+", 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], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 91 |
s=input();s.count('R')-(s=="RSR") | s=input();print(s.count('R')-(s=="RSR")) | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]] | 5 | 22 |
s=input().upper()
c=0
largest=0
for i in range(len(s)-1):
if s[i] == "R":
if c == 0:
c+=1
if s[i] == s[i+1]:
c+=1
#print("dasd",c,i,len(s))
else:
#print("asd", c)
if c > largest:
largest=c
c=0
if i + 2 == len(s):
i... | s=input().upper()
c=0
largest=0
for i in range(len(s)-1):
if s[i] == "R":
if c == 0:
c+=1
if s[i] == s[i+1]:
c+=1
#print("dasd",c,i,len(s))
else:
#print("asd", c)
if c > largest:
largest=c
c=0
if i + 2 == len(s):
i... | [["+", 15, 679, 31, 666, 0, 206, 206, 657, 17, 72], ["+", 15, 679, 31, 666, 0, 206, 206, 657, 12, 612]] | 5 | 117 |
import re
r = 0
s = input()
if 'r' not in s:
print(0)
else:
x = re.findall('r+',s)
if len(x) == 2:
print(1)
else:
print(len(x[0])) | import re
r = 0
s = input()
if 'R' not in s:
print(0)
else:
x = re.findall('R+',s)
if len(x) == 2:
print(1)
else:
print(len(x[0]))
| [["-", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["-", 0, 662, 12, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 662, 12, 652, 3, 4, 0, 557, 0, 6]] | 5 | 60 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int count = 00;
if (s[0] == 'R') {
count++;
if (s[1] == 'R') {
count++;
if (s[2] == 'R') {
count++;
}
} else {
if (s[1] == 'R') {
count++;
if (s[2] == 'R... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int count = 00;
if (s[0] == 'R') {
count++;
if (s[1] == 'R') {
count++;
if (s[2] == 'R') {
count++;
}
}
} else {
if (s[1] == 'R') {
count++;
if (s[2] == 'R')... | [["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 134 |
#include <stdio.h>
#include <string.h>
char s;
int main() {
scanf("%s", s);
if (!strcmp(s, "RRR")) {
printf("%d", 3);
} else if (!strcmp(s, "RRS")) {
printf("%d", 2);
} else if (!strcmp(s, "SRR")) {
printf("%d", 2);
} else if (!strcmp(s, "SSS")) {
printf("%d", 0);
} else {
printf("%d... | #include <stdio.h>
#include <string.h>
char s[3];
int main() {
scanf("%s", s);
if (!strcmp(s, "RRR")) {
printf("%d", 3);
} else if (!strcmp(s, "RRS")) {
printf("%d", 2);
} else if (!strcmp(s, "SRR")) {
printf("%d", 2);
} else if (!strcmp(s, "SSS")) {
printf("%d", 0);
} else {
printf(... | [["+", 36, 36, 0, 30, 0, 43, 49, 80, 0, 70], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 0, 73]] | 0 | 132 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string line;
cin >> line;
int ans = 0;
int cur = 0;
if (line[0] == 'R')
cur = 1;
for (int i = 0; i < line.size(); i++) {
if (line[i] == 'R' && line[i - 1] == 'R') {
cur++;
}
if (line[i] == 'R' && line[i - 1] !=... | #include <iostream>
#include <string>
using namespace std;
int main() {
string line;
cin >> line;
int ans = 0;
int cur = 0;
if (line[0] == 'R')
cur = 1;
for (int i = 1; i < line.size(); i++) {
if (line[i] == 'R' && line[i - 1] == 'R') {
cur++;
}
if (line[i] == 'R' && line[i - 1] !=... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 174 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String n1 = sc.next();
if (n1.equals("RSR")) {
System.out.println(2);
return;
}
System.out.println(n1.chars().filter(c -> c == 'R').count());
}
}
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String n1 = sc.next();
if (n1.equals("RSR")) {
System.out.println(1);
return;
}
System.out.println(n1.chars().filter(c -> c == 'R').count());
}
}
| [["-", 64, 196, 0, 1, 0, 492, 3, 4, 0, 499], ["+", 64, 196, 0, 1, 0, 492, 3, 4, 0, 499]] | 3 | 94 |
s=input()
if s=='RRR':
print(0)
elif s=='SSS':
print(3)
elif s in ['RRS','SRR']:
print(2)
else:
print(1) | s=input()
if s=='RRR':
print(3)
elif s=='SSS':
print(0)
elif s in ['RRS','SRR']:
print(2)
else:
print(1)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 50 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int cnt = 0, ans = 0;
for (int i = 0; i < 3; i++) {
if (s[i] = 'R') {
cnt++;
ans = max(cnt, ans);
} else {
cnt = 0;
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int cnt = 0, ans = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
cnt++;
ans = max(cnt, ans);
} else {
cnt = 0;
}
}
cout << ans << endl;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 82 |
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
string input;
int num = 0;
cin >> input;
if (input == "RRR") {
cout << 3 << endl;
} else if (input == "RRS" || "SRR") {
cout << 2 << endl;
} else if (input == "SSS") {
cout << 0 << endl;
} else {
cout << 1 << en... | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
string input;
int num = 0;
cin >> input;
if (input == "RRR") {
cout << 3 << endl;
} else if (input == "RRS" || input == "SRR") {
cout << 2 << endl;
} else if (input == "SSS") {
cout << 0 << endl;
} else {
cout <... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60]] | 1 | 89 |
#include <iostream>
using namespace std;
int main() {
string s;
int res = 0, total = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'S') {
res = max(res, total);
total = 0;
} else
total++;
}
res = max(res, total);
cout << res << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int res = 0, total = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'S') {
res = max(res, total);
total = 0;
} else
total++;
}
res = max(res, total);
cout << res << endl;
return 0;
} | [["+", 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 | 88 |
s = input()
res = 0
for i in range(2):
if s[i] == 'R':
res = 1
if s[0] == 'R' and s[1] == 'R':
res += 1
if s[1] == 'R' and s[2] == 'R':
res += 1
print(res) | s = input()
res = 0
for i in range(3):
if s[i] == 'R':
res = 1
if s[0] == 'R' and s[1] == 'R':
res += 1
if s[1] == 'R' and s[2] == 'R':
res += 1
print(res) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 77 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
using namespace std;
const ll MOD = 10000000... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <vector>
typedef long long ll;
using namespace std;
const ll MOD = 10000000... | [["-", 0, 338, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 338, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 0, 338, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 338, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45]] | 1 | 112 |
import sys
input = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**9)
#from functools import lru_cache
def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list... | import sys
input = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**9)
#from functools import lru_cache
def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list... | [["+", 0, 57, 75, 665, 15, 679, 12, 666, 0, 22], ["+", 0, 57, 75, 665, 15, 679, 12, 666, 667, 60]] | 5 | 220 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
int cnt = 0, mx = -1;
for (unsigned int i = 0; i < s.size(); i++) {
if (s.at(i) == 'R') {
cnt++;
mx = max(mx, cnt);
} else {
cnt = 0;
}
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
int cnt = 0, mx = 0;
for (unsigned int i = 0; i < s.size(); i++) {
if (s.at(i) == 'R') {
cnt++;
mx = max(mx, cnt);
} else {
cnt = 0;
}
}
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 108 |
S=input()
if S=="RSR":
print(2)
else:
print(S.count("R")) | S=input()
if S=="RSR":
print(1)
else:
print(S.count("R"))
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 29 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
int main() {
string s;
int cnt = 0;
int renzoku = 0;
cin >> s;
for (int i = 0; i < 3; ++i) {
if (s[i] == 'R') {
renzoku++;
} else if (s[i] != 'R' && renzoku != 0) {
cnt = renzoku;
renzoku... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
int main() {
string s;
int cnt = 0;
int renzoku = 0;
cin >> s;
for (int i = 0; i < 3; ++i) {
if (s[i] == 'R') {
renzoku++;
cnt = renzoku;
} else if (s[i] != 'R' && renzoku != 0) {
cnt = r... | [["+", 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], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 1 | 104 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int count = 0, result = 0;
cin >> s;
for (char c : s) {
if (c == 'R')
count++;
else
count = 0;
result = max(result, count);
}
cout << count;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int count = 0, result = 0;
cin >> s;
for (char c : s) {
if (c == 'R')
count++;
else
count = 0;
result = max(result, count);
}
cout << result;
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 69 |
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
# combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import it... | # import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
# combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import it... | [["+", 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, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 114 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; n > i; ++i)
#define MOD 1000000007
using namespace std;
using ll = int64_t;
using pii = pair<int, int>;
using vi = vector<int>;
using VI = vector<ll>;
using vis = vector<string>;
using vvi = vector<vi>;
int gcd(int a, int b) {
if (a % b == 0)
return b;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; n > i; ++i)
#define MOD 1000000007
using namespace std;
using ll = int64_t;
using pii = pair<int, int>;
using vi = vector<int>;
using VI = vector<ll>;
using vis = vector<string>;
using vvi = vector<vi>;
int gcd(int a, int b) {
if (a % b == 0)
return b;
... | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 388 |
#include <iostream>
using namespace std;
int main() {
int a = 0;
string S;
cin >> S;
if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R')
a = 1;
if (S[0] == 'R' && S[1] == 'R' || S[1] == 'R' && S[2] == 'R')
a = 2;
if (S[0] == 'R' && S[1] == 'R' && S[3] == 'R')
a = 3;
cout << a << endl;
} | #include <iostream>
using namespace std;
int main() {
int a = 0;
string S;
cin >> S;
if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R')
a = 1;
if ((S[0] == 'R' && S[1] == 'R') || (S[1] == 'R' && S[2] == 'R'))
a = 2;
if (S[0] == 'R' && S[1] == 'R' && S[2] == 'R')
a = 3;
cout << a << endl;
} | [["+", 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, 12, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 25], ["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13]] | 1 | 138 |
#include <bits/stdc++.h>
#define lli long long int
using namespace std;
int main() {
string s;
cin >> s;
int count = 0;
int counts = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
count++;
} else {
count = 0;
}
counts = max(counts, count);
}
// cout<<counts<<endl;
cout ... | #include <bits/stdc++.h>
#define lli long long int
using namespace std;
int main() {
string s;
cin >> s;
int count = 0;
int counts = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
count++;
} else {
count = 0;
}
counts = max(counts, count);
}
// cout<<counts<<endl;
cout ... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 90 |
#include <algorithm>
#include <bitset>
#include <cfenv>
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <numeric>
#include <ostream>
#include <queue>
#include <random>
#include <... | #include <algorithm>
#include <bitset>
#include <cfenv>
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <numeric>
#include <ostream>
#include <queue>
#include <random>
#include <... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 259 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <ve... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <ve... | [["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 195 |
#include <bits/stdc++.h>
using namespace std;
void solve(std::string S) {
if (S == "RRR") {
cout << 3 << endl;
return;
}
if (S == "RRS" || S == "RRS") {
cout << 2 << endl;
return;
}
if (S == "SSS") {
cout << 0 << endl;
return;
}
cout << 1 << endl;
}
// Generated by 1.1.7.1 https:... | #include <bits/stdc++.h>
using namespace std;
void solve(std::string S) {
if (S == "RRR") {
cout << 3 << endl;
return;
}
if (S == "RRS" || S == "SRR") {
cout << 2 << endl;
return;
}
if (S == "SSS") {
cout << 0 << endl;
return;
}
cout << 1 << endl;
}
// Generated by 1.1.7.1 https:... | [["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6], ["+", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6]] | 1 | 110 |
s = str(input())
if s == "RRR":
print(3)
elif s == "SRR" or s == "RRS":
print(2)
elif s == "SSS":
print(1)
else:
print(0) | s = str(input())
if s == "RRR":
print(3)
elif s == "SRR" or s == "RRS":
print(2)
elif s == "SSS":
print(0)
else:
print(1) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 53 |
package main
import (
"fmt"
)
func main(){
var s string
fmt.Scan(&s)
count:=0
for index,v := range(s){
if string(v) =="R"{
count ++
}else if index!=0{
break
}
}
fmt.Println(count)
}
| package main
import (
"fmt"
)
func main(){
var s string
fmt.Scan(&s)
count:=0
for index,v := range(s){
if string(v) =="R"{
count ++
}else if index!=0 && count!=0{
break
}
}
fmt.Println(count)
}
| [["+", 8, 196, 0, 57, 75, 57, 15, 16, 17, 98], ["+", 0, 57, 75, 57, 15, 16, 12, 16, 31, 22], ["+", 0, 57, 75, 57, 15, 16, 12, 16, 17, 79], ["+", 0, 57, 75, 57, 15, 16, 12, 16, 12, 433]] | 7 | 77 |
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
char s[3];
cin >> s;
int counter = 0, max_counter = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'S') {
counter++;
} else {
counter = 0;
}
if (max_counter <= counter) {
max_counter =... | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
char s[3];
cin >> s;
int counter = 0, max_counter = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
counter++;
} else {
counter = 0;
}
if (max_counter <= counter) {
max_counter =... | [["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]] | 1 | 92 |
// This is free and unencumbered software released into the public domain.
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
// In jurisdictions that... | // This is free and unencumbered software released into the public domain.
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
// In jurisdictions that... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 6,557 |
#include <bits/stdc++.h>
using namespace std;
int main() {
#ifdef LOCAL
freopen("in", "r", stdin);
#endif // LOCAL
ios::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
if (s == "SSS")
cout << 3 << endl;
else if (s == "SSR" || s == "RSS")
cout << 2 << endl;
else if (s == "SSS")
cout << ... | #include <bits/stdc++.h>
using namespace std;
int main() {
#ifdef LOCAL
freopen("in", "r", stdin);
#endif // LOCAL
ios::sync_with_stdio(0);
cin.tie(0);
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, 57, 15, 339, 51, 16, 12, 5, 0, 6], ["+", 0, 57, 15, 339, 51, 16, 12, 5, 0, 6], ["-", 15, 339, 51, 16, 31, 16, 12, 5, 0, 6], ["+", 15, 339, 51, 16, 31, 16, 12, 5, 0, 6], ["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6], ["+", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6]] | 1 | 110 |
S=str(input(""))
if 'R' in S:
print("1")
elif 'RR' in S:
print("2")
elif 'RRR' in S:
print("3")
else:
print("0") | S=str(input(" "))
if 'RRR' in S:
print("3")
elif 'RR' in S:
print("2")
elif 'R' in S:
print("1")
else:
print("0") | [["+", 3, 4, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 57, 75, 665, 15, 666, 0, 557, 0, 6], ["+", 0, 57, 75, 665, 15, 666, 0, 557, 0, 6]] | 5 | 57 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
int main() {
string s;
cin >> s;
int cnt = 0;
int ans = 0;
rep(i, s.size() - 1) {
if (s[i] == 'S') {
cnt++;
ans = cnt;
} else
cnt = 0;
}
cout << ans;
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
int main() {
string s;
cin >> s;
int cnt = 0;
int ans = 0;
rep(i, (int)s.size()) {
if (s[i] == 'R') {
cnt++;
ans = cnt;
} else
cnt = 0;
}
cout << ans;
}
| [["+", 0, 1, 0, 2, 3, 4, 0, 74, 0, 24], ["+", 0, 2, 3, 4, 0, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 2, 3, 4, 0, 74, 0, 25], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]] | 1 | 87 |
#include <bits/stdc++.h>
#include <bitset>
#define MOD 1000000007
#define md 998244353
#define INF LLONG_MAX
#define F first
#define S second
#define yes cout << "YES\n";
#define no cout << "NO\n";
#define sz(x) (long long)x.size()
#define vi vector<int>
#define vll vector<long long>
#define vpl vector<pair<long long, ... | #include <bits/stdc++.h>
#include <bitset>
#define MOD 1000000007
#define md 998244353
#define INF LLONG_MAX
#define F first
#define S second
#define yes cout << "YES\n";
#define no cout << "NO\n";
#define sz(x) (long long)x.size()
#define vi vector<int>
#define vll vector<long long>
#define vpl vector<pair<long long, ... | [["+", 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, 21], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 826 |
a = input()
if a == "RRR":
print(3)
elif a in "RR":
print(2)
elif a == "SSS":
print(0)
else:
print(1) | a = input()
if a == "RRR":
print(3)
elif "RR" in a:
print(2)
elif a == "SSS":
print(0)
else:
print(1) | [["-", 0, 656, 0, 57, 75, 665, 15, 666, 0, 22], ["-", 0, 656, 0, 57, 75, 665, 15, 666, 667, 267], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 267], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 0, 22]] | 5 | 44 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int cnt = 1;
int rcnt = 0;
for (int i = 0; i <= 2; i++) {
if (s[i] == 'R')
rcnt++;
if (s[i] == 'R' && s[i + 1] == 'R' && s[i] < 2)
cnt++;
}
if (rcnt == 0)
cnt = 0;
cout << cnt << endl;
r... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int cnt = 1;
int rcnt = 0;
for (int i = 0; i <= 2; i++) {
if (s[i] == 'R')
rcnt++;
if (s[i] == 'R' && s[i + 1] == 'R' && i < 2)
cnt++;
}
if (rcnt == 0)
cnt = 0;
cout << cnt << endl;
retu... | [["-", 15, 339, 51, 16, 12, 16, 31, 69, 28, 22], ["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 70], ["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 73]] | 1 | 112 |
#include <bits/stdc++.h>
using namespace std;
int main() {
char s[4];
cin >> s;
int c = 1;
int m = 1;
if (s[0] == s[1] && s[1] == s[2] && s[0] == 'R')
cout << 3 << endl;
else if (s[0] == s[1] && s[0] == 'R')
cout << 2 << endl;
// else if(s[0]==s[2] && s[0]=='R') cout<<2<<endl;
else if (s[1] == ... | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[4];
cin >> s;
int c = 1;
int m = 1;
if (s[0] == s[1] && s[1] == s[2] && s[0] == 'R')
cout << 3 << endl;
else if (s[0] == s[1] && s[0] == 'R')
cout << 2 << endl;
// else if(s[0]==s[2] && s[0]=='R') cout<<2<<endl;
else if (s[1] == ... | [["-", 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>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<bool> vb;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define INT(str) stoi((str), 0)
#define INTB(str) stoi((str), 0, 2) // 2進数の文字列を int に
// cout << fixed << setprecision(1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<bool> vb;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define INT(str) stoi((str), 0)
#define INTB(str) stoi((str), 0, 2) // 2進数の文字列を int に
// cout << fixed << setprecision(1... | [["+", 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 | 121 |
#include "bits/stdc++.h"
#pragma warning(disable : 4996)
typedef long long ll;
#define all(x) (x).begin(), (x).end() // sortなどの引数を省略
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define max3(x, y, z) max(x, max(y, z))
#define min3(x, y, z) min(x, min(y, z))
#ifdef _MSC_FULL_VER //デバッグ出力
#define dout cout
#defi... | #include "bits/stdc++.h"
#pragma warning(disable : 4996)
typedef long long ll;
#define all(x) (x).begin(), (x).end() // sortなどの引数を省略
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define max3(x, y, z) max(x, max(y, z))
#define min3(x, y, z) min(x, min(y, z))
#ifdef _MSC_FULL_VER //デバッグ出力
#define dout cout
#defi... | [["-", 0, 57, 64, 9, 0, 1, 0, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 13], ["-", 75, 76, 0, 9, 0, 1, 0, 16, 12, 13], ["+", 75, 76, 0, 9, 0, 1, 0, 16, 12, 13]] | 1 | 318 |
S = list(input())
#check
#真ん中がR
if S[1] == 'R':
if S[0] == S[2]:
if S[0] == 'R':
print(3)
else:
print(1)
else:
print(2)
#真ん中がS
if S[1] == 'S':
if S[0] == S[2]:
if S[0] == 'R':
print(2)
else:
print(0)
else:
... | S = list(input())
#check
#真ん中がR
if S[1] == 'R':
if S[0] == S[2]:
if S[0] == 'R':
print(3)
else:
print(1)
else:
print(2)
#真ん中がS
if S[1] == 'S':
if S[0] == S[2]:
if S[0] == 'R':
print(1)
else:
print(0)
else:
... | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 105 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <string.h>
#include <vector>
using namespace std;
#define set_precision cout << fixed << setprecision(10)
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repb(i, a, ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <string.h>
#include <vector>
using namespace std;
#define set_precision cout << fixed << setprecision(10)
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repb(i, a, ... | [["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]] | 1 | 334 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 0;
int tmp = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == 'R')
tmp++;
else {
ans = max(ans, tmp);
tmp = 0;
}
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 0;
int tmp = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == 'R')
tmp++;
else {
ans = max(ans, tmp);
tmp = 0;
}
}
cout << max(ans, tmp) << 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, 21], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 88 |
s = input()
S = list(s)
re = 0
a = 0
for i in range(3):
if S[i] == 'R':
a += 1
if a > 0:
if a == 2:
if S[0] == S[1] or S[1] == S[2]:
re = 2
elif S[0] == S[1] and S[1] == S[2] and a == 3:
re = 3
else:
re = 1
else:
re = 0
print(re) | s = input()
S = list(s)
re = 0
a = 0
for i in range(3):
if S[i] == 'R':
a += 1
if a > 0:
if a == 2:
if S[0] == S[1] or S[1] == S[2]:
re = 2
else:
re = 1
elif S[0] == S[1] and S[1] == S[2] and a == 3:
re = 3
else:
re = 1
else:
re = 0
pri... | [["+", 0, 57, 64, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 64, 196, 0, 57, 75, 76, 0, 102], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 114 |
s = str(input())
if s == 'RRR':
print(3)
elif s == 'SSS':
print(0)
elif s[0:] == 'RR' or s[:-1] == 'RR':
print(2)
else:
print(1) | s = str(input())
if s == 'RRR':
print(3)
elif s == 'SSS':
print(0)
elif s[1:] == 'RR' or s[:-1] == 'RR':
print(2)
else:
print(1)
| [["-", 15, 679, 31, 666, 0, 206, 206, 663, 0, 612], ["+", 15, 679, 31, 666, 0, 206, 206, 663, 0, 612]] | 5 | 62 |
weathers = gets
if weathers.scan('SSS').length == 1
p 3
elsif weathers.scan('SS').length == 1
p 2
elsif weathers.scan('S').length > 0
p 1
else
p 0
end | weathers = gets
if weathers.scan('RRR').length == 1
p 3
elsif weathers.scan('RR').length == 1
p 2
elsif weathers.scan('R').length > 0
p 1
else
p 0
end | [["-", 31, 652, 486, 652, 3, 4, 0, 557, 0, 6], ["+", 31, 652, 486, 652, 3, 4, 0, 557, 0, 6]] | 4 | 52 |
S = raw_input()
print(max(map(len, S.split('S')))) | S = input()
print(max(map(len, S.split('S')))) | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 24 |
/*
-------------- | /
| | /
| | /
| * |/ | | ------ *
| | | | / \
| | |\ | | | |\ |
\ ... | /*
-------------- | /
| | /
| | /
| * |/ | | ------ *
| | | | / \
| | |\ | | | |\ |
\ ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 167 |
S = input()
s = [i for i in input()]
if s.count('R') == 3:
print(3)
elif s.count('R') == 1:
print(1)
elif s.count('R') == 0:
print(0)
else:
if S == 'RSR':
print(1)
else:
print(2) | S = input()
s = [i for i in S]
if s.count('R') == 3:
print(3)
elif s.count('R') == 1:
print(1)
elif s.count('R') == 0:
print(0)
else:
if S == 'RSR':
print(1)
else:
print(2) | [["-", 0, 662, 12, 658, 0, 659, 12, 652, 63, 22], ["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 24], ["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 662, 12, 658, 0, 659, 12, 22]] | 5 | 83 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S.at(1) == 'S') {
if (S.at(0) == 'R' || S.at(2) == 'R') {
cout << '1' << endl;
} else {
cout << '0' << endl;
}
} else if (S.at(0) == 'R') {
if (S.at(2) == 'R') {
cout << '3' << endl;
} els... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S.at(1) == 'S') {
if (S.at(0) == 'R' || S.at(2) == 'R') {
cout << '1' << endl;
} else {
cout << '0' << endl;
}
} else if (S.at(0) == 'R') {
if (S.at(2) == 'R') {
cout << '3' << endl;
} els... | [["-", 0, 1, 0, 16, 31, 16, 12, 103, 0, 125], ["+", 0, 1, 0, 16, 31, 16, 12, 103, 0, 125]] | 1 | 160 |
def a(line):
cnt = 0
for i in range(len(line)):
if cnt < 1 and line[i] == 'R':
cnt += 1
continue
if cnt >= 1 and line[i] == line[i-1] and line[i] == 'R':
cnt += 1
continue
return cnt
a(input()) | def b(line):
cnt = 0
for i in range(len(line)):
if cnt < 1 and line[i] == 'R':
cnt += 1
continue
if cnt >= 1 and line[i] == line[i-1] and line[i] == 'R':
cnt += 1
continue
return cnt
print(b(input())) | [["-", 36, 36, 36, 36, 0, 656, 0, 14, 141, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 14, 141, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 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 | 76 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i{0}; i < n; ++i)
#define REP2(i, s, n) for (int i{s}; i < n; ++i)
#define DREP(i, n) for (int i{n - 1}; i <= 0; --i)
#define repa(arr) for (auto &e : arr)
#define DEB(x) (std::cerr << __LINE__ << ": x = " << x << std::endl)
#define DEBa(x) repa(x) DEB(e)
using names... | #include <bits/stdc++.h>
#define REP(i, n) for (int i{0}; i < n; ++i)
#define REP2(i, s, n) for (int i{s}; i < n; ++i)
#define DREP(i, n) for (int i{n - 1}; i <= 0; --i)
#define repa(arr) for (auto &e : arr)
#define DEB(x) (std::cerr << __LINE__ << ": x = " << x << std::endl)
#define DEBa(x) repa(x) DEB(e)
using names... | [["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 60], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 117 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int res;
string s;
cin >> s;
if (s == "SSS")
res = 0;
else if (s == "RRR")
res = 3;
else if (s[1] == 'S')
res = 1;
else
res = 2;
cout << res << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int res;
string s;
cin >> s;
if (s == "SSS")
res = 0;
else if (s == "RRR")
res = 3;
else if (s == "SRS" || s[1] == 'S')
res = 1;
else
res = 2;
cout << res << endl;
return 0;
} | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 15, 339, 51, 16, 31, 16, 12, 5, 0, 62], ["+", 15, 339, 51, 16, 31, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 15, 339, 51, 16, 12, 16, 31, 69, 28, 22]] | 1 | 79 |
s = input()
ans = 0
if s == "SSS":
print(3)
elif "SS" in s:
print(2)
elif "S" in s:
print(1)
else:
print(0) | s = input()
ans = 0
if s == "RRR":
print(3)
elif "RR" in s:
print(2)
elif "R" in s:
print(1)
else:
print(0) | [["-", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["-", 0, 57, 75, 665, 15, 666, 0, 557, 0, 6], ["+", 0, 57, 75, 665, 15, 666, 0, 557, 0, 6]] | 5 | 47 |
n = str(input())
cnt = 0
for i in range(2):
if n[i] == 'R':
cnt += 1
if cnt == 2 and n[i] == 'S':
print(1)
exit(0)
print(cnt) | n = str(input())
cnt = 0
for i in range(3):
if n[i] == 'R':
cnt += 1
if cnt == 2 and n[1] == 'S':
print(1)
exit(0)
print(cnt) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 57, 15, 679, 12, 666, 0, 206, 206, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 206, 206, 612]] | 5 | 58 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s.at(1) == 'R') {
if (s.at(0) == 'R' && s.at(2) == 'R') {
cout << 3 << endl;
return 0;
} else if (s.at(0) == 'R' || s.at(2) == 'R') {
cout << 2 << endl;
return 0;
} else {
cout << 1 << endl... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s.at(1) == 'R') {
if (s.at(0) == 'R' && s.at(2) == 'R') {
cout << 3 << endl;
return 0;
} else if (s.at(0) == 'R' || s.at(2) == 'R') {
cout << 2 << endl;
return 0;
} else {
cout << 1 << endl... | [["-", 0, 1, 0, 16, 31, 16, 12, 103, 0, 104], ["-", 0, 1, 0, 16, 31, 16, 12, 103, 0, 125], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 161 |
s = list(input())
l = len(s)
rain =int()
maxrain =int()
for x in range(l):
if s[x]=="R":
rain=rain+1
maxrain=rain
else:
maxrain=rain
rain=0
print(maxrain) | s = list(input())
l = len(s)
rain =int()
maxrain =int()
for x in range(l):
if s[x]=="R":
rain=rain+1
maxrain=rain
else:
rain=0
maxrain=maxrain
print(maxrain) | [["-", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 22]] | 5 | 62 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String scLine = sc.nextLine();
int result = 0;
int maxResult = 0;
for (int i = 0; i < scLine.length(); i++) {
if (scLine.substring(i, i + 1).equals("R")) {
re... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String scLine = sc.nextLine();
int result = 0;
int maxResult = 0;
for (int i = 0; i < scLine.length(); i++) {
if (scLine.substring(i, i + 1).equals("R")) {
re... | [["+", 15, 15, 0, 492, 500, 492, 3, 4, 0, 21], ["+", 0, 492, 500, 492, 3, 4, 0, 16, 31, 22], ["+", 0, 492, 500, 492, 3, 4, 0, 16, 17, 72], ["+", 0, 492, 500, 492, 3, 4, 0, 16, 12, 499]] | 3 | 145 |
//#define _GLIBCXX_DEBUG
#include <algorithm>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
const int mod = 1e+9 + 7;
int main() {
string s;
cin >> s;
if (s == "RRS" || s... | //#define _GLIBCXX_DEBUG
#include <algorithm>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
const int mod = 1e+9 + 7;
int main() {
string s;
cin >> s;
if (s == "RRS" || s... | [["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6], ["+", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6]] | 1 | 117 |
s = input().rstrip()
if "SSS" in s:
print(3)
elif "SS" in s:
print(2)
elif "S" in s:
print(1)
else:
print(0) | s = input().rstrip()
if "RRR" in s:
print(3)
elif "RR" in s:
print(2)
elif "R" in s:
print(1)
else:
print(0) | [["-", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 6], ["-", 0, 57, 75, 665, 15, 666, 0, 557, 0, 6], ["+", 0, 57, 75, 665, 15, 666, 0, 557, 0, 6]] | 5 | 48 |
elem = input()
single = elem.count("R")
double = elem.count("RR")
triple = elem.count("RRR")
if triple == 1:
print(3)
elif double == 1:
print(2)
else:
if single == 1:
print(1)
else:
print(0) | elem = input()
single = elem.count("R")
double = elem.count("RR")
triple = elem.count("RRR")
if triple == 1:
print(3)
elif double == 1:
print(2)
else:
if single > 0:
print(1)
else:
print(0) | [["-", 75, 76, 8, 196, 0, 57, 15, 666, 667, 60], ["-", 75, 76, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 70 |
#include <stdio.h>
#define reg register
#define ri reg int
#define rep(i, x, y) for (ri i = x; i <= y; ++i)
#define nrep(i, x, y) for (ri i = x; i >= y; --i)
#define DEBUG 1
#define ll long long
#define max(i, j) (i) > (j) ? (i) : (j)
#define min(i, j) (i) < (j) ? (i) : (j)
struct IO {
#define MAXSIZE (1 << 20)
#define... | #include <stdio.h>
#define reg register
#define ri reg int
#define rep(i, x, y) for (ri i = x; i <= y; ++i)
#define nrep(i, x, y) for (ri i = x; i >= y; --i)
#define DEBUG 1
#define ll long long
#define max(i, j) (i) > (j) ? (i) : (j)
#define min(i, j) (i) < (j) ? (i) : (j)
struct IO {
#define MAXSIZE (1 << 20)
#define... | [["-", 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 | 743 |
#include <bits/stdc++.h>
using namespace std;
int main() {
char f, s, t;
int ans = 0;
cin >> f >> s >> t;
if (f == s && f == t && f == 'R')
ans = 3;
else if ((f == s && f == 'R') || (s == t && s == 'R')) {
ans = 2;
} else if (f == 'R' || s == 'R' || t == 'R') {
ans == 1;
} else
ans = 0;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
char f, s, t;
int ans = 0;
cin >> f >> s >> t;
if (f == s && f == t && f == 'R')
ans = 3;
else if ((f == s && f == 'R') || (s == t && s == 'R')) {
ans = 2;
} else if (f == 'R' || s == 'R' || t == 'R') {
ans = 1;
} else
ans = 0;
... | [["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32]] | 1 | 123 |
// Coded by Abhijay Mitra
#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <vector>
// ... | // Coded by Abhijay Mitra
#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <vector>
// ... | [["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13]] | 1 | 389 |
def input_n
gets.to_i # 単一整数
end
def input_s
gets.chomp # 文字列。chompを付けないと改行文字がついてくる
end
def input_a
gets.split.map(&:to_i) # スペースで区切られた複数の整数
end
def input_o(num)
num.times.map { gets.to_i } # 縦に並んだ複数の整数。たまにある
end
def output_f(num)
puts sprintf("%.12f", num)
end
s = input_s
cn... | def input_n
gets.to_i # 単一整数
end
def input_s
gets.chomp # 文字列。chompを付けないと改行文字がついてくる
end
def input_a
gets.split.map(&:to_i) # スペースで区切られた複数の整数
end
def input_o(num)
num.times.map { gets.to_i } # 縦に並んだ複数の整数。たまにある
end
def output_f(num)
puts sprintf("%.12f", num)
end
s = input_s
cn... | [["+", 0, 121, 64, 749, 0, 751, 8, 746, 0, 746], ["+", 8, 736, 0, 121, 64, 749, 0, 751, 0, 121], ["+", 0, 121, 64, 749, 0, 751, 15, 738, 31, 22], ["+", 0, 121, 64, 749, 0, 751, 15, 738, 17, 60], ["+", 0, 121, 64, 749, 0, 751, 15, 738, 12, 612]] | 4 | 117 |
S = input()
count = 0
if S == 'RSR':
print(1)
else:
for i in S:
if i == 'R':
cout+=1
print(count) | S = input()
count = 0
if S == 'RSR':
print(1)
else:
for i in S:
if i == 'R':
count+=1
print(count) | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22]] | 5 | 40 |
s = input()
x = 0
ans = 0
for w in s:
if w == 'R':
ans += 1
else:
x = ans
ans = 0
print(max(x, ans))
| s = input()
x = 0
ans = 0
for w in s:
if w == 'R':
ans += 1
else:
if ans > x:
x = ans
ans = 0
print(max(x, ans))
| [["+", 0, 57, 75, 76, 8, 196, 0, 57, 0, 121], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 57, 75, 76, 8, 196, 0, 57, 0, 102], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22]] | 5 | 43 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int ans = 0, cnt = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == 'R')
ans++;
else {
cnt = max(ans, cnt);
ans = 0;
}
}
cnt = max(cnt, ans);
cout << cnt << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 0, cnt = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == 'R')
ans++;
else {
cnt = max(ans, cnt);
ans = 0;
}
}
cnt = max(cnt, ans);
cout << cnt << endl;
return 0;
} | [["+", 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 | 92 |
#include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | [["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 205 |
s = list(input())
if(s[0] == s[1] == s[2] == "R"):
ans = 3
elif(s[0] == s[1] == "R" or s[2] == s[1] == "R"):
ans = 2
elif(s[0] == s[1] == s[2] == "S"):
ans = 0
else:
ans = 1
pritn(ans)
| s = list(input())
if(s[0] == s[1] == s[2] == "R"):
ans = 3
elif(s[0] == s[1] == "R" or s[2] == s[1] == "R"):
ans = 2
elif(s[0] == s[1] == s[2] == "S"):
ans = 0
else:
ans = 1
print(ans)
| [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22]] | 5 | 101 |
#include <stdio.h>
int count_rainy(char *weather);
int main() {
char weather[4];
int count_num = 0;
scanf("%s", weather);
count_num = count_rainy(weather);
printf("%d\n", count_num);
return 0;
}
int count_rainy(char *weather) {
int count_num = 0;
for (int i = 0; i < 3; i++) {
if (weather[i] != 'a... | #include <stdio.h>
int count_rainy(char *weather);
int main() {
char weather[4];
int count_num = 0;
scanf("%s", weather);
count_num = count_rainy(weather);
printf("%d\n", count_num);
return 0;
}
int count_rainy(char *weather) {
int count_num = 0;
for (int i = 0; i < 3; i++) {
if (weather[i] != 'a... | [["-", 0, 57, 64, 57, 64, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 57, 64, 1, 0, 11, 12, 13]] | 0 | 173 |
#include <iostream>
using namespace std;
int main() {
char s[3];
cin >> s;
int Count = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
Count++;
} else if (s[i] != s[i + 1]) {
break;
}
}
cout << Count << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
char s[3];
cin >> s;
int Count = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
Count++;
if (s[i] != s[i + 1]) {
break;
}
}
}
cout << Count << endl;
return 0;
} | [["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 64, 9, 0, 57, 64, 9, 0, 46]] | 1 | 87 |
#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.find("SSS") < string::npos) {
ans = 3;
} else if (S.find("SS") < string::npos) {
ans = 2;
} else if (S.find("S") < string::npos) {
ans = 1;
... | #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.find("RRR") < string::npos) {
ans = 3;
} else if (S.find("RR") < string::npos) {
ans = 2;
} else if (S.find("R") < string::npos) {
ans = 1;
... | [["-", 51, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 51, 16, 31, 2, 3, 4, 0, 5, 0, 6]] | 1 | 113 |
str=input()
a=str.count("RRR")
b=str.count("RR")
if a==1:
print(3)
elif b==1:
print(2)
else:
if s.count("R")>0:
print(1)
else:
print(0) | s = input()
a = s.count("RRR")
b = s.count("RR")
if a == 1:
print(3)
elif b == 1:
print(2)
else:
if s.count("R") > 0:
print(1)
else:
print(0) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22]] | 5 | 67 |
S = input()
ans = 0
if S[1] != "R" and "R" in S:
ans = 1
elif S[1] == "R":
if S[0] == "R" and S[2] == "R":
ans = 3
elif S[0] == "R" or S[2] == "R":
ans = 2
elif "R" in S:
ans = 1
print(ans)
| S = input()
ans = 0
if S[1] != "R" and "R" in S:
ans = 1
elif S[1] == "R":
if S[0] == "R" and S[2] == "R":
ans = 3
elif S[0] == "R" or S[2] == "R":
ans = 2
else:
ans = 1
elif "R" in S:
ans = 1
print(ans)
| [["+", 75, 665, 64, 196, 0, 57, 75, 76, 0, 95], ["+", 75, 665, 64, 196, 0, 57, 75, 76, 0, 102], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 95 |
import re
S = input()
if re.search(r'R{3}', S):
a = 3
elif re.search(r'R{2}', S):
a = 2
elif re.search(r'R{1}', S):
a = 1
else:
a = 1
print(a) | import re
S = input()
if re.search(r'R{3}', S):
a = 3
elif re.search(r'R{2}', S):
a = 2
elif re.search(r'R{1}', S):
a = 1
else:
a = 0
print(a)
| [["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 61 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define f first
#define s second
#define pii pair<int, int>
#define pb push_back
#define mk make_pair
#define vi vector<int>
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string s;
cin >... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define f first
#define pii pair<int, int>
#define pb push_back
#define mk make_pair
#define vi vector<int>
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string s;
cin >> s;
if (s[0] =... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["-", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13], ["+", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13]] | 1 | 203 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int c1 = 0, c2 = 0, c3 = 0;
for (int i = 0; i < 2; i++) {
if (s[i] == 'R' && s[i + 1] == 'R') {
c1++;
}
}
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
c2++;
} else {
c3+... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int c1 = 0, c2 = 0, c3 = 0;
for (int i = 0; i < 2; i++) {
if (s[i] == 'R' && s[i + 1] == 'R') {
c1++;
}
}
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
c2++;
break;
} els... | [["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 1 | 177 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int max1 = 0, num = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] == 'R')
num++;
if (s[i] == 'S') {
max1 = max(max1, num);
num = 0;
}
}
cout << max1;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int max1 = 0, num = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] == 'R')
num++;
if (s[i] == 'S') {
max1 = max(max1, num);
num = 0;
}
}
cout << max(max1, num);
}
| [["+", 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 | 92 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
string s;
cin >> s;
if (s == "SSS") {
cout << 0 << endl;
} else if (s == ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
string s;
cin >> s;
if (s == "SSS") {
cout << 0 << endl;
} else if (s == ... | [["-", 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 | 115 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.