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 |
|---|---|---|---|---|
import java.util.Scanner;
public class Main {
public static void main(String[] args) { // No TLE!!
Scanner input = new Scanner(System.in);
int N = Integer.parseInt(input.nextLine());
String S = input.nextLine();
int[][] counts = counters(S, N);
/*for (int i = 0; i < N; i++) {
System.... | import java.util.Scanner;
public class Main {
public static void main(String[] args) { // No TLE!!
Scanner input = new Scanner(System.in);
int N = Integer.parseInt(input.nextLine());
String S = input.nextLine();
int[][] counts = counters(S, N);
/*for (int i = 0; i < N; i++) {
System.... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 551 |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
public class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in))... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
public class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in))... | [["-", 0, 246, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 246, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 39, 224, 468, 506, 0, 507], ["+", 8, 196, 0, 503, 39, 224, 468, 506, 0, 96], ["-", 0, 503, 49, 200, 51, 227, 39, 506, 0, 507], ["+", 0, 503, 49, 200, 51, 227, 39, 506, 0, 96]] | 3 | 626 |
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
int main() {
ll n;
string s;
cin >> n;
cin >> s;
int cnt_r = 0, cnt_g = 0, cnt_b = 0;
rep(i, n) {
if (s[i] == 'R'... | #include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
int main() {
ll n;
string s;
cin >> n;
cin >> s;
ll cnt_r = 0, cnt_g = 0, cnt_b = 0;
rep(i, n) {
if (s[i] == 'R')... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 231 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
string s;
cin >> s;
map<char, int> cnts;
for (char c : s)
cnts[c]++;
int ret = cnts['R'] * cnts['G'] * cnts['B'];
for (int i = 0; i < n; i++) {
for (int j = i; j < n; j += 2) {
if (s[i] ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
string s;
cin >> s;
map<char, ll> cnts;
for (char c : s)
cnts[c]++;
ll ret = cnts['R'] * cnts['G'] * cnts['B'];
for (int i = 0; i < n; i++) {
for (int j = i; j < n; j += 2) {
if (s[i] !=... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 164 |
N=int(input())
S=input()
r = len(S.replace("G", "").replace("B", ""))
g = len(S.replace("R", "").replace("B", ""))
b = N - r - g
ans = r * g
ans = ans * b
for i in range( N ):
for j in range(i+1, int((N+i)/2 )):
k = 2 * j - i
if k < N:
s = S[i] + S[j] + S[k]
if ("R" in s) &... | N=int(input())
S=input()
r = len(S.replace("G", "").replace("B", ""))
g = len(S.replace("R", "").replace("B", ""))
b = N - r - g
ans = r * g
ans = ans * b
for i in range( N ):
for j in range(i+1, int((N+i)/2 +1 )):
k = 2 * j - i
if k < N:
s = S[i] + S[j] + S[k]
if ("R" in s... | [["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 171 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1001001001;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int n;
cin >> n;
st... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1001001001;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int n;
cin >> n;
str... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 229 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1001001001;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int n;
cin >> n;
st... |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1001001001;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int n;
cin >> n;
st... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 229 |
n = int(input())
s = input()
r = s.count('R')
g = s.count('G')
b = s.count('B')
ret = r*g*b
for i in range(1,int(n/2)):
for j in range(0,n-2*i):
if(s[j] != s[j+i]) and (s[j+i] != s[j+2*i]) and (s[j+2*i] != s[j]):
ret -= 1
# print("i:%d j:%d " %(i,j), s[j],s[j+i],s[j+2*i]," !!")
# else:
# print("i:%d j:%d ... | n = int(input())
s = input()
r = s.count('R')
g = s.count('G')
b = s.count('B')
ret = r*g*b
for i in range(1,int((n+1)/2)):
for j in range(0,n-2*i):
if(s[j] != s[j+i]) and (s[j+i] != s[j+2*i]) and (s[j+2*i] != s[j]):
ret -= 1
# print(i,j,j+i,j+2*i,s[j],s[j+i],s[j+2*i]," !!")
# else:
# print(i,j,j+i,j+2*i,... | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25]] | 5 | 138 |
N=int(input())
S=input()
ans = S.count("R")*S.count("G")*S.count("B")
tmp=0
for i in range(N):
for j in range(i,N):
if j-i+j < N:
if S[i]==S[j] and S[j]==S[j-i+j] and S[i]==S[j-i+j]:
tmp += 1
ans = ans - tmp
print(ans) | N=int(input())
S=input()
ans = S.count("R")*S.count("G")*S.count("B")
tmp=0
for i in range(N):
for j in range(i,N):
if j-i+j < N:
if S[i]!=S[j] and S[j]!=S[j-i+j] and S[i]!=S[j-i+j]:
tmp += 1
ans = ans - tmp
print(ans) | [["-", 0, 57, 15, 679, 31, 679, 31, 666, 667, 60], ["+", 0, 57, 15, 679, 31, 679, 31, 666, 667, 79], ["-", 0, 57, 15, 679, 31, 679, 12, 666, 667, 60], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 667, 79], ["-", 64, 196, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 64, 196, 0, 57, 15, 679, 12, 666, 667, 79]] | 5 | 122 |
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define FF first.first
#define FS first.second
#define pb push_back
using namespace std;
const ll N = 1000006, INF = 1e10, MOD = 998244353;
int n, q = 1, a[N], b[4][N], c[N], f[N], m, o = 3, h, w, mx, mn, ans, Ans;
string s, S;
vector<ll> v... | #include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define FF first.first
#define FS first.second
#define pb push_back
using namespace std;
const ll N = 1000006, INF = 1e10, MOD = 998244353;
ll n, q = 1, a[N], b[4][N], c[N], f[N], m, o = 3, h, w, mx, mn, ans, Ans;
string s, S;
vector<ll> v[... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78]] | 1 | 400 |
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
int r = 0;
int g = 0;
int b = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R') {
r++;
} else if (s[i] == 'G') {
g++;
} else if (s[i] == 'B') {
b++;
}
}
... | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
long long r = 0;
long long g = 0;
long long b = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R') {
r++;
} else if (s[i] == 'G') {
g++;
} else if (s[i] == 'B') {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 257 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int cnt;
int a[4005][3];
int main() {
int n;
string s;
cin >> n; //字符的个数
cin >> s; // s是字符串
for (int i = 0; i < n; i++)
// a[i][0]从第i个数到结尾总共有多少个R(包含第i个数)
for (int j = i; j < n; j++) {
if (s[j] ==... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
ll cnt;
ll a[4005][3];
int main() {
int n;
string s;
cin >> n; //字符的个数
cin >> s; // s是字符串
for (int i = 0; i < n; i++)
// a[i][0]从第i个数到结尾总共有多少个R G B(包含第i个数)
for (int j = i; j < n; j++) {
if (s[j] ... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78]] | 1 | 387 |
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String s = sc.next();
int countr = 0;
int countg = 0;
int countb = 0;
long sum = 0;
for (int i = 0; i < n; i++) {
if ((int)s.ch... |
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String s = sc.next();
int countr = 0;
int countg = 0;
int countb = 0;
long sum = 0;
for (int i = 0; i < n; i++) {
if ((int)s.ch... | [["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 85], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 306 |
#include <algorithm>
#include <bits/stdc++.h>
#include <string>
#include <vector>
int main() {
int n;
std::cin >> n;
std::string s;
std::cin >> s;
int r, g, b;
r = g = b = 0;
for (int i = 0; i < n; i++) {
switch (s[i]) {
case 'R':
r++;
break;
case 'G':
g++;
break;
... | #include <algorithm>
#include <bits/stdc++.h>
#include <string>
#include <vector>
int main() {
int n;
std::cin >> n;
std::string s;
std::cin >> s;
long long r, g, b;
r = g = b = 0;
for (int i = 0; i < n; i++) {
switch (s[i]) {
case 'R':
r++;
break;
case 'G':
g++;
break... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 214 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
long long ans = 0;
int r, g, b, k;
r = count(s.begin(), s.end(), 'R');
g = count(s.begin(), s.end(), 'G');
b = count(s.begin(), s.end(), 'B');
ans = r * g * b;
for (int j = 1; j < n; j++) {
for (int i = 0... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
long long ans = 0;
long long r, g, b;
int k;
r = count(s.begin(), s.end(), 'R');
g = count(s.begin(), s.end(), 'G');
b = count(s.begin(), s.end(), 'B');
ans = r * g * b;
for (int j = 1; j < n; j++) {
fo... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 199 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <forward_list>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
#define... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <forward_list>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
#define... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 278 |
x1 = int(input())
x2 = input()
R_i = [i for i, x in enumerate(x2) if x == "R"]
G_i = [i for i, x in enumerate(x2) if x == "G"]
B_i = [i for i, x in enumerate(x2) if x == "B"]
R = len(R_i)
G = len(G_i)
B = len(B_i)
xs = map(sorted, product(R_i, G_i))
s = 0
for a in xs:
k = a[1]*2 - a[0] # 2j-i
if k in B_i:
... | from itertools import product
x1 = int(input())
x2 = input()
R_i = [i for i, x in enumerate(x2) if x == "R"]
G_i = [i for i, x in enumerate(x2) if x == "G"]
B_i = {i for i, x in enumerate(x2) if x == "B"}
R = len(R_i)
G = len(G_i)
B = len(B_i)
xs = map(sorted, product(R_i, G_i))
s = 0
for a in xs:
k = a[1]*2 -... | [["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 314], ["+", 36, 36, 0, 656, 0, 686, 687, 673, 0, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 487], ["+", 36, 36, 0, 656, 0, 686, 141, 673, 0, 22], ["-", 0, 656, 0, 1, 0, 662, 12, 658, 0, 70], ["+", 0, 656, 0, 1, 0, 662, 12, 689, 0, 45], ["-", 0, 656, 0, 1, 0, 662, 12, 658, 0,... | 5 | 202 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define REPS(i, m, n) for (int i = (m); i <= (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define reps(i, n) for (int i = 0; i <= (int)(n); i++)
#define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define rr... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define REPS(i, m, n) for (int i = (m); i <= (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define reps(i, n) for (int i = 0; i <= (int)(n); i++)
#define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define rr... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 510 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
string s;
cin >> n >> s;
int r = 0, g = 0, b = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
if (s[i] == 'G')
g++;
if (s[i] == 'B')
b++;
}
long ans = r * g * b;
for (int i =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
string s;
cin >> n >> s;
ll r = 0, g = 0, b = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
if (s[i] == 'G')
g++;
if (s[i] == 'B')
b++;
}
ll ans = r * g * b;
for (int i = 0;... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 209 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
string s;
cin >> n >> s;
int r = 0, g = 0, b = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
if (s[i] == 'G')
g++;
if (s[i] == 'B')
b++;
}
ll ans = r * g * b;
for (int i = 0... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
string s;
cin >> n >> s;
ll r = 0, g = 0, b = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
if (s[i] == 'G')
g++;
if (s[i] == 'B')
b++;
}
ll ans = r * g * b;
for (int i = 0;... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 208 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, r = 0, g = 0, b = 0;
cin >> n;
long long ans;
string s;
cin >> s;
for (char a : s) {
switch (a) {
case 'R':
r++;
break;
case 'G':
g++;
break;
case 'B':
b++;
break;
}
}
ans = 1ll *... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, r = 0, g = 0, b = 0;
cin >> n;
long long ans;
string s;
cin >> s;
for (char a : s) {
switch (a) {
case 'R':
r++;
break;
case 'G':
g++;
break;
case 'B':
b++;
break;
}
}
ans = 1ll *... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 196 |
#include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
int n;
string s;
cin >> n >> s;
int R = 0, G = 0, B = 0;
for (char c : s) {
if (c == 'R')
R++;
else if (c == 'G')
G++;
else if (c == 'B')
... | #include <bits/stdc++.h>
using namespace std;
int main() {
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
int n;
string s;
cin >> n >> s;
long long R = 0, G = 0, B = 0;
for (char c : s) {
if (c == 'R')
R++;
else if (c == 'G')
G++;
else if (c == 'B')... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 205 |
#include <bits/stdc++.h>
using namespace std;
#define int long long // aaaaaaaaaaaaaaaaaa
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define allr(x) (x).rbegin(), (x).rend()
#define in... | #include <bits/stdc++.h>
using namespace std;
#define int long long // aaaaaaaaaaaaaaaaaa
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define allr(x) (x).rbegin(), (x).rend()
#define in... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 711 |
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
string S;
cin >> S;
int r = 0, g = 0, b = 0;
for (int i = 0; i < N; i++) {
if (S.at(i) == 'R')
r++;
if (S.at(i) == 'G')
g++;
if (S.at(i) == 'B')
b++;
}
long long ans = r * g * b; // 順を考えずにR,G,Bから1つずつ選ぶ... | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
string S;
cin >> S;
long long r = 0, g = 0, b = 0;
for (int i = 0; i < N; i++) {
if (S.at(i) == 'R')
r++;
if (S.at(i) == 'G')
g++;
if (S.at(i) == 'B')
b++;
}
long long ans = r * g * b; // 順を考えずにR,G,Bから... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 223 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF = 1001001001;
int main() {
int n;
string s;
cin >> n >> s;
int r = 0;
int g = 0;
int b = 0;
rep(i, n) {
if (s[i] == 'R')
r++;
if (s[i] == 'G')
g++;
if (s[i] == 'B')
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF = 1001001001;
int main() {
int n;
string s;
cin >> n >> s;
long long int r = 0;
long long int g = 0;
long long int b = 0;
rep(i, n) {
if (s[i] == 'R')
r++;
if (s[i] == 'G')
... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 217 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 539 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define endl '\n';
#define FASTER \
ios_base::sync_with_stdio(false); \
cin.tie(NULL... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define endl '\n';
#define FASTER \
ios_base::sync_with_stdio(false); \
cin.tie(NULL... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 357 |
#include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define repeq(i, n) for (int(i) = 0; (i) <= (int)(n); (i)++)
#define rep1(i, x, n) for (int(i) = (x); (i) < (int)(n); (i)++)
#define rep1eq(i, x, n) for (int(i) = (x); (i) <= (int)(n); (i)++)
#define rrep(i, x) for (int i = ((int)(x)-1);... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define repeq(i, n) for (int(i) = 0; (i) <= (int)(n); (i)++)
#define rep1(i, x, n) for (int(i) = (x); (i) < (int)(n); (i)++)
#define rep1eq(i, x, n) for (int(i) = (x); (i) <= (int)(n); (i)++)
#define rrep(i, x) for (int i = ((int)(x)-1);... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 349 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
int r, g, b;
r = g = b = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R') {
r++;
} else if (s[i] == 'G') {
g++;
} else {
b++;
}
... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
long long r, g, b;
r = g = b = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R') {
r++;
} else if (s[i] == 'G') {
g++;
} else {
b++;
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 213 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
String S = sc.next();
String s[] = S.split("", 0);
int t[] = new int[N];
long w = 0;
int a = 0;
int b = 0;
int c = 0;
for (int i = 0; i < ... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
String S = sc.next();
String s[] = S.split("", 0);
int t[] = new int[N];
long w = 0;
long a = 0;
long b = 0;
long c = 0;
for (int i = 0; i... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 313 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, cnt1 = 0, cnt2 = 0, cnt3 = 0;
ll ans;
string s;
cin >> n >> s;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
cnt1++;
else if (s[i] == 'G')
cnt2++;
else
cnt3++;
}
ans = cnt1 * cnt2 * cnt3... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
ll cnt1 = 0, cnt2 = 0, cnt3 = 0;
ll ans;
string s;
cin >> n >> s;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
cnt1++;
else if (s[i] == 'G')
cnt2++;
else
cnt3++;
}
ans = cnt1 * cnt2 *... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 201 |
N = int(input())
X = input()
ans = 0
r=0
g=0
b=0
G = []
R = []
B = []
for i in range(0,N):
if(X[i] == 'G'):
G.append(i)
g+=1
for k in range(0,N):
if(X[k] == 'R'):
R.append(k)
r+=1
for j in range(0,N):
if(X[j] == 'B'):
B.append(j)
b+=1
ans = r*b*g
for i in rang... | N = int(input())
X = input()
ans = 0
r=0
g=0
b=0
G = []
R = []
B = []
for i in range(0,N):
if(X[i] == 'G'):
G.append(i)
g+=1
for k in range(0,N):
if(X[k] == 'R'):
R.append(k)
r+=1
for j in range(0,N):
if(X[j] == 'B'):
B.append(j)
b+=1
ans = r*b*g
for i in rang... | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 224 |
n = int(input())
s = input()
r_num = s.count("R")
g_num = s.count("G")
b_num = s.count("B")
ans = r_num * b_num * g_num
for i in range(n):
for j in range(i+1, n):
k = 2 * j - i
if k >= n:
break
if (s[i] == s[j] or
s[j] == s[k] or
s[i] == s[k]):
... | n = int(input())
s = input()
r_num = s.count("R")
g_num = s.count("G")
b_num = s.count("B")
ans = r_num * b_num * g_num
for i in range(n):
for j in range(i+1, n):
k = 2 * j - i
if k >= n:
break
if (s[i] != s[j] and
s[j] != s[k] and
s[i] != s[k]):
... | [["-", 15, 23, 0, 679, 31, 679, 31, 666, 667, 60], ["+", 15, 23, 0, 679, 31, 679, 31, 666, 667, 79], ["-", 0, 57, 15, 23, 0, 679, 31, 679, 17, 354], ["+", 0, 57, 15, 23, 0, 679, 31, 679, 17, 355], ["-", 15, 23, 0, 679, 31, 679, 12, 666, 667, 60], ["+", 15, 23, 0, 679, 31, 679, 12, 666, 667, 79], ["-", 8, 196, 0, 57, 15... | 5 | 124 |
n=int(input())
s=input()
r=s.count('R')
g=s.count('G')
b=s.count('B')
ans=r*g*b
for i in range(n//2):
for j in range(n-2*i):
if len(set([s[j],s[j+i],s[j+2*i]]))==3:
ans-=1
print(ans) | n=int(input())
s=input()
r=s.count('R')
g=s.count('G')
b=s.count('B')
ans=r*g*b
for i in range(1,(n+1)//2):
for j in range(n-2*i):
if len(set([s[j],s[j+i],s[j+2*i]]))==3:
ans-=1
print(ans) | [["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 25]] | 5 | 111 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
string S;
cin >> N >> S;
replace(S.begin(), S.end(), 'R', '1');
replace(S.begin(), S.end(), 'G', '2');
replace(S.begin(), S.end(), 'B', '4');
vector<int> rgb(3, 0);
for (int i = 0; i < N; i++) {
int s = S[i] - '0';
for (int j... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
string S;
cin >> N >> S;
replace(S.begin(), S.end(), 'R', '1');
replace(S.begin(), S.end(), 'G', '2');
replace(S.begin(), S.end(), 'B', '4');
vector<long long> rgb(3, 0);
for (int i = 0; i < N; i++) {
int s = S[i] - '0';
for ... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 39, 344, 3, 347, 0, 77, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 299 |
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxx = 4e3 + 7;
int n;
char s[maxx];
int num[maxx];
vector<int> vec[maxx];
LL cnt[maxx];
bool vis[maxx];
LL chk(int a, int b, int c) {
LL res = 0;
for (int i = 0; i < vec[a].size(); i++) { //枚举首字母位置
for (int j = 1; vec[a][i] +... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxx = 4e3 + 7;
int n;
char s[maxx];
int num[maxx];
vector<int> vec[maxx];
LL cnt[maxx];
bool vis[maxx];
LL chk(int a, int b, int c) {
LL res = 0;
for (int i = 0; i < vec[a].size(); i++) { //枚举首字母位置
for (int j = 1; vec[a][i] +... | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 72], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72]] | 1 | 391 |
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N;
char S[4096];
cin >> N >> S;
int cR = 0, cG = 0, cB = 0;
for (int i = 0; i < N; i++) {
switch (S[i]) {
case 'R':
cR++;
break;
case 'G':
cG++;
break;
case... | #include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N;
char S[4096];
cin >> N >> S;
int cR = 0, cG = 0, cB = 0;
for (int i = 0; i < N; i++) {
switch (S[i]) {
case 'R':
cR++;
break;
case 'G':
cG++;
break;
case... | [["+", 49, 50, 51, 16, 31, 16, 31, 74, 0, 24], ["+", 51, 16, 31, 16, 31, 74, 39, 77, 39, 78], ["+", 49, 50, 51, 16, 31, 16, 31, 74, 0, 25]] | 1 | 213 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll n, ans = 0, r[4000] = {-1}, g[4000] = {-1}, b[8000] = {0}, rn = 0, gn = 0,
bn = 0, no = 0;
string s;
cin >> n >> s;
for (ll i = 0; i < n; i++) {
if (s[i] == 'R') {
r[rn] = i;
rn++;
} else if (s[i] == ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll n, ans = 0, r[4000] = {-1}, g[4000] = {-1}, b[8000] = {0}, rn = 0, gn = 0,
bn = 0, no = 0;
string s;
cin >> n >> s;
for (ll i = 0; i < n; i++) {
if (s[i] == 'R') {
r[rn] = i;
rn++;
} else if (s[i] == ... | [["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["-", 51, 16, 12, 69, 341, 342, 0, 16, 31, 22], ["+", 51, 16, 12, 69, 341, 342, 0, 16, 31, 22]] | 1 | 297 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int cnt = 0, i, j, k, n, r = 0, g = 0, b = 0;
string ptr;
cin >> n >> ptr;
for (i = 0; i < ptr.length(); i++) {
if (ptr[i] == 'R')
r++;
if (ptr[i] == 'G')
g++;
if (ptr[i] == 'B')
b++;
}
for (i = 0; i < n; i++... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int cnt = 0, i, j, k, n, r = 0, g = 0, b = 0;
string ptr;
cin >> n >> ptr;
for (i = 0; i < ptr.length(); i++) {
if (ptr[i] == 'R')
r++;
if (ptr[i] == 'G')
g++;
if (ptr[i] == 'B')
b++;
}
for (i = 0; i < n; i++... | [["-", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 31, 16, 31, 69, 341, 342, 0, 16, 12, 22], ["-", 12, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 12, 16, 31, 69, 341, 342, 0, 16, 12, 22]] | 1 | 214 |
#include <algorithm>
#include <iostream>
#include <stack>
#include <stdio.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
int main() {
int N, sum = 0;
string S;
cin >> N;
cin >> S;
vector<int> R, G, B;
for (int i = 0; i < S.length(); ++i) {
if (S[i] == 'R') {
... | #include <algorithm>
#include <iostream>
#include <stack>
#include <stdio.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
int main() {
int N;
long long sum = 0;
string S;
cin >> N;
cin >> S;
vector<int> R, G, B;
for (int i = 0; i < S.length(); ++i) {
if (S[i... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 336 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner key = new Scanner(System.in);
int num = key.nextInt();
key.nextLine();
String s = key.nextLine();
int ca = 0;
int cb = 0;
int cc = 0;
for (int i = 0; i < num; i++) {
char c = s.charAt... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner key = new Scanner(System.in);
int num = key.nextInt();
key.nextLine();
String s = key.nextLine();
long ca = 0;
long cb = 0;
long cc = 0;
for (int i = 0; i < num; i++) {
char c = s.cha... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 248 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
string S;
cin >> S;
int r = 0, g = 0, b = 0;
for (int i = 0; i < S.size(); i++) {
if (S[i] == 'R')
r++;
if (S[i] == 'G')
g++;
if (S[i] == 'B')
b++;
}
long long int ans = r * g * b;
for (int i ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
string S;
cin >> S;
long long int r = 0, g = 0, b = 0;
for (int i = 0; i < S.size(); i++) {
if (S[i] == 'R')
r++;
if (S[i] == 'G')
g++;
if (S[i] == 'B')
b++;
}
long long int ans = r * g * b;
f... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 208 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int N;
string S;
cin >> N >> S;
int r_n = 0;
int b_n = 0;
int g_n = 0;
for (int i = 0; i < N; ++i) {
if (S[i] == 'R')
r_n++;
else if (S[i] == 'G')
g_n++;
else if (S[i] =... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int N;
string S;
cin >> N >> S;
long long r_n = 0;
long long b_n = 0;
long long g_n = 0;
for (int i = 0; i < N; ++i) {
if (S[i] == 'R')
r_n++;
else if (S[i] == 'G')
g_n++;
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 226 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int N;
cin >> N;
string S;
cin >> S;
int seen[N][3];
for (int i = N - 1; i >= 0; --i) {
if (i == N - 1) {
seen[i][0] = 0;
seen[i][1] = 0;
seen[i][2] = 0;
} else {
seen[i][... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int N;
cin >> N;
string S;
cin >> S;
long long seen[N][3];
for (int i = N - 1; i >= 0; --i) {
if (i == N - 1) {
seen[i][0] = 0;
seen[i][1] = 0;
seen[i][2] = 0;
} else {
se... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 466 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
int n;
cin >> n;
vector<char> v(n);
map<char, int> m;
m['R'] = 0;
m['G'] = 0;
m['B'] = 0;
for (int i = 0; i < n; i++) {
cin >> v[i];
m[v[i]]++;
}
ll ans = m['R'] * m['G'] * m['B'];
for (int i = 0; i <= n... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
int n;
cin >> n;
vector<char> v(n);
map<char, ll> m;
m['R'] = 0;
m['G'] = 0;
m['B'] = 0;
for (int i = 0; i < n; i++) {
cin >> v[i];
m[v[i]]++;
}
ll ans = m['R'] * m['G'] * m['B'];
for (int i = 0; i <= n ... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78]] | 1 | 231 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define SORT(A) std::sort(A.begin(), A.end())
#define RSORT(A) std::sort(A.begin(), A.end(), std::greater<>())
#define FR(A, e) for (auto &... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define SORT(A) std::sort(A.begin(), A.end())
#define RSORT(A) std::sort(A.begin(), A.end(), std::greater<>())
#define FR(A, e) for (auto &... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 613 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int N;
string S;
cin >> N >> S;
int r = 0, g = 0, b = 0;
for (int i = 0; i < N; i++) {
if (S[i] == 'R')
r++;
if (S[i] == 'G')
g++;
if (S[i] == 'B')
b++;
}
ll ans = r * g * b;
for (int i = 0;... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int N;
string S;
cin >> N >> S;
ll r = 0, g = 0, b = 0;
for (int i = 0; i < N; i++) {
if (S[i] == 'R')
r++;
if (S[i] == 'G')
g++;
if (S[i] == 'B')
b++;
}
ll ans = r * g * b;
for (int i = 0; ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 204 |
import itertools
N = int(input())
S = input()
r = len(list(filter(lambda x: x == "R", S)))
g = len(list(filter(lambda x: x == "G", S)))
b = len(list(filter(lambda x: x == "B", S)))
# print("r:{}, g:{}, b:{}".format(r, g, b))
ans = r * g * b
RGB = list(itertools.permutations(["R", "G", "B"], 3))
# print(RGB)
for i... | import itertools
N = int(input())
S = input()
r = len(list(filter(lambda x: x == "R", S)))
g = len(list(filter(lambda x: x == "G", S)))
b = len(list(filter(lambda x: x == "B", S)))
# print("r:{}, g:{}, b:{}".format(r, g, b))
ans = r * g * b
RGB = list(itertools.permutations(["R", "G", "B"], 3))
# print(RGB)
for i... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 169 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, i;
cin >> N;
string S;
cin >> S;
map<char, int> S_Num;
for (i = 0; i < N; i++) {
S_Num[S.at(i)]++;
}
int64_t Sum = S_Num['R'] * S_Num['G'] * S_Num['B'];
for (i = 0; i < N; i++) {
for (int j = 0; true; j++) {
int x... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, i;
cin >> N;
string S;
cin >> S;
map<char, int64_t> S_Num;
for (i = 0; i < N; i++) {
S_Num[S.at(i)]++;
}
int64_t Sum = S_Num['R'] * S_Num['G'] * S_Num['B'];
for (i = 0; i < N; i++) {
for (int j = 0; true; j++) {
i... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40]] | 1 | 194 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, count = 0;
cin >> N;
string str;
cin >> str;
int r = 0;
int g = 0;
int b = 0;
for (int i = 0; i < str.size(); i++) {
if (str.at(i) == 'R') {
r++;
continue;
} else if (str.at(i) == 'G') {
g++;
continue;... | #include <bits/stdc++.h>
using namespace std;
int main() {
long int N, count = 0;
cin >> N;
string str;
cin >> str;
long int r = 0;
long int g = 0;
long int b = 0;
for (int i = 0; i < str.size(); i++) {
if (str.at(i) == 'R') {
r++;
continue;
} else if (str.at(i) == 'G') {
... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 233 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int N, R = 0, G = 0, B = 0, count = 0;
string S;
cin >> N >> S;
REP(i, N) {
if (S[i] == 'R') {
R++;
} else if (S[i] == 'G') {
G++;
} else {
B++;
}
}
int M = rou... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
long long N, R = 0, G = 0, B = 0;
long long count = 0;
string S;
cin >> N >> S;
REP(i, N) {
if (S[i] == 'R') {
R++;
} else if (S[i] == 'G') {
G++;
} else {
B++;
}
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35]] | 1 | 215 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vs = vector<string>;
using vb = vector<bool>;
us... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vs = vector<string>;
using vb = vector<bool>;
us... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 402 |
// D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int N;
string S;
cin >> N >> S;
map<char, int> c;
long long ng = 0;
rep(i, N) {
c[S[i]]++;
for (int j = i + 1, k = i + 2; k < N; k += 2, j++)
if ((S[i] ^ S[j] ^ S[k])... | // D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int N;
string S;
cin >> N >> S;
map<char, int> c;
long long ng = 0;
rep(i, N) {
c[S[i]]++;
for (int j = i + 1, k = i + 2; k < N; k += 2, j++)
if ((S[i] ^ S[j] ^ S[k])... | [["+", 12, 16, 31, 16, 31, 16, 31, 74, 0, 24], ["+", 31, 16, 31, 74, 39, 77, 39, 86, 0, 96], ["+", 12, 16, 31, 16, 31, 16, 31, 74, 0, 25]] | 1 | 153 |
// D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
long long ng, r, g, b;
int main() {
int N;
string S;
cin >> N >> S;
rep(i, N) {
S[i] == 'R' ? r++ : S[i] == 'G' ? g++ : b++;
rep(d, N / 2) {
int j = i + d, k = j + d;
if (k >= N... | // D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
long long ng, r, g, b;
int main() {
int N;
string S;
cin >> N >> S;
rep(i, N) {
S[i] == 'R' ? r++ : S[i] == 'G' ? g++ : b++;
rep(d, N / 2 + 1) {
int j = i + d, k = j + d;
if (k ... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 157 |
// D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int N;
string S;
cin >> N >> S;
map<char, int> rgb;
rep(i, N) rgb[S[i]]++;
long long ans = rgb['R'] * rgb['G'] * rgb['B'];
rep(i, N) rep(d, N) {
int j = i + d, k = j + d;
... | // D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int N;
string S;
cin >> N >> S;
map<char, int> rgb;
rep(i, N) rgb[S[i]]++;
long long ans = (long long)rgb['R'] * rgb['G'] * rgb['B'];
rep(i, N) rep(d, N) {
int j = i + d, k =... | [["+", 49, 50, 51, 16, 31, 16, 31, 74, 0, 24], ["+", 31, 16, 31, 74, 39, 77, 39, 86, 0, 96], ["+", 49, 50, 51, 16, 31, 16, 31, 74, 0, 25]] | 1 | 158 |
#include <bits/stdc++.h>
#include <string.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
long long N;
string S;
int r = 0, g = 0, b = 0;
int i, j, k;
cin >> N;
cin >> S;
rep(i, N) {
if (S[i] == 'R') {
r++;
} else if (S[i] == 'G') {
g++;
... | #include <bits/stdc++.h>
#include <string.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
long long N;
string S;
long long r = 0, g = 0, b = 0;
int i, j, k;
cin >> N;
cin >> S;
rep(i, N) {
if (S[i] == 'R') {
r++;
} else if (S[i] == 'G') {
g++... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 206 |
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < (int)(b); ++i)
#define ALL(x) (x).begin(), (x).end()
#define rALL(x) (x).rbegin(), (x).rend()
typedef long double ld;
using ll = long long;
using namespace std;
const auto mod = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout <... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < (int)(b); ++i)
#define ALL(x) (x).begin(), (x).end()
#define rALL(x) (x).rbegin(), (x).rend()
typedef long double ld;
using ll = long long;
using namespace std;
const auto mod = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout <... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 286 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repI(i, d, n) for (int i = (d); i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using M = map<int, int>;
int main() {
int n;
string s;
cin >> n;
cin >> s;
int cntR = 0, cntG = 0, cntB = 0;
r... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repI(i, d, n) for (int i = (d); i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using M = map<int, int>;
int main() {
int n;
string s;
cin >> n;
cin >> s;
ll cntR = 0, cntG = 0, cntB = 0;
re... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 8, 9, 0, 9, 0, 57, 64, 116, 0, 117], ["+", 8, 9, 0, 9, 0, 57, 64, 93, 0, 94]] | 1 | 226 |
def main():
n = int(input())
S = input()
'''
r_inds = []
g_inds = []
b_inds = []
for i in range(len(S)):
if S[i] == "R":
r_inds.append(i)
elif S[i] == "G":
g_inds.append(i)
else:
b_inds.append(i)
total_comb = len(r_inds)*len(g_... | from collections import defaultdict
def main():
n = int(input())
S = input()
'''
r_inds = []
g_inds = []
b_inds = []
for i in range(len(S)):
if S[i] == "R":
r_inds.append(i)
elif S[i] == "G":
g_inds.append(i)
else:
b_inds.append(i... | [["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 314], ["+", 36, 36, 0, 656, 0, 686, 687, 673, 0, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 487], ["+", 36, 36, 0, 656, 0, 686, 141, 673, 0, 22]] | 5 | 171 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main(void) {
int N, r = 0, g = 0, b = 0, t = 0;
cin >> N;
vector<char> S(N);
rep(i, N) {
cin >> S[i];
if (S[i] == 'R')
r++;
else if (S[i] == 'G'... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main(void) {
long long N, r = 0, g = 0, b = 0, t = 0;
cin >> N;
vector<char> S(N);
rep(i, N) {
cin >> S[i];
if (S[i] == 'R')
r++;
else if (S[i] ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 235 |
#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int r, b, g;
int main() {
cin >> n;
cin >> s;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
if (s[i] == 'B')
b++;
if (s[i] == 'G')
g++;
}
long long res = r * b * g;
for (int i = 0; i < n; i++)
for (int j... | #include <bits/stdc++.h>
using namespace std;
int n;
string s;
long long r, b, g;
int main() {
cin >> n;
cin >> s;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
if (s[i] == 'B')
b++;
if (s[i] == 'G')
g++;
}
long long res = r * b * g;
for (int i = 0; i < n; i++)
for ... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["-", 8, 7, 8, 9, 0, 57, 64, 116, 0, 117], ["+", 8, 7, 8, 9, 0, 57, 64, 93, 0, 94]] | 1 | 199 |
#include "bits/stdc++.h"
using namespace std;
using ll = long long int;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a ... | #include "bits/stdc++.h"
using namespace std;
using ll = long long int;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 622 |
#include <iostream>
#include <string>
using namespace std;
#define rep(a, b) for (int a = 0; a < (b); a++)
int main() {
int N;
string S;
cin >> N;
cin >> S;
int r = 0, g = 0, b = 0, exception = 0;
rep(i, N) {
if (S[i] == 'R') {
r++;
} else if (S[i] == 'G') {
g++;
} else if (S[i] == '... | #include <iostream>
#include <string>
using namespace std;
#define rep(a, b) for (int a = 0; a < (b); a++)
int main() {
int N;
string S;
cin >> N;
cin >> S;
int r = 0, g = 0, b = 0, exception = 0;
rep(i, N) {
if (S[i] == 'R') {
r++;
} else if (S[i] == 'G') {
g++;
} else if (S[i] == '... | [["+", 12, 16, 31, 16, 31, 16, 31, 74, 0, 24], ["+", 31, 16, 31, 74, 39, 77, 39, 86, 0, 96], ["+", 12, 16, 31, 16, 31, 16, 31, 74, 0, 25]] | 1 | 216 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define Maxn 4005
using namespace std;
int main() {
long long int n, sum, r = 0, g = 0, b = 0;
string s;
cin >> n >> s;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
else if (s[i] == 'G')
g++;
else if (s[... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define Maxn 4005
using namespace std;
int main() {
long long int n, sum, r = 0, g = 0, b = 0;
string s;
cin >> n >> s;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
else if (s[i] == 'G')
g++;
else if (s[... | [["+", 8, 9, 0, 7, 15, 16, 31, 16, 31, 13], ["+", 8, 9, 0, 7, 15, 16, 31, 16, 17, 48], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 85], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 208 |
#include <stdio.h>
#define SIZE 4500
int main() {
int N;
char S[SIZE] = {};
scanf("%d%s", &N, S);
int r, g, b;
r = g = b = 0;
for (int i = 0; i < N; i++) {
switch (S[i]) {
case 'R':
r++;
break;
case 'G':
g++;
break;
case 'B':
b++;
break;
}
}
long... | #include <stdio.h>
#define SIZE 4500
int main() {
int N;
char S[SIZE] = {};
scanf("%d%s", &N, S);
long r, g, b;
r = g = b = 0;
for (int i = 0; i < N; i++) {
switch (S[i]) {
case 'R':
r++;
break;
case 'G':
g++;
break;
case 'B':
b++;
break;
}
}
lon... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 215 |
import sys
n = int(input())
s = input()
r = []
g = []
b = []
for i in range(n):
c = s[i]
if c == 'R':
r.append(i)
elif c == 'G':
g.append(i)
else:
b.append(i)
#print(r)
#print(g)
#print(b)
ans = len(r) * len(g) * len(b)
for i in range(n-2):
for d in range(1, n // 2):
j = i + d
k = i +... | import sys
n = int(input())
s = input()
r = []
g = []
b = []
for i in range(n):
c = s[i]
if c == 'R':
r.append(i)
elif c == 'G':
g.append(i)
else:
b.append(i)
#print(r)
#print(g)
#print(b)
ans = len(r) * len(g) * len(b)
for i in range(n-2):
for d in range(1, n):
j = i + d
k = i + 2 * ... | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 676], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 177 |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solve();
}
public void solve() {
Scanner scan =
new Scanner(new BufferedReader(new InputStreamReader(System.in)));
... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solve();
}
public void solve() {
Scanner scan =
new Scanner(new BufferedReader(new InputStreamReader(System.in)));
... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 302 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
int main() {
int n;
string s;
cin >> n >> s;
ll ans = 0;
ll r = 0, g = 0, b = 0;
if (n < 3) {
cout << 0 << endl;
} else {
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
if (s[i... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
int main() {
int n;
string s;
cin >> n >> s;
ll ans = 0;
ll r = 0, g = 0, b = 0;
if (n < 3) {
cout << 0 << endl;
} else {
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
r++;
if (s[i... | [["-", 0, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 0, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 236 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main() {
int n;
cin >> n;
string s;
cin >> s;
map<char, int> ma;
ma['R'] = 0;
ma['G'] = 0;
ma['B'] = 0;
for (int i = 0; i < n; ++i) {
if (s[i] == 'R')
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main() {
ll n;
cin >> n;
string s;
cin >> s;
map<char, ll> ma;
ma['R'] = 0;
ma['G'] = 0;
ma['B'] = 0;
for (ll i = 0; i < n; ++i) {
if (s[i] == 'R')
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, ... | 1 | 298 |
#include <bits/stdc++.h>
#include <cstdio>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
int n;
// scanf("%d", &x);
cin >> n;
string s;
cin >> s;
int r = 0;
int g = 0;
int b = 0;
rep(i, n) {
// cout << i << s[i] << endl;
if (s[i] == 'R') {
r++;
} ... | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
int n;
// scanf("%d", &x);
cin >> n;
string s;
cin >> s;
long r = 0;
long g = 0;
long b = 0;
rep(i, n) {
// cout << i << s[i] << endl;
if (s[i] == 'R') {
r++;
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 199 |
import itertools
n = int(input())
s = str(input())
r = {}
b = {}
g = {}
for i in range(len(s)):
if s[i] == 'R':
r[i+1] = s[i]
elif s[i] == 'B':
b[i+1] = s[i]
else:
g[i+1] = s[i]
ans = len(r) * len(b) * len(g)
print(ans)
for i in r.keys():
for j in b.keys():
diff = abs(j-i... | import itertools
n = int(input())
s = str(input())
r = {}
b = {}
g = {}
for i in range(len(s)):
if s[i] == 'R':
r[i+1] = s[i]
elif s[i] == 'B':
b[i+1] = s[i]
else:
g[i+1] = s[i]
ans = len(r) * len(b) * len(g)
for i in r.keys():
for j in b.keys():
diff = abs(j-i)
m... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 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 | 223 |
#include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define DUMP(xs) \
for (auto x : xs) \
cout << x << ' '; ... | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define DUMP(xs) \
for (auto x : xs) \
cout << x << ' '; ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 951 |
n = int(input())
s = list(input())
cnt = 0
cnt = s.count("R") * s.count("B") * s.count("G")
print(cnt)
# j - i = k -j を求める。
sub = 0
for i in range(n):
for j in range(i, n):
k = 2 * j - i
if k <= n - 1:
if (s[i] != s[j]) and (s[j] != s[k]) and (s[i] != s[k]):
sub += 1
p... | n = int(input())
s = list(input())
cnt = 0
cnt = s.count("R") * s.count("B") * s.count("G")
# j - i = k -j を求める。
sub = 0
for i in range(n):
for j in range(i, n):
k = 2 * j - i
if k <= n - 1:
if (s[i] != s[j]) and (s[j] != s[k]) and (s[i] != s[k]):
sub += 1
print(cnt-su... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 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 | 133 |
import sys
input = sys.stdin.readline
n = int(input())
s = str(input())
r = 0
g = 0
for i in range(n):
if s[i] == "R":
r += 1
elif s[i] == "G":
g += 1
c = r*g*(n-r-g)
for j in range(1,n-1):
for i in range(1,min(n-j-1,j)+1):
if (s[j-i] != s[j]) and (s[j] != s[j+i]) and (s[j+i] != s[j-i]):
c -= 1
... | import sys
input = sys.stdin.readline
n = int(input())
s = str(input())
r = 0
g = 0
for i in range(n):
if s[i] == "R":
r += 1
elif s[i] == "G":
g += 1
c = r*g*(n-r-g)
for j in range(1,n-1):
for i in range(1,min(n-j-1,j)+1):
if (s[j-i] != s[j]) and (s[j] != s[j+i]) and (s[j+i] != s[j-i]):
c -= 1
... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 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 | 167 |
#include <bits/stdc++.h>
using namespace std;
int ans = 0;
int n;
string x;
void solve(string form) {
int p[n], cnt = 0;
memset(p, 0, sizeof p);
char c = form[2];
for (int i = n - 1; i >= 0; i--) {
if (c == x[i])
p[i] = ++cnt;
}
int re = 0;
for (int i = 1; i < n - 1; i++) {
for (int j = 0;... | #include <bits/stdc++.h>
using namespace std;
long long ans = 0;
int n;
string x;
void solve(string form) {
int p[n], cnt = 0;
memset(p, 0, sizeof p);
char c = form[2];
for (int i = n - 1; i >= 0; i--) {
if (c == x[i])
p[i] = ++cnt;
}
long long re = 0;
for (int i = 1; i < n - 1; i++) {
for... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 337 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
long long ans = 0;
int r = 0, g = 0, b = 0;
for (char c : s) {
if (c == 'R')
r++;
if (c == 'G')
g++;
if (c == 'B')
b++;
}
ans = r * g * b;
for (int i = 0; i < n; ++i) {
for (... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
long long ans = 0;
long long r = 0, g = 0, b = 0;
for (char c : s) {
if (c == 'R')
r++;
if (c == 'G')
g++;
if (c == 'B')
b++;
}
ans = r * g * b;
for (int i = 0; i < n; ++i) {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 190 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
string s;
cin >> n >> s;
int RC = 0, GC = 0, BC = 0;
for (int i = 0; i < n; ++i) {
if (s[i] == 'R')
RC++;
else if (s[i] == 'G')
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
string s;
cin >> n >> s;
long long RC = 0, GC = 0, BC = 0;
for (int i = 0; i < n; ++i) {
if (s[i] == 'R')
RC++;
else if (s[i] == 'G')... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 216 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
string S;
cin >> S;
int r, g, b;
r = g = b = 0;
rep(i, N) {
if (S[i] == 'R')
r++;
else if (S[i] == 'G')
g++;
else if (S[i] == 'B')
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
string S;
cin >> S;
ll r, g, b;
r = g = b = 0;
rep(i, N) {
if (S[i] == 'R')
r++;
else if (S[i] == 'G')
g++;
else if (S[i] == 'B')
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 199 |
#include <bits/stdc++.h>
using namespace std;
int pan(char a, char b, char c) {
if (a != b && b != c && c != a)
return 1;
return 0;
}
int main() {
int n;
cin >> n;
char a[n];
cin >> a;
long long cnt = 0;
int x = 0, y = 0, z = 0;
for (int i = 0; i < n; i++) {
if (a[i] == 'R')
x++;
if ... | #include <bits/stdc++.h>
using namespace std;
int pan(char a, char b, char c) {
if (a != b && b != c && c != a)
return 1;
return 0;
}
int main() {
int n;
cin >> n;
char a[n];
cin >> a;
long long cnt = 0;
int x = 0, y = 0, z = 0;
for (int i = 0; i < n; i++) {
if (a[i] == 'R')
x++;
if ... | [["+", 0, 11, 12, 16, 31, 16, 31, 74, 0, 24], ["+", 31, 16, 31, 74, 39, 77, 39, 86, 0, 96], ["+", 0, 11, 12, 16, 31, 16, 31, 74, 0, 25]] | 1 | 218 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string s;
int n;
int main() {
cin >> n;
cin >> s;
ll ans = 0;
int cnt1 = 0, cnt2 = 0, cnt3 = 0, c = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
cnt1++;
if (s[i] == 'G')
cnt2++;
if (s[i] == 'B')
cnt3++;
}
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string s;
ll n;
int main() {
cin >> n;
cin >> s;
ll ans = 0;
ll cnt1 = 0, cnt2 = 0, cnt3 = 0, c = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'R')
cnt1++;
if (s[i] == 'G')
cnt2++;
if (s[i] == 'B')
cnt3++;
}
... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 78]] | 1 | 215 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
int n;
string s;
cin >> n >> s;
int r = 0, g = 0, b = 0;
rep(i, n) {
if (s[i] == 'R')
r++;
else if (s[i] == 'G')
g++;
else
b++;
}
ll total ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
int n;
string s;
cin >> n >> s;
ll r = 0, g = 0, b = 0;
rep(i, n) {
if (s[i] == 'R')
r++;
else if (s[i] == 'G')
g++;
else
b++;
}
ll total =... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 201 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i > 0; i++)
using ll = long long;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
string s;
cin >> n >> s;
int r = 0, g = 0, b = 0;
rep(i, n) {
if... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i > 0; i++)
using ll = long long;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
string s;
cin >> n >> s;
ll r = 0, g = 0, b = 0;
rep(i, n) {
if ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 398 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
string S;
int r = 0;
int g = 0;
int b = 0;
long long ans = 0;
long long dif = 0;
cin >> N >> S;
for (int i = 0; i < N; i++) {
if (S[i] == 'R')
r++;
else if (S[i] == 'G')
g++;
else if (S[i] == 'B')
b++;
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
string S;
long long r = 0;
long long g = 0;
long long b = 0;
long long ans = 0;
long long dif = 0;
cin >> N >> S;
for (int i = 0; i < N; i++) {
if (S[i] == 'R')
r++;
else if (S[i] == 'G')
g++;
else if (S[i] == '... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 216 |
#include <bits/stdc++.h>
using namespace std;
#define fast() \
{ \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define fast() \
{ \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 232 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
cout << fixed << setprecision(10);
int N;
string S;
cin >> N >> S;
ll a = 0;
ll count = 0;
int r, g, b;
r = 0;
g = 0;
b = 0;
for (int i = 0; i < N; i++) {
if (S.at(i) == 'R')
r++;
if (S.at(i) == 'G')
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
cout << fixed << setprecision(10);
int N;
string S;
cin >> N >> S;
ll a = 0;
ll count = 0;
ll r, g, b;
r = 0;
g = 0;
b = 0;
for (int i = 0; i < N; i++) {
if (S.at(i) == 'R')
r++;
if (S.at(i) == 'G')
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 248 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define sort(s) sort(s.begin(), s.end())
#define reverse(s) reverse(s.begin(), s.end())
#define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++)
const ll mod = 1e9 + 7;
//最大公約数
ll gcd(ll a, ll b) { return b ?... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define sort(s) sort(s.begin(), s.end())
#define reverse(s) reverse(s.begin(), s.end())
#define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++)
const ll mod = 1e9 + 7;
//最大公約数
ll gcd(ll a, ll b) { return b ?... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["+", 8, 9, 0, 7, 15, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 7, 15, 16, 31, 16, 17, 72], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 22]] | 1 | 615 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int main() {
int N;
string S;
cin >> N >> S;
if (N < 3) {
cout << 0 << endl;
retu... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int main() {
int N;
string S;
cin >> N >> S;
if (N < 3) {
cout << 0 << endl;
retu... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 250 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
string S;
cin >> S;
vector<int> num_R(N), num_G(N), num_B(N);
int count_R, count_G, count_B;
count_R = 0;
count_B = 0;
count_G = 0;
for (int i = 0; i < N; i++) {
if (S[i] == 'R')
count_R++;
if (S[i] == 'G'... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N;
cin >> N;
string S;
cin >> S;
vector<int> num_R(N), num_G(N), num_B(N);
int count_R, count_G, count_B;
count_R = 0;
count_B = 0;
count_G = 0;
for (int i = 0; i < N; i++) {
if (S[i] == 'R')
count_R++;
if (S[i] == 'G'... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 632 |
#include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); ++(i))
using namespace std;
using ll = long long;
map<char, int> charToInt = {{'R', 1}, {'G', 2}, {'B', 4}};
int main() {
int n;
string s;
cin >> n >> s;
vector<int> t;
int r = 0, g = 0, b = 0;
if (n < 3) {
cout << 0 << endl;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); ++(i))
using namespace std;
using ll = long long;
map<char, int> charToInt = {{'R', 1}, {'G', 2}, {'B', 4}};
int main() {
int n;
string s;
cin >> n >> s;
vector<int> t;
ll r = 0, g = 0, b = 0;
if (n < 3) {
cout << 0 << endl;
r... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 256 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
// Your code here!
int n;
cin >> n;
string s;
cin >> s;
// int ct=0;
int a = 0, b = 0, c = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == 'R')
a++;
else if (s[i] == 'G')
b++;
else if (s[i] == 'B')
c++;
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
// Your code here!
int n;
cin >> n;
string s;
cin >> s;
// int ct=0;
long long int a = 0, b = 0, c = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == 'R')
a++;
else if (s[i] == 'G')
b++;
else if (s[i] == 'B')
... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96]] | 1 | 206 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
String s = sc.next();
sc.close();
int r = 0, g = 0, b = 0, ans = 0;
for (int i = 0; i < n; i++) {
if (s.substring(i, i + 1).equals("R")) {
... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
String s = sc.next();
sc.close();
int r = 0, g = 0, b = 0, ans = 0;
for (int i = 0; i < n; i++) {
if (s.substring(i, i + 1).equals("R")) {
... | [["+", 0, 16, 31, 16, 31, 16, 31, 74, 0, 24], ["+", 31, 16, 31, 16, 31, 74, 39, 506, 0, 96], ["+", 0, 16, 31, 16, 31, 16, 31, 74, 0, 25]] | 3 | 284 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
s = ' ' + s;
map<char, int> m;
m['R'] = 0;
m['G'] = 0;
m['B'] = 0;
for (int i = 1; i <= n; i++) {
if (s[i] == 'R') {
m['R']++;
} else if (s[i] == 'G') {
m['G']++;
} else if (s[i]... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
s = ' ' + s;
map<char, long long> m;
m['R'] = 0;
m['G'] = 0;
m['B'] = 0;
for (int i = 1; i <= n; i++) {
if (s[i] == 'R') {
m['R']++;
} else if (s[i] == 'G') {
m['G']++;
} else if... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 39, 344, 3, 347, 0, 77, 39, 86, 0, 96]] | 1 | 277 |
#include <bits/stdc++.h>
using namespace std;
void fast() {
cin.tie(0);
cin.sync_with_stdio(0);
}
int main() {
fast();
int n, r = 0, g = 0, b = 0;
cin >> n;
string s;
cin >> s;
r = count(s.begin(), s.end(), 'R');
g = count(s.begin(), s.end(), 'G');
b = count(s.begin(), s.end(), 'B');
long long su... | #include <bits/stdc++.h>
using namespace std;
void fast() {
cin.tie(0);
cin.sync_with_stdio(0);
}
int main() {
fast();
long long n, r = 0, g = 0, b = 0;
cin >> n;
string s;
cin >> s;
r = count(s.begin(), s.end(), 'R');
g = count(s.begin(), s.end(), 'G');
b = count(s.begin(), s.end(), 'B');
long l... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 226 |
// ABC162D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
string S;
cin >> S;
int R = 0, G = 0, B = 0;
for (int i = 0; i < N; i++) {
switch (S[i]) {
case 'R':
R++;
break;
case 'G':
G++;
break;
case 'B':
B++;
b... | // ABC162D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
string S;
cin >> S;
long long int R = 0, G = 0, B = 0;
for (int i = 0; i < N; i++) {
switch (S[i]) {
case 'R':
R++;
break;
case 'G':
G++;
break;
case 'B':
B+... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 212 |
// ABC162D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
string S;
cin >> S;
int R = 0, G = 0, B = 0;
for (int i = 0; i < N; i++) {
switch (S[i]) {
case 'R':
R++;
break;
case 'G':
G++;
break;
case 'B':
B++;
b... | // ABC162D - RGB Triplets
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
string S;
cin >> S;
long long int R = 0, G = 0, B = 0;
for (int i = 0; i < N; i++) {
switch (S[i]) {
case 'R':
R++;
break;
case 'G':
G++;
break;
case 'B':
B+... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 211 |
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)((x).size())
#define debug(x) cout << #x << ":" << x << ' ';
#define debugg(x) cout << #x << ":" << x << ' ' << "\n";
#define endl "\n"
#define L(X) ((X) << 1)
#define R(X) (((X) << 1) | 1)
#define... | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)((x).size())
#define debug(x) cout << #x << ":" << x << ' ';
#define debugg(x) cout << #x << ":" << x << ' ' << "\n";
#define endl "\n"
#define L(X) ((X) << 1)
#define R(X) (((X) << 1) | 1)
#define... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 734 |
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)((x).size())
#define debug(x) cout << #x << ":" << x << ' ';
#define debugg(x) cout << #x << ":" << x << ' ' << "\n";
#define endl "\n"
#define L(X) ((X) << 1)
#define R(X) (((X) << 1) | 1)
#define... | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)((x).size())
#define debug(x) cout << #x << ":" << x << ' ';
#define debugg(x) cout << #x << ":" << x << ' ' << "\n";
#define endl "\n"
#define L(X) ((X) << 1)
#define R(X) (((X) << 1) | 1)
#define... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 1,280 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
char[] rgb = scan.next().toCharArray();
scan.close();
int numR = 0;
int numG = 0;
int numB = 0;
for (char c : rgb) {
switch (c)... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
char[] rgb = scan.next().toCharArray();
scan.close();
long numR = 0;
long numG = 0;
long numB = 0;
for (char c : rgb) {
switch ... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 228 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n); i++)
int main() {
int N;
string S;
cin >> N >> S;
vector<long long int> r(N), g(N), b(N);
if (S.at(0) == 'R')
r[0] = 1;
else
r[0] = 0;
if (S.at(0) ==... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n); i++)
int main() {
int N;
string S;
cin >> N >> S;
vector<long long int> r(N), g(N), b(N);
if (S.at(0) == 'R')
r[0] = 1;
else
r[0] = 0;
if (S.at(0) ==... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 746 |
// Bismillahirrahmanirrahim
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█▄█
//█─█─█▄─█▄─█─█─█─█
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long lo;
typedef pair<lo, lo> PII;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#d... | // Bismillahirrahmanirrahim
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█▄█
//█─█─█▄─█▄─█─█─█─█
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long lo;
typedef pair<lo, lo> PII;
#define fi first
#define se second
#define int long long
#define mp make_pair
#... | [["+", 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], ["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40]] | 1 | 588 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.