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 |
|---|---|---|---|---|
# rainy season
def rainy(S):
if 'SSS' in S:
return 3
if 'SS' in S:
return 2
if 'S' in S:
return 1
return 0
if __name__ == "__main__":
input = list(input().split())
print(rainy(input[0]))
| # rainy season
def rainy(S):
if 'RRR' in S:
return 3
if 'RR' in S:
return 2
if 'R' in S:
return 1
return 0
if __name__ == "__main__":
input = list(input().split())
print(rainy(input[0]))
| [["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6]] | 5 | 65 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
typedef vector<int> vec;
typedef vector<vec> mat;
int mai... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
typedef vector<int> vec;
typedef vector<vec> mat;
int mai... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 129 |
s=input()
ans = 0
if 'SSS' in s:
ans = 3
elif 'SS' in s:
ans = 2
elif 'S' in s:
ans = 1
print(ans) | s=input()
ans = 0
if 'RRR' in s:
ans = 3
elif 'RR' in s:
ans = 2
elif 'R' in s:
ans = 1
print(ans) | [["-", 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 | 42 |
from sys import stdin
test = list(stdin.readline().lstrip().rstrip())
count = [0,0]
i=0
before = 'R'
for str in test:
if str=='R':
count[i] += 1
else:
i = i + 1
print(max(count)) | from sys import stdin
test = list(stdin.readline().rstrip())
count = [0,0,0]
i=0
before = 'R'
for str in test:
if str=='R':
count[i] += 1
else:
i = i + 1
print(max(count))
| [["-", 0, 652, 63, 319, 500, 652, 63, 319, 319, 22], ["-", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["-", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25], ["-", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 21]] | 5 | 69 |
// can i beat Mod Love?
#include <bits/stdc++.h>
using namespace std;
#define close std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define eps 1e-8
typedef long long ll;
const double PI = acos(-1.0);
constexpr int INF = 0x3f3f3f3f;
constexpr ll linf = 0x3f3f3f3f3f3f3f3f;
constexpr int mod = 1e9 + 7;
constex... | // can i beat Mod Love?
#include <bits/stdc++.h>
using namespace std;
#define close std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define eps 1e-8
typedef long long ll;
const double PI = acos(-1.0);
constexpr int INF = 0x3f3f3f3f;
constexpr ll linf = 0x3f3f3f3f3f3f3f3f;
constexpr int mod = 1e9 + 7;
constex... | [["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]] | 1 | 154 |
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
int main() {
string S;
cin >> S;
int res = 0;
int a = 0;
rep(i, S.size()) {
if (S[i] == 'R')
a++;
else {
res = max(res, a);
a ... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
int main() {
string S;
cin >> S;
int res = 0;
int a = 0;
rep(i, S.size()) {
if (S[i] == 'R')
a++;
else {
res = max(res, a);
a ... | [["+", 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 | 94 |
#include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int max = 0;
for (int i = 0; i < (int)s.size() - 1; ++i) {
int sum = 0;
if (s[i] == 'R') {
int j = i;
while (s[j] == 'R') {
sum++;
... | #include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int max = 0;
for (int i = 0; i <= (int)s.size() - 1; ++i) {
int sum = 0;
if (s[i] == 'R') {
int j = i;
while (s[j] == 'R') {
sum++;
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 118 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
int max = 0, flag = 0, temp = 0;
for (int i = 0; i < a.size(); i++) {
if (a[i] == 'R') {
if (flag == 0) {
flag = 1;
temp = 1;
}
else
temp++;
} else {
if (max < temp)
m... | #include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
int max = 0, flag = 0, temp = 0;
for (int i = 0; i < a.size(); i++) {
if (a[i] == 'R') {
if (flag == 0) {
flag = 1;
temp = 1;
}
else
temp++;
} else {
if (max < temp)
m... | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 31, 22], ["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 22]] | 1 | 123 |
W = input()
ans = 0
count = 0
for i in range(len(W)):
if W[i] == R:
count += 1
ans = max(ans,count)
else:
count = 0
print(ans) | W = input()
ans = 0
count = 0
for i in range(len(W)):
if W[i] == "R":
count += 1
ans = max(ans,count)
else:
count = 0
print(ans) | [["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 654], ["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 655]] | 5 | 50 |
#include <stdio.h>
#define ZERO 0
#define ONE 1
#define TWO 2
#define THREE 3
int main(void) {
int i;
int state = ZERO;
int proc = 0;
char s[5];
fgets(s, sizeof(s), stdin);
for (i = 0; i < 3; i++) {
if (s[i] == 'R') {
switch (state) {
case ZERO:
state = ONE;
proc = proc <=... | #include <stdio.h>
#define ZERO 0
#define ONE 1
#define TWO 2
#define THREE 3
int main(void) {
int i;
int state = ZERO;
int proc = 0;
char s[5];
fgets(s, sizeof(s), stdin);
for (i = 0; i < 3; i++) {
if (s[i] == 'R') {
switch (state) {
case ZERO:
state = ONE;
proc = proc <=... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 173 |
inn = input()
numS = 0
for c in inn:
if c == 'R':
numS += 1
if numR != 2:
print(numR)
else:
print(1 if inn[1] == 'S' else 2) | inn = input()
numR = 0
for c in inn:
if c == 'R':
numR += 1
if numR != 2:
print(numR)
else:
print(1 if inn[1] == 'S' else 2) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22]] | 5 | 49 |
from time import time
def timer(func):
def f(*args, **kwargs):
before = time()
rv = func(*args, **kwargs)
after = time()
print('temps écoulé', after - before)
return rv
return f
@timer
def A(S):
nb = 0
if S == 'RSR':
print(1)
exit
else:
... | from time import time
def timer(func):
def f(*args, **kwargs):
before = time()
rv = func(*args, **kwargs)
after = time()
print('temps écoulé', after - before)
return rv
return f
def A(S):
nb = 0
if S == 'RSR':
print(1)
exit
else:
for... | [["-", 36, 36, 0, 656, 0, 692, 0, 693, 0, 549], ["-", 36, 36, 0, 656, 0, 692, 0, 693, 0, 22]] | 5 | 125 |
package main
import (
"fmt"
)
func main() {
var weather string
var k int
fmt.Scan(&weather)
for i := 0; i < 3; i++ {
if weather[i] == 'R' {
k++
}
}
if k == 0 || k == 1 || k == 3 {
fmt.Printf("%d", k)
} else if weather[2] == 'S' {
fmt.Printf("1")
} else {
fmt.Printf("2")
}
} | package main
import (
"fmt"
)
func main() {
var weather string
var k int
fmt.Scan(&weather)
for i := 0; i < 3; i++ {
if weather[i] == 'R' {
k++
}
}
if k == 0 || k == 1 || k == 3 {
fmt.Printf("%d", k)
} else if weather[1] == 'S' {
fmt.Printf("1")
} else {
fmt.Printf("2")
}
}
| [["-", 0, 57, 75, 57, 15, 16, 31, 437, 71, 433], ["+", 0, 57, 75, 57, 15, 16, 31, 437, 71, 433], ["+", 36, 36, 36, 36, 36, 36, 0, 434, 0, 165]] | 7 | 117 |
N = input()
for i in range(1,4):
p = "R"*i
if p in N:
ans = i
print(ans) | N = input()
ans = 0
for i in range(1,4):
p = "R"*i
if p in N:
ans = i
print(ans) | [["+", 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 | 34 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
int cnt = 0;
for (int i = 0; i < 3; i++) {
if (S.charAt(i) == 'R') {
if (i == 2 && S.charAt(1) == 'S') {
continue;
}
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
int cnt = 0;
for (int i = 0; i < 3; i++) {
if (S.charAt(i) == 'R') {
if (i == 2 && S.charAt(1) == 'S') {
cnt = 0;
}
... | [["-", 64, 196, 0, 57, 64, 196, 0, 116, 0, 117], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 12, 499]] | 3 | 109 |
S = input()
if S.count("R") == 2 and S[1] != R:
print(1)
else:
print(S.count("R")) | S = input()
if S.count("R") == 2 and S[1] != "R":
print(1)
else:
print(S.count("R")) | [["+", 0, 57, 15, 679, 12, 666, 0, 557, 0, 654], ["+", 0, 57, 15, 679, 12, 666, 0, 557, 0, 655]] | 5 | 41 |
S = input()
# 高々2^3=8通りなので、全て列挙すればよい
# RRR RRS SRR RSR RSS SRS SSR SSS
ans = 0
if S == 'RRR': ans = 3
elif S == 'SRR' and S == 'RRS': ans = 2
elif S == 'SSS': ans = 0
else: ans = 1
print(ans) | S = input()
# 高々2^3=8通りなので、全て列挙すればよい
# RRR RRS SRR RSR RSS SRS SSR SSS
ans = 0
if S == 'RRR': ans = 3
elif S == 'SRR' or S == 'RRS': ans = 2
elif S == 'SSS': ans = 0
else: ans = 1
print(ans) | [["-", 0, 656, 0, 57, 75, 665, 15, 679, 17, 355], ["+", 0, 656, 0, 57, 75, 665, 15, 679, 17, 354]] | 5 | 55 |
s=input()
c=0
tmp=0
for i in range(3):
if s[i]=='s':
tmp+=1
if c<tmp:
c=tmp
else:
tmp=0
print(c) | s=input()
c=0
tmp=0
for i in range(3):
if s[i]=='R':
tmp+=1
if c<tmp:
c=tmp
else:
tmp=0
print(c) | [["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6]] | 5 | 49 |
def main():
S = input()
count = 1
if 'R' in S:
for i in range(len(S)-1):
if S[i] == S[i+1]:
count += 1
print(count)
else:
print(0)
if __name__ == '__main__':
main() | def main():
S = input()
count = 1
if 'R' in S:
for i in range(len(S)-1):
if S[i] == S[i+1] == 'R':
count += 1
print(count)
else:
print(0)
if __name__ == '__main__':
main() | [["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 654], ["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 655]] | 5 | 69 |
x=list(input())
if x.count("R")==0:
print(0)
elif x.count("R")==1:
print(1)
elif x.count("R")==3:
print(3)
else:
if x.pop(2)=="S":
print(1)
else:
print(2) | x=list(input())
if x.count("R")==0:
print(0)
elif x.count("R")==1:
print(1)
elif x.count("R")==3:
print(3)
else:
if x[1]=="S":
print(1)
else:
print(2)
| [["-", 0, 57, 15, 666, 0, 652, 63, 319, 0, 131], ["-", 0, 57, 15, 666, 0, 652, 63, 319, 319, 22], ["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 24], ["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 612], ["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 25], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 70], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 206, ... | 5 | 80 |
//-------wh1ter0se--------------//
#include <bits/stdc++.h>
#define int long long
using namespace std;
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
return (a.second > b.second);
}
int32_t main() {
string s;
cin >> s;
int count = 0, maxcount = 0, j;
for (int i = 0; i < s.length(); i++) {
... | //-------wh1ter0se--------------//
#include <bits/stdc++.h>
#define int long long
using namespace std;
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
return (a.second > b.second);
}
int32_t main() {
string s;
cin >> s;
int count = 0, maxcount = 0, j;
for (int i = 0; i < s.length(); i++) {
... | [["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22]] | 1 | 164 |
#include <iostream>
using namespace std;
int main() {
string a;
cin >> a;
int i, k = 0;
for (i = 0; i < 3; i++) {
if (a.at(i) == 'R') {
k++;
if (a.at(i + 1) != 'R') {
break;
}
}
}
cout << k;
return 0;
} | #include <iostream>
using namespace std;
int main() {
string a;
cin >> a;
int i, k = 0;
for (i = 0; i < 3; i++) {
if (a.at(i) == 'R') {
k++;
if (i != 2 && a.at(i + 1) != 'R') {
break;
}
}
}
cout << k;
return 0;
}
| [["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 85 |
/*****************************************************
* created by: nayakashutosh9
* "Winners Never Quit and Quitters Never Win".
*****************************************************/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("Of... | /*****************************************************
* created by: nayakashutosh9
* "Winners Never Quit and Quitters Never Win".
*****************************************************/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("Of... | [["-", 8, 9, 0, 57, 64, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13]] | 1 | 181 |
#include <bits/stdc++.h>
#include <fstream>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(20) << fixed;
/*
ifstream in("input.txt");
cin.rdbuf(in.rdbuf());
//*/
string S;
cin >> S;
int cnt = 0;
for (int i = 0; i < 3; i++) {
if (S[i] == 'R') {... | #include <bits/stdc++.h>
#include <fstream>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(20) << fixed;
/*
ifstream in("input.txt");
cin.rdbuf(in.rdbuf());
//*/
string S;
cin >> S;
int cnt = 0;
for (int i = 0; i < 3; i++) {
if (S[i] == 'R') {... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 127 |
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
if li[num] == "R" :
count = count + 1
if count == 0 :
re_num = 0
elif count == 1 :
re_num = 1
elif count == 2 and li[2] == "S" :
re_num = 1
elif count == 2 and li[2] == "R" :
re_num = 2
else :
re_num = 3
print(re_num) | S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
if li[num] == "R" :
count = count + 1
if count == 0 :
re_num = 0
elif count == 1 :
re_num = 1
elif count == 2 and li[1] == "S" :
re_num = 1
elif count == 2 and li[1] == "R" :
re_num = 2
else :
re_num = 3
print(re_num) | [["-", 75, 665, 15, 679, 12, 666, 0, 206, 206, 612], ["+", 75, 665, 15, 679, 12, 666, 0, 206, 206, 612]] | 5 | 99 |
#include <bits/stdc++.h>
using namespace std;
int main() {
char s[3];
cin >> s;
if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R') {
cout << 3;
return 0;
} else if ((s[0] == 'R' && s[1] == 'R') || (s[1] == 'R' && s[2] == 'R'))
cout << 2;
else if (s[0] != 'R' && s[1] != 'R' && s[2] != 'R')
cout << ... | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[3];
cin >> s;
if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R') {
cout << 3;
return 0;
} else if ((s[0] == 'R' && s[1] == 'R') || (s[1] == 'R' && s[2] == 'R'))
cout << 2;
else if (s[0] != 'R' && s[1] != 'R' && s[2] != 'R')
cout << ... | [["-", 75, 76, 0, 57, 64, 1, 0, 16, 12, 13], ["+", 75, 76, 0, 57, 64, 1, 0, 16, 12, 13]] | 1 | 149 |
arr = list(input())
z = 1
result = 1
count = 0
for i in range(len(arr) - 1):
if arr[i] == arr[i+1] == "R":
z += 1
result = max(result, z)
else:
z = 0
if set(arr) == {'S'}:
print(0)
else:
print(result)
| arr = list(input())
z = 1
result = 1
count = 0
for i in range(len(arr) - 1):
if arr[i] == arr[i+1] == "R":
z += 1
result = max(result, z)
else:
z = 1
if set(arr) == {'S'}:
print(0)
else:
print(result)
| [["-", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 85 |
t = gets
if t.include? "SSS"
p 3
elsif t.include? "SS"
p 2
elsif t.include? "S"
p 1
else
p 0
end | t = gets
if t.include? "RRR"
p 3
elsif t.include? "RR"
p 2
elsif t.include? "R"
p 1
else
p 0
end | [["-", 0, 121, 15, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 121, 15, 652, 3, 4, 0, 557, 0, 6], ["-", 75, 759, 15, 652, 3, 4, 0, 557, 0, 6], ["+", 75, 759, 15, 652, 3, 4, 0, 557, 0, 6]] | 4 | 34 |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int x = 0, ma = 0;
for (int i = 0; i < 3; i++) {
if (s.at(i) == 'R') {
x++;
} else {
ma = max(ma, x);
}
if (i == 2) {
ma = max(ma, x);
}
}
cout << ma << endl... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int x = 0, ma = 0;
for (int i = 0; i < 3; i++) {
if (s.at(i) == 'R') {
x++;
} else {
ma = max(ma, x);
x = 0;
}
if (i == 2) {
ma = max(ma, x);
}
}
cout ... | [["+", 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 | 101 |
cnt = 0
t = list(input())
for i in range(len(t)):
if "R" * (i + 1) in t:
cnt = i + 1
print(cnt) | cnt = 0
t = input()
for i in range(len(t)):
if "R" * (i + 1) in t:
cnt = i + 1
print(cnt) | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 44 |
// Problem : A - Rainy Season
// Contest : AtCoder - AtCoder Beginner Contest 175
// URL : https://atcoder.jp/contests/abc175/tasks/abc175_a
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
#define ll long lo... |
// Problem : A - Rainy Season
// Contest : AtCoder - AtCoder Beginner Contest 175
// URL : https://atcoder.jp/contests/abc175/tasks/abc175_a
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
#define ll long lo... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 785 |
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
string s1 = s.substr(0, 1), s2 = s.substr(1, 1), s3 = s.substr(2, 1);
int maxCount = 0;
int count = 0;
string rainy = "R";
if (s1 == rainy) {
count++;
}
if (s2 == rainy) {
count++;
} else {
maxCount = count;
co... | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
string s1 = s.substr(0, 1), s2 = s.substr(1, 1), s3 = s.substr(2, 1);
int maxCount = 0;
int count = 0;
string rainy = "R";
if (s1 == rainy) {
count++;
}
if (s2 == rainy) {
count++;
} else {
maxCount = count;
co... | [["+", 0, 1, 0, 11, 12, 41, 15, 16, 17, 47], ["+", 0, 1, 0, 11, 12, 41, 15, 16, 12, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 41, 0, 101], ["+", 0, 9, 0, 1, 0, 11, 12, 41, 64, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 41, 0, 102], ["+", 0, 9, 0, 1, 0, 11, 12, 41, 75, 22]] | 1 | 146 |
s=input()
for i in range(1,4)[::-1]:
if "R"*i in s:
print(i)
break
| s=input()
for i in range(4)[::-1]:
if "R"*i in s:
print(i)
break
| [["-", 0, 7, 12, 206, 51, 652, 3, 4, 0, 612], ["-", 0, 7, 12, 206, 51, 652, 3, 4, 0, 21]] | 5 | 35 |
s=gets.chomp.split
m=0
t=0
for i in 0...3
if s[i]=='R'
t+=1
else
m=[m,t].max
t=0
end
end
m=[m,t].max
puts m
| s=gets.chomp.chars
m=0
t=0
for i in 0...3
if s[i]=='R'
t+=1
else
m=[m,t].max
t=0
end
end
m=[m,t].max
puts m
| [["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 57 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, a, b) for (ll i = (a); i < (b); i++)
#define PER(i, a, b) for (ll i = (a); i >= (b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
#define ALL(a) (a).begin(), (a).end()
const ll INF = 1e18 + 18;
const ll MAX = 200000... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, a, b) for (ll i = (a); i < (b); i++)
#define PER(i, a, b) for (ll i = (a); i >= (b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
#define ALL(a) (a).begin(), (a).end()
const ll INF = 1e18 + 18;
const ll MAX = 200000... | [["+", 8, 9, 0, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 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, 13], ["+", 8, 9, 0, 9, 0, 57, 64, 9, 0, 46]] | 1 | 160 |
x = input()
ans = 0
mx = 0
for l in x:
if l=='R':
ans+=1
elif ans>1:
ans-=1
if ans>mx:
mx = ans
print(mx) | x = input()
ans = 0
mx = 0
for l in x:
if l=='R':
ans+=1
elif ans>0:
ans-=1
if ans>mx:
mx = ans
print(mx)
| [["-", 8, 196, 0, 57, 75, 665, 15, 666, 0, 612], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 0, 612]] | 5 | 46 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
string s;
int sum, ans;
int main() {
cin >> s;
for (int i = 0; i < s.length(); i++) {
if (s[i] == 'R') {
sum++;
ans = max(sum, ans);
} else {
ans = max(sum, ans);
sum = 0;
}
}
... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
string s;
int sum, ans;
int main() {
cin >> s;
for (int i = 0; i < s.length(); i++) {
if (s[i] == 'R') {
sum++;
ans = max(sum, ans);
} else {
ans = max(sum, ans);
sum = 0;
}
}
... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 104 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ar array
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
int c = s[0] == 'R', mx = s[0] == 'R';
for (int i = 1; i < 3; ++i) {
if (s[i] == 'R')
++c;
else
mx = max(mx, c);
}
mx = max(mx,... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ar array
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
int c = s[0] == 'R', mx = s[0] == 'R';
for (int i = 1; i < 3; ++i) {
if (s[i] == 'R')
++c;
else
mx = max(mx, c), c = 0;
}
mx = ... | [["+", 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 | 119 |
input_line = input()
#print(input_line)
charlist = list(input_line)
index = 0
for i in range(3):
if(charlist[i]=="R"):
index += 1
if index==2:
if charlist[1]=="S":
print(1)
else:
print(index) | input_line = input()
#print(input_line)
charlist = list(input_line)
index = 0
for i in range(3):
if(charlist[i]=="R"):
index += 1
if index==2:
if charlist[1]=="S":
print(1)
else:
print(index)
else:
print(index) | [["+", 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, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 63 |
#include <stdio.h>
using namespace std;
/*
Author : Aditya Mishra
*/
int main() {
// freopen("test.txt","r",stdin);
char s[3];
for (long long int i = 0; i < 3; i++)
scanf("%c", &s[i]);
int c = 0;
for (long long int j = 0; j < 3; j++) {
if (s[j] == 'r')
c++;
}
if (c == 3)
printf("3");
... | #include <stdio.h>
using namespace std;
/*
Author : Aditya Mishra
*/
int main() {
// freopen("test.txt","r",stdin);
char s[3];
for (long long int i = 0; i < 3; i++)
scanf("%c", &s[i]);
int c = 0;
for (long long int j = 0; j < 3; j++) {
if (s[j] == 'R')
c++;
}
if (c == 3)
printf("3");
... | [["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]] | 1 | 174 |
S = input()
a = list()
b = 0
u = 0
for i in range (len(S)):
if S[u] == 'R':
b = b + 1
else:
a.append(b)
b = 0
u = u + 1
a.sort()
a.reverse()
print(a[0])
| S = input()
a = list()
b = 0
u = 0
for i in range (len(S)):
if S[u] == 'R':
b = b + 1
else:
a.append(b)
b = 0
u = u + 1
a.append(b)
a.sort()
a.reverse()
print(a[0]) | [["+", 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], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131]] | 5 | 75 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int count = 0;
for (int i = 0; i < 3; i++) {
if (S.at(i) == 'R') {
count++;
}
}
if (count == 3)
cout << 3 << endl;
else if (count == 2 && S.at(2) == 'R')
cout << 2 << endl;
else if (count == 0)
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int count = 0;
for (int i = 0; i < 3; i++) {
if (S.at(i) == 'R') {
count++;
}
}
if (count == 3)
cout << 3 << endl;
else if (count == 2 && S.at(1) == 'R')
cout << 2 << endl;
else if (count == 0)
... | [["-", 51, 16, 12, 16, 31, 2, 3, 4, 0, 13], ["+", 51, 16, 12, 16, 31, 2, 3, 4, 0, 13]] | 1 | 114 |
char c;
t;
main(n) {
while ((c = getchar()) != 10) {
if (c == 'R') {
t++;
n = n > t ? n : t;
} else
t = 0;
}
putchar(n + 48);
return 0;
} | char c;
t, n;
main() {
while ((c = getchar()) != 10) {
if (c == 'R') {
t++;
n = n > t ? n : t;
} else
t = 0;
}
putchar(n + 48);
return 0;
}
| [["+", 36, 36, 0, 30, 0, 43, 0, 42, 0, 21], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["-", 36, 36, 0, 30, 0, 14, 49, 65, 0, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 0 | 63 |
S = list(input())
RD = S.count('R')
if RD != 2:
print(RD)
else:
if S[1] == 'R':
print(RD and 'bbb')
else:
print(1)
| S = list(input())
RD = S.count('R')
if RD != 2:
print(RD)
else:
if S[1] == 'R':
print(RD)
else:
print(1)
| [["-", 0, 1, 0, 652, 3, 4, 0, 679, 17, 355], ["-", 0, 652, 3, 4, 0, 679, 12, 557, 0, 654], ["-", 0, 652, 3, 4, 0, 679, 12, 557, 0, 6], ["-", 0, 652, 3, 4, 0, 679, 12, 557, 0, 655]] | 5 | 53 |
list(input())
r= weather. count("R")
if r==2 and weather[1]=="S":
print(1)
else:
print(r) | weather=list(input())
r= weather. count("R")
if r==2 and weather[1]=="S":
print(1)
else:
print(r)
| [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32]] | 5 | 40 |
c = 0
r = []
for i in input():
if i=='R':
c+=1
else:
r.append(c)
c = 0
if not len(r):
print(c)
else:
print(max(r)) | c = 0
r = []
for i in input():
if i=='R':
c+=1
else:
r.append(c)
c = 0
r.append(c)
if not len(r):
print(c)
else:
print(max(r)) | [["+", 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 | 55 |
#include <stdio.h>
int main() {
char a[4];
scanf("%s", a);
if (a[0] == 'R' && a[1] == 'R' && a[2] == 'R') {
printf("3");
} else if (a[0] = 'R' && a[1] == 'R') {
printf("2");
} else if (a[1] == 'R' && a[2] == 'R') {
printf("2");
} else if (a[0] = 'S' && a[1] == 'S' && a[2] == 'S') {
printf... | #include <stdio.h>
int main() {
char a[4];
scanf("%s", a);
if (a[0] == 'R' && a[1] == 'R' && a[2] == 'R') {
printf("3");
} else if (a[0] == 'R' && a[1] == 'R') {
printf("2");
} else if (a[1] == 'R' && a[2] == 'R') {
printf("2");
} else if (a[0] == 'S' && a[1] == 'S' && a[2] == 'S') {
prin... | [["-", 75, 76, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 60], ["+", 15, 23, 0, 16, 31, 16, 31, 16, 17, 60]] | 0 | 173 |
#include <bits/stdc++.h>
using namespace std;
template <class TH> void _dbg(const char *sdbg, TH h) {
cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
while (*sdbg != ',')
cerr << *sdbg++;
cerr << '=' << h << ',';
_dbg(sdbg + 1, a...);
}
temp... | #include <bits/stdc++.h>
using namespace std;
template <class TH> void _dbg(const char *sdbg, TH h) {
cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
while (*sdbg != ',')
cerr << *sdbg++;
cerr << '=' << h << ',';
_dbg(sdbg + 1, a...);
}
temp... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 687 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int n = 0;
string S;
cin >> S;
for (int i = 0; i < 3; i++) {
if (S[i] == 'S')
n++;
}
if (S[1] == 'R' && n > 0)
cout << "1" << endl;
else
cout << n << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int n = 0;
string S;
cin >> S;
for (int i = 0; i < 3; i++) {
if (S[i] == 'R')
n++;
}
if (S[1] == 'S' && n > 0)
cout << "1" << endl;
else
cout << n << endl;
return 0;
} | [["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["-", 15, 339, 51, 16, 31, 16, 12, 103, 0, 125], ["+", 15, 339, 51, 16, 31, 16, 12, 103, 0, 125]] | 1 | 89 |
s = input()
c = 0
m = 0
for i in s:
if i == 'R':
c += 1
else:
if m < c:
m = c
c = 0
print(m) | s = input()
c = 0
m = 0
for i in s:
if i == 'R':
c += 1
else:
if m < c:
m = c
c = 0
print(m if m > c else c) | [["+", 0, 1, 0, 652, 3, 4, 0, 41, 0, 121], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 47], ["+", 0, 1, 0, 652, 3, 4, 0, 41, 0, 95], ["+", 0, 1, 0, 652, 3, 4, 0, 41, 0, 22]] | 5 | 43 |
s = gets
cnt = 0
max = 0
s.times do |a|
if a == 'R'
cnt += 1
else
cnt =0
end
if max <cnt
max = cnt
end
end
p max | s = gets
cnt = 0
max = 0
3.times do |a|
if s[a] == 'R'
cnt += 1
else
cnt =0
end
if max <cnt
max = cnt
end
end
p max | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 486, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 486, 612], ["+", 8, 736, 0, 121, 15, 738, 31, 742, 500, 22], ["+", 8, 736, 0, 121, 15, 738, 31, 742, 0, 70], ["+", 8, 736, 0, 121, 15, 738, 31, 742, 0, 73]] | 4 | 41 |
#include <stdio.h>
int main() {
char weather[3];
int seaquence = 0;
int i, s = 0;
scanf("%s", weather);
for (i = 0; i < 2; i++) {
if (weather[i] == 'R') {
s++;
} else {
s = 0;
}
if (seaquence <= s) {
seaquence = s;
}
}
printf("%d\n", seaquence);
} | #include <stdio.h>
int main() {
char weather[3];
int seaquence = 0;
int i, s = 0;
scanf("%s", weather);
for (i = 0; i < 3; i++) {
if (weather[i] == 'R') {
s++;
} else {
s = 0;
}
if (seaquence <= s) {
seaquence = s;
}
}
printf("%d\n", seaquence);
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 0 | 95 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
using VI = vector<int>;
int main() {
#ifdef LOCAL_EXEC
// freopen("sample.in", "r", stdin);
// freopen("sample.out", "w", stdout);
#else
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#endif
string s;
cin >> s;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
using VI = vector<int>;
int main() {
#ifdef LOCAL_EXEC
// freopen("sample.in", "r", stdin);
// freopen("sample.out", "w", stdout);
#else
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#endif
string s;
cin >> s;
... | [["-", 49, 50, 51, 16, 31, 69, 341, 342, 0, 13], ["+", 49, 50, 51, 16, 31, 69, 341, 342, 0, 13]] | 1 | 117 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ss second
#define ff first
#define pb push_back
int main() {
ios_base::sync_with_stdio(0);
string x;
cin >> x;
int o = 0, s = 0, k = 0;
for (int i = 0; i < x.size(); i++) {
if (o == 0 && x[i] == 'R') {
s++;
} else {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ss second
#define ff first
#define pb push_back
int main() {
ios_base::sync_with_stdio(0);
string x;
cin >> x;
int o = 0, s = 0, k = 0;
for (int i = 0; i < x.size(); i++) {
if (o == 0 && x[i] == 'R') {
s++;
} else {
... | [["+", 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 | 113 |
S = input()
n_rainy_day = 0
for i in range(3):
if S[i] == 'S':
if n_rainy_day == 0:
n_rainy_day += 1
elif S[i-1] == 'S':
n_rainy_day += 1
print(n_rainy_day)
| S = input()
n_rainy_day = 0
for i in range(3):
if S[i] == 'R':
if n_rainy_day == 0:
n_rainy_day += 1
elif S[i-1] == 'R':
n_rainy_day += 1
print(n_rainy_day) | [["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 8, 196, 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 | 53 |
S = list(input())
X = 0
if S[1] == "R":
if S[0] == S[1] or S[1] == S[2]:
if S[0] == "R" and S[2] == "R":
X = 3
else:
X = 2
elif S[0] == "R" or S[2] =="R":
X = 1
print(X) | S = list(input())
X = 0
if S[1] == "R":
if S[0] == S[1] or S[1] == S[2]:
if S[0] == "R" and S[2] == "R":
X = 3
else:
X = 2
else:
X=1
elif S[0] == "R" or S[2] =="R":
X = 1
print(X) | [["+", 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 | 95 |
import math
n=0
result=0
k=input()
for i in range(len(k)):
if k[i]=="R":
n+=1
else:
result=max(result,n)
result=max(result,n)
print(result) | import math
n=0
result=0
k=input()
for i in range(len(k)):
if k[i]=="R":
n+=1
else:
result=max(result,n)
n=0
result=max(result,n)
print(result) | [["+", 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 | 59 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int count = 0;
int max_count = INT_MIN;
for (int i = 0; i < s.length(); i++) {
if (s[i] == 'R') {
count++;
max_count = max(max_count, count);
} else {
count = 1;
}
}
if (max_count == INT_MIN)
c... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int count = 0;
int max_count = INT_MIN;
for (int i = 0; i < s.length(); i++) {
if (s[i] == 'R') {
count++;
max_count = max(max_count, count);
} else {
count = 0;
}
}
if (max_count == INT_MIN)
c... | [["-", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13]] | 1 | 100 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
bool p = S[0] == 'R';
bool q = S[1] == 'R';
bool r = S[2] == 'R';
if (p and q and r)
cout << 1 << endl;
else if ((p and q) or (q and r))
cout << 2 << endl;
else if (p or q or r)
cout << 1 << endl;
else
cou... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
bool p = S[0] == 'R';
bool q = S[1] == 'R';
bool r = S[2] == 'R';
if (p and q and r)
cout << 3 << endl;
else if ((p and q) or (q and r))
cout << 2 << endl;
else if (p or q or r)
cout << 1 << endl;
else
cou... | [["-", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13], ["+", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13]] | 1 | 115 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef tree<ii, null_type, less<ii>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
int main() {
cin.tie(0);
cout.tie(... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef tree<ii, null_type, less<ii>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
int main() {
cin.tie(0);
cout.tie(... | [["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6], ["+", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6]] | 1 | 146 |
S = input()
row_now = 0
row_max = 0
for day in S:
if day == "S":
row_now += 1
else:
row_now = 0
if row_now > row_max:
row_max = row_now
print(row_max)
| S = input()
row_now = 0
row_max = 0
for day in S:
if day == "R":
row_now += 1
else:
row_now = 0
if row_now > row_max:
row_max = row_now
print(row_max)
| [["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6]] | 5 | 43 |
#include "algorithm"
#include "cmath"
#include "deque"
#include "iostream"
#include "math.h"
#include "string"
#include "vector"
using namespace std;
typedef long long ll;
int main() {
string str;
cin >> str;
int cnt = 0, max = 0;
for (int i = 0; i < 2; i++) {
if (str[i] == 'R') {
cnt++;
if (cn... | #include "algorithm"
#include "cmath"
#include "deque"
#include "iostream"
#include "math.h"
#include "string"
#include "vector"
using namespace std;
typedef long long ll;
int main() {
string str;
cin >> str;
int cnt = 0, max = 0;
for (int i = 0; i < 3; i++) {
if (str[i] == 'R') {
cnt++;
if (cn... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 116 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[1] == s[2] && s[1] == 'R') {
cout << 3 << endl;
} else if (s[1] == s[2] && s[1] == 'R') {
cout << 2 << endl;
} else if (s[2] == s[3] && s[2] == 'R') {
cout << 2 << endl;
} else if (s[1] == 'R' |... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[1] == s[2] && s[1] == 'R') {
cout << 3 << endl;
} else if (s[0] == s[1] && s[1] == 'R') {
cout << 2 << endl;
} else if (s[1] == s[2] && s[1] == 'R') {
cout << 2 << endl;
} else if (s[1] == 'R' |... | [["-", 51, 16, 31, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 16, 31, 16, 31, 69, 341, 342, 0, 13], ["-", 51, 16, 31, 16, 12, 69, 341, 342, 0, 13], ["+", 51, 16, 31, 16, 12, 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 | 165 |
#include <stdio.h>
int main() {
char s[3];
int c = 0;
int exit = 0;
for (int i = 0; i < 3; i++) {
scanf("%c", &s[i]);
}
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
for (int j = i; j < 3; j++) {
if (s[j] == 'R')
c = c + 1;
else {
exit = 1;
bre... | #include <stdio.h>
int main() {
char s[3];
int c = 0;
int exit = 0;
for (int i = 0; i < 3; i++) {
scanf("%c", &s[i]);
}
for (int i = 0; i < 3; i++) {
if (s[i] == 'R') {
for (int j = i; j < 3; j++) {
if (s[j] == 'R')
c = c + 1;
else {
exit = 1;
bre... | [["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 0 | 141 |
#include <iostream>
using namespace std;
#define int long long int
signed main() {
string s;
cin >> s;
int count = 0;
for (char ch : s)
if (ch == 'R')
count++;
if (count == 3)
cout << 3 << "\n";
else if (count == 1)
cout << 1 << "\n";
else if (count == 2) {
if (s[0] == s[1] || s[... | #include <iostream>
using namespace std;
#define int long long int
signed main() {
string s;
cin >> s;
int count = 0;
for (char ch : s)
if (ch == 'R')
count++;
if (count == 3)
cout << 3 << "\n";
else if (count == 1)
cout << 1 << "\n";
else if (count == 2) {
if (s[0] == s[1] || s[... | [["-", 75, 76, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 75, 76, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 134 |
#include <stdio.h>
int main() {
char a[3];
int count = 0;
for (int i = 0; i < 3; i++) {
scanf("%c", a[i]);
if (a[i] == 'R')
count++;
}
if (count == 3)
printf("3");
else if (count == 2 && a[1] == 'S')
printf("0");
else if (count == 2)
printf("2");
else
printf("%d", count);
}... | #include <stdio.h>
int main() {
char a[3];
int count = 0;
for (int i = 0; i < 3; i++) {
scanf("%c", &a[i]);
if (a[i] == 'R')
count++;
}
if (count == 3)
printf("3");
else if (count == 2 && a[1] == 'S')
printf("1");
else if (count == 2)
printf("2");
else
printf("%d", count);
... | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 121 |
#include <bits/stdc++.h>
using namespace std;
#define INF LONG_LONG_MAX
#define int long long
#define ar array
#define db double
#define pi 3.14159265358979323846
#define pow pw
int pw(int a, int b) {
int ans = 1;
while (b) {
if (b % 2)
ans *= a;
a *= a;
b /= 2;
}
return (ans);
}
signed main()... | #include <bits/stdc++.h>
using namespace std;
#define INF LONG_LONG_MAX
#define int long long
#define ar array
#define db double
#define pi 3.14159265358979323846
#define pow pw
int pw(int a, int b) {
int ans = 1;
while (b) {
if (b % 2)
ans *= a;
a *= a;
b /= 2;
}
return (ans);
}
signed main()... | [["+", 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 | 169 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int c = 0;
if (s[1] == 'R') {
if (s[1] == 'R')
c++;
if (s[2] == 'R')
c++;
c++;
} else if (s[0] == 'R' || s[2] == 'R')
c++;
cout << c << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int c = 0;
if (s[1] == 'R') {
if (s[0] == 'R')
c++;
if (s[2] == 'R')
c++;
c++;
} else if (s[0] == 'R' || s[2] == 'R')
c++;
cout << c << endl;
return 0;
} | [["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13]] | 1 | 101 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int count = 0;
for (int i = 0; i < 3; i++) {
if (S.at(i) == 'R') {
count++;
}
}
if (count == 2 && S.at(1) == 'S')
count = 0;
// if(count == 1) count = 0;
cout << count << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int count = 0;
for (int i = 0; i < 3; i++) {
if (S.at(i) == 'R') {
count++;
}
}
if (count == 2 && S.at(1) == 'S')
count = 1;
// if(count == 1) count = 0;
cout << count << endl;
} | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13]] | 1 | 86 |
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R')
cout << 3;
else if (s[0] == 'R' && s[2] == 'R')
cout << 1 << endl;
else if (s[0] == 'R' && s[1] == 'R')
cout << 2 << endl;
else if (s[1] == 'R' && s[2] == 'R')
cout << 2... | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R')
cout << 3;
else if (s[0] == 'R' && s[2] == 'R')
cout << 1 << endl;
else if (s[0] == 'R' && s[1] == 'R')
cout << 2 << endl;
else if (s[1] == 'R' && s[2] == 'R')
cout <<... | [["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]] | 1 | 319 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
auto res = 0;
auto maxRes = 0;
for (auto &&value : s) {
if (value == 'R')
res++;
else
res = 0;
if (maxRes < res)
maxRes = res;
}
cout << res;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
auto res = 0;
auto maxRes = 0;
for (auto &&value : s) {
if (value == 'R')
res++;
else
res = 0;
if (maxRes < res)
maxRes = res;
}
cout << maxRes;
}
| [["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int ans = 0, mx = 0;
cin >> s;
for (int i = 0; i < 2; i++) {
if (s[i] == 'S') {
mx = max(mx, ans);
ans = 0;
} else
ans++;
}
cout << max(mx, ans) << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int ans = 0, mx = 0;
cin >> s;
for (int i = 0; i < 3; i++) {
if (s[i] == 'S') {
mx = max(mx, ans);
ans = 0;
} else
ans++;
}
cout << max(mx, ans) << endl;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 85 |
S=input()
ans=0
tmp=0
for s in S:
if s=='S':
tmp+=1
else:
ans=max(ans,tmp)
tmp=0
print(max(ans,tmp)) | S=input()
ans=0
tmp=0
for s in S:
if s=='R':
tmp+=1
else:
ans=max(ans,tmp)
tmp=0
print(max(ans,tmp)) | [["-", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6], ["+", 8, 196, 0, 57, 15, 666, 0, 557, 0, 6]] | 5 | 48 |
S = input()
answers = [0]
ans = 0
i = 0
while i <= 2:
if S[i] == 'R':
ans += 1
else:
answers.append(ans)
ans += 0
i += 1
answers.append(ans)
print(max(answers))
| S = input()
answers = [0]
ans = 0
i = 0
while i <= 2:
if S[i] == 'R':
ans += 1
else:
answers.append(ans)
ans = 0
i += 1
answers.append(ans)
print(max(answers))
| [["-", 75, 76, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 75, 76, 8, 196, 0, 1, 0, 662, 0, 32]] | 5 | 61 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using ll = long long;
using uint = unsigned int;
using graph = std::vector<std::vector<ll>>;
using wGraph = std::vector<std::vector<std::pair<l... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using ll = long long;
using uint = unsigned int;
using graph = std::vector<std::vector<ll>>;
using wGraph = std::vector<std::vector<std::pair<l... | [["-", 51, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 51, 16, 31, 2, 3, 4, 0, 5, 0, 6]] | 1 | 1,184 |
s=input()
if s.count("RRR")>0:
print(3)
elif s.cout("RR")>0:
print(2)
elif s.cout("R")>0:
print(1)
else:
print(0) | s=input()
if s.count("RRR")>0:
print(3)
elif s.count("RR")>0:
print(2)
elif s.count("R")>0:
print(1)
else:
print(0) | [["-", 75, 665, 15, 666, 0, 652, 63, 319, 319, 22], ["+", 75, 665, 15, 666, 0, 652, 63, 319, 319, 22]] | 5 | 59 |
#include <bits/stdc++.h>
typedef long long ll;
#define mod 1000000007
#define INF 1000000000
#define endl "\n"
#define all(s) s.begin(), s.end()
#define pb push_back
#define uno unordered_map
#define pi 3.1415926536
#define dig(a) fixed << setprecision(a)
#define w(zz) ... | #include <bits/stdc++.h>
typedef long long ll;
#define mod 1000000007
#define INF 1000000000
#define endl "\n"
#define all(s) s.begin(), s.end()
#define pb push_back
#define uno unordered_map
#define pi 3.1415926536
#define dig(a) fixed << setprecision(a)
#define w(zz) ... | [["-", 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 | 240 |
#include <bits/stdc++.h>
#define LOCAL
using namespace std;
#ifdef LOCAL
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...) 42
#endif
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f... | #include <bits/stdc++.h>
#define LOCAL
using namespace std;
#ifdef LOCAL
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...) 42
#endif
template <typename Arg1> void __f(const char *name, Arg1 &&arg1) {
cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f... | [["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 262 |
str = input()
splited = list(str)
cccount = 0
count = 0
for s in splited:
if s == 'R':
count = count + 1
else:
if count > cccount:
cccount = count
count = 0
print(cccount)
| str = input()
splited = list(str)
cccount = 0
count = 0
for s in splited:
if s == 'R':
count = count + 1
if count > cccount:
cccount = count
else:
count = 0
print(cccount)
| [["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102]] | 5 | 51 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
int main() {
ios_base::sync_with_stdio(false);
ll t, n;
string s;
cin >> s;
if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R')
cout << 3 << endl;
else if ((s[0] == 'R' && s[1] == 'R') || (s[1] == 'R' && s[2] == 'R'... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
int main() {
ios_base::sync_with_stdio(false);
ll t, n;
string s;
cin >> s;
if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R')
cout << 3 << endl;
else if ((s[0] == 'R' && s[1] == 'R') || (s[1] == 'R' && s[2] == 'R'... | [["-", 0, 57, 75, 76, 0, 1, 0, 16, 12, 13], ["+", 0, 57, 75, 76, 0, 1, 0, 16, 12, 13]] | 1 | 158 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == 'R') {
if (s[1] == 'R') {
if (s[2] == 'R') {
cout << '3';
return 0;
} else {
cout << '2';
return 0;
}
} else {
cout << '1';
return 0;
}
} else {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == 'R') {
if (s[1] == 'R') {
if (s[2] == 'R') {
cout << '3';
return 0;
} else {
cout << '2';
return 0;
}
} else {
cout << '1';
return 0;
}
} else {
... | [["-", 64, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 178 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s == "RRR") {
cout << 3 << endl;
}
if (s == "RRS" || s == "SRR") {
cout << 2 << endl;
}
if (s == "SSS") {
cout << 0 << endl;
} else {
cout << 1 << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s == "RRR") {
cout << 3 << endl;
} else if (s == "RRS" || s == "SRR") {
cout << 2 << endl;
} else if (s == "SSS") {
cout << 0 << endl;
} else {
cout << 1 << endl;
}
return 0;
} | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]] | 1 | 85 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner scan = new Scanner(System.in)) {
String S = scan.next();
char one = S.charAt(0);
char two = S.charAt(1);
char thr = S.charAt(2);
int max = 0;
if (one == 'R') {
max+... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner scan = new Scanner(System.in)) {
String S = scan.next();
char one = S.charAt(0);
char two = S.charAt(1);
char thr = S.charAt(2);
int max = 0;
if (one == 'R') {
max+... | [["+", 0, 57, 64, 196, 0, 1, 0, 27, 0, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 27, 0, 29], ["+", 75, 196, 0, 57, 64, 196, 0, 1, 0, 35]] | 3 | 184 |
s = input().split('S')
ans = 0
for i in s:
if len(s) > ans:
ans = len(s)
print(ans) | s = input().split('S')
ans = 0
for i in s:
if len(i) > ans:
ans = len(i)
print(ans)
| [["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 22], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]] | 5 | 38 |
// Author: master19
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long int
#define ff first
#define ss second
#define pb push_back
#define endl "\n"
#define PI acos(-1.0)
#define mod 1000000007LL /... | // Author: master19
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long int
#define ff first
#define ss second
#define pb push_back
#define endl "\n"
#define PI acos(-1.0)
#define mod 1000000007LL /... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 412 |
/*
ID: varunra2
LANG: C++
TASK: nondec
*/
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include "lib/debug.h"
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#pragma GCC diagnostic ignored "-Wsign-compare"
//#pragma GCC diagnostic ignored "-Wunused-parameter"
//#pragma GCC... | /*
ID: varunra2
LANG: C++
TASK: nondec
*/
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include "lib/debug.h"
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#pragma GCC diagnostic ignored "-Wsign-compare"
//#pragma GCC diagnostic ignored "-Wunused-parameter"
//#pragma GCC... | [["+", 0, 7, 8, 9, 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, 13], ["+", 8, 9, 0, 57, 75, 76, 0, 1, 0, 35]] | 1 | 305 |
s = input()
r = 3 if s == 'RRR' else 1
if 'RR' in s:
r = 2
elif not 'R' in s:
r = 0
print(r) | s = input()
r = 3 if s == 'RRR' else 1
if 'RR' in s and s != 'RRR':
r = 2
elif not 'R' in s:
r = 0
print(r) | [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 79], ["+", 0, 57, 15, 679, 12, 666, 0, 557, 0, 654], ["+", 0, 57, 15, 679, 12, 666, 0, 557, 0, 6], ["+", 0, 57, 15, 679, 12, 666, 0, 557, 0, 655]] | 5 | 41 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string s;
cin >> s;
char p = (s.at(0) == 'R');
char q = (s.at(1) == 'R');
char r = (s.at(2) == 'R');
if (p && q && r) {
cout << 3 << endl;
} else if ((p && q) || (p && r)) {
cout << 2 << endl;
} else if (p || q |... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string s;
cin >> s;
bool p = (s.at(0) == 'R');
bool q = (s.at(1) == 'R');
bool r = (s.at(2) == 'R');
if (p && q && r) {
cout << 3 << endl;
} else if ((p && q) || (q && r)) {
cout << 2 << endl;
} else if (p || q |... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 15, 339, 51, 16, 12, 23, 0, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 31, 22]] | 1 | 141 |
S = input()
if S == 'RRR':
print(3)
elif S == 'RRS' or S == 'RRS':
print(2)
elif 'R' in S:
print(1)
else:
print(0)
| S = input()
if S == 'RRR':
print(3)
elif S == 'RRS' or S == 'SRR':
print(2)
elif 'R' in S:
print(1)
else:
print(0)
| [["-", 75, 665, 15, 679, 12, 666, 0, 557, 0, 6], ["+", 75, 665, 15, 679, 12, 666, 0, 557, 0, 6]] | 5 | 50 |
S = input()
if S == "RRR":
print(3)
elif S == "SSS":
print(0)
elif S[0:2] == "R" or S[1:3] == "R":
print(2)
else:
print(1) | S = input()
if S == "RRR":
print(3)
elif S == "SSS":
print(0)
elif S[0:2] == "RR" or S[1:3] == "RR":
print(2)
else:
print(1) | [["-", 75, 665, 15, 679, 31, 666, 0, 557, 0, 6], ["+", 75, 665, 15, 679, 31, 666, 0, 557, 0, 6], ["-", 75, 665, 15, 679, 12, 666, 0, 557, 0, 6], ["+", 75, 665, 15, 679, 12, 666, 0, 557, 0, 6]] | 5 | 60 |
S = input()
if S == "RRR":
print("3")
elif S == "RRS" or "SRR":
print("2")
elif S == "SSS":
print("0")
else:
print("1")
| S = input()
if S == "RRR":
print("3")
elif S == "RRS" or S == "SRR":
print("2")
elif S == "SSS":
print("0")
else:
print("1")
| [["+", 0, 57, 75, 665, 15, 679, 12, 666, 0, 22], ["+", 0, 57, 75, 665, 15, 679, 12, 666, 667, 60]] | 5 | 56 |
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define ll long long
#define pb push_back
#define pll pair<ll, ll>
#define mll map<ll, ll>
#define pii pair<int, int>
#define rep(i, n) for (int i = 0; i < n; i++)
#define All(x, v) for (auto x... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
#define ll long long
#define pb push_back
#define pll pair<ll, ll>
#define mll map<ll, ll>
#define pii pair<int, int>
#define rep(i, n) for (int i = 0; i < n; i++)
#define All(x, v) for (auto x... | [["+", 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 | 662 |
//#include<bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
/*
#include <boost/multiprecision/cpp_dec_float.hpp>
#include<boost/multiprecision/cpp_int.hpp>
#include <boost/rational.hpp>
namespace mp = boost::multiprecision;
using Real = mp::numb... | //#include<bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
/*
#include <boost/multiprecision/cpp_dec_float.hpp>
#include<boost/multiprecision/cpp_int.hpp>
#include <boost/rational.hpp>
namespace mp = boost::multiprecision;
using Real = mp::numb... | [["+", 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 | 134 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String s = scanner.nextLine();
int cnt = 0, ans = 0;
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == 'S') {
cnt++;
ans = Math.max(ans, cnt);... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String s = scanner.nextLine();
int cnt = 0, ans = 0;
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == 'R') {
cnt++;
ans = Math.max(ans, cnt);... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 252], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 252]] | 3 | 116 |
package main
import (
"bufio"
"fmt"
"os"
)
func max(a , b int) int {
if a < b {
return b
}
return a
}
func main() {
r := bufio.NewReader(os.Stdin)
w := bufio.NewWriter(os.Stdout)
defer w.Flush()
var s string
fmt.Fscan(r, &s)
counting := true
cnt := 0
ans := 0
for _, v := range s {
if counting {
... | package main
import (
"bufio"
"fmt"
"os"
)
func max(a , b int) int {
if a < b {
return b
}
return a
}
func main() {
r := bufio.NewReader(os.Stdin)
w := bufio.NewWriter(os.Stdout)
defer w.Flush()
var s string
fmt.Fscan(r, &s)
counting := true
cnt := 0
ans := 0
for _, v := range s {
if counting {
... | [["+", 0, 57, 64, 196, 0, 436, 31, 432, 0, 22], ["+", 75, 196, 0, 57, 64, 196, 0, 436, 17, 32], ["+", 0, 57, 64, 196, 0, 436, 12, 432, 0, 146], ["+", 0, 57, 75, 196, 0, 57, 64, 196, 0, 165]] | 7 | 180 |
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = ... | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = ... | [["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 505 |
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
char s[4];
scanf("%s", s);
int i, max = 0, m = 0;
for (i = 0; s[i]; i++) {
if (s[i] == 'R' || s[i] == 'r')
m++;
if (m > max)
max = m;
}
printf("%d\n", max);
} | #include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
char s[4];
scanf("%s", s);
int i, max = 0, m = 0;
for (i = 0; s[i]; i++) {
if (s[i] == 'R' || s[i] == 'r')
m++;
else
m = 0;
if (m > max)
max = m;
}
printf("%d\n", max);
} | [["+", 0, 7, 8, 9, 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, 13], ["+", 8, 9, 0, 57, 75, 76, 0, 1, 0, 35]] | 0 | 103 |
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
static final Scanner sc = new Scanner(System.in);
public static void main() {
final Pattern p = Pattern.compile("R+");
final Matcher m = p.matcher(sc.next());
if (m.find()) {
System.out.println... | import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
static final Scanner sc = new Scanner(System.in);
public static void main(final String[] args) {
final Pattern p = Pattern.compile("R+");
final Matcher m = p.matcher(sc.next());
if (m.find()) {
... | [["+", 0, 195, 54, 495, 0, 496, 0, 494, 0, 535], ["+", 0, 195, 54, 495, 0, 496, 39, 224, 468, 78], ["+", 54, 495, 0, 496, 39, 224, 497, 497, 0, 70], ["+", 54, 495, 0, 496, 39, 224, 497, 497, 0, 73], ["+", 8, 498, 0, 195, 54, 495, 0, 496, 141, 22]] | 3 | 118 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
string S;
cin >> S;
if (S == "RRR") {
cout << 3 << endl;
} else if (S == "RRS" || S == "SRR") {
cout << 2 << endl;
} else if (S == "SSS") {
cout << 0 << endl;
} else {
cout << 1 << endl;
}
cout << "aa";
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string S;
cin >> S;
if (S == "RRR") {
cout << 3 << endl;
} else if (S == "RRS" || S == "SRR") {
cout << 2 << endl;
} else if (S == "SSS") {
cout << 0 << endl;
} else {
cout << 1 << endl;
}
} | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 91 |
a = list(input())
c = 0
x = []
for i in a:
print(i)
if i == 'R':
c += 1
else:
x.append(c)
c = 0
x.append(c)
print(max(x)) | a = list(input())
c = 0
x = []
for i in a:
if i == 'R':
c += 1
else:
x.append(c)
c = 0
x.append(c)
print(max(x)) | [["-", 0, 7, 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, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 58 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.