buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vb = vector<bool>; using vl = vector<long>; using vs = vector<string>; using vvi = vector<vector<int>>; using vvb = vector<vector<bool>>; using vvc = vector<vector<char>>; using pii = pair<int, int>; using pil = pair<int, long>; using pll = pai...
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vb = vector<bool>; using vl = vector<long>; using vs = vector<string>; using vvi = vector<vector<int>>; using vvb = vector<vector<bool>>; using vvc = vector<vector<char>>; using pii = pair<int, int>; using pil = pair<int, long>; using pll = pai...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
539
#include <algorithm> #include <climits> #include <functional> #include <iostream> #include <math.h> #include <queue> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <unordered_set> #include <vector> using namespace std; typedef long long ll; // auto mod int // https://youtu.be/L8...
#include <algorithm> #include <climits> #include <functional> #include <iostream> #include <math.h> #include <queue> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <unordered_set> #include <vector> using namespace std; typedef long long ll; // auto mod int // https://youtu.be/L8...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 12, 23, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 12, 23, 0, 16, 12, 69, 341, 342, 0, 22]]
1
498
#include <bits/stdc++.h> using namespace std; #define INF 1000000007 #define LINF (1LL << 62) #define PI 3.14159265358979 typedef long long i64; typedef pair<i64, i64> P; inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; } template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return ...
#include <bits/stdc++.h> using namespace std; #define INF 1000000007 #define LINF (1LL << 62) #define PI 3.14159265358979 typedef long long i64; typedef pair<i64, i64> P; inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; } template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return ...
[["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13]]
1
520
X = 998244353 N, M, K = map(int, input().split()) def calc_inverse(n, law): if n == 1: return 1 pre_r = law pre_x = 0 pre_y = 1 cur_r = n cur_x = 1 cur_y = 0 while True: d = pre_r // cur_r r = pre_r % cur_r nxt_r = r nxt_x = pre_x - d * cur_x nxt_y = pre_y - d * cur_y if nxt_r == 1: ...
X = 998244353 N, M, K = map(int, input().split()) def calc_inverse(n, law): if n == 1: return 1 pre_r = law pre_x = 0 pre_y = 1 cur_r = n cur_x = 1 cur_y = 0 while True: d = pre_r // cur_r r = pre_r % cur_r nxt_r = r nxt_x = pre_x - d * cur_x nxt_y = pre_y - d * cur_y if nxt_r == 1: ...
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 22], ["+", 12, 652, 3, 4, 0, 657, 31, 657, 12, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
325
#include <bits/stdc++.h> #define mk make_pair #define fs first #define sc second using namespace std; typedef long long ll; typedef long double ld; ll mod = 998244353; long long fact[100010]; void pre() { fact[0] = 1; for (long long i = 1; i < 100010; ++i) { fact[i] = (fact[i - 1] * i) % mod; } } long long pw...
#include <bits/stdc++.h> #define mk make_pair #define fs first #define sc second using namespace std; typedef long long ll; typedef long double ld; ll mod = 998244353; long long fact[200010]; void pre() { fact[0] = 1; for (long long i = 1; i < 200010; ++i) { fact[i] = (fact[i - 1] * i) % mod; } } long long pw...
[["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
322
N = gets.to_i start_depth = 0 end_depth = 0 center_blocks= [] N.times{ s = gets.chomp d = 0 min_d = 0 max_d = 0 s.each_char{|c| if c == "(" d += 1 if d > max_d max_d = d end else d -= 1 if d < min_d min_d = d end end } depth = [-min_d, d - min_d] next if depth[0] == 0 && depth[1]...
N = gets.to_i start_depth = 0 end_depth = 0 center_blocks= [] N.times{ s = gets.chomp d = 0 min_d = 0 max_d = 0 s.each_char{|c| if c == "(" d += 1 if d > max_d max_d = d end else d -= 1 if d < min_d min_d = d end end } depth = [-min_d, d - min_d] next if depth[0] == 0 && depth[1]...
[["-", 0, 121, 75, 759, 15, 738, 12, 742, 0, 612], ["+", 0, 121, 75, 759, 15, 738, 12, 742, 0, 612]]
4
216
#pragma GCC optimize("O3") // #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define per(i, b, a) for (int i = b - 1; i >= a; i--) #define trav(a, x) for (auto &a : x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() typedef long long ll; typedef pair<in...
#pragma GCC optimize("O3") // #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define per(i, b, a) for (int i = b - 1; i >= a; i--) #define trav(a, x) for (auto &a : x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() typedef long long ll; typedef pair<in...
[["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
556
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; typedef long long lint; typedef vector<int> vi; typedef pair<i...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; typedef long long lint; typedef vector<int> vi; typedef pair<i...
[["-", 0, 218, 8, 9, 0, 37, 0, 16, 17, 18], ["+", 0, 218, 8, 9, 0, 37, 0, 16, 17, 47]]
1
559
import java.io.*; import java.math.*; import java.util.*; public class Main { static PrintWriter out = new PrintWriter(System.out); static Reader in = new Reader(); public static void main(String[] args) throws IOException { Main solver = new Main(); solver.solve(); out.flush(); out.close(); } ...
import java.io.*; import java.math.*; import java.util.*; public class Main { static PrintWriter out = new PrintWriter(System.out); static Reader in = new Reader(); public static void main(String[] args) throws IOException { Main solver = new Main(); solver.solve(); out.flush(); out.close(); } ...
[["-", 8, 196, 0, 1, 0, 11, 31, 509, 119, 22], ["+", 8, 196, 0, 1, 0, 11, 31, 509, 119, 22]]
3
1,437
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define rep1(i, n) for (int i = 1, i##_len = (n); i ...
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define rep1(i, n) for (int i = 1, i##_len = (n); i ...
[["-", 0, 11, 12, 23, 0, 16, 31, 118, 119, 120], ["+", 0, 11, 12, 23, 0, 16, 31, 118, 119, 120], ["-", 0, 11, 12, 23, 0, 16, 12, 118, 119, 120], ["+", 0, 11, 12, 23, 0, 16, 12, 118, 119, 120]]
1
410
#include <bits/stdc++.h> using namespace std; int a[1111111], b[1111111]; int main() { int n, S = 0, T = 0, D = 0; cin >> n; for (int i = 0; i < n; i++) { string z; cin >> z; int d = 0, s = 0; for (auto c : z) if (c == '(') d++; else d--, s = max(s, -d); if (d > 0)...
#include <bits/stdc++.h> using namespace std; int a[1111111], b[1111111]; int main() { int n, S = 0, T = 0, D = 0; cin >> n; for (int i = 0; i < n; i++) { string z; cin >> z; int d = 0, s = 0; for (auto c : z) if (c == '(') d++; else d--, s = max(s, -d); if (d > 0)...
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 110]]
1
264
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vl = vector<ll>; template <class T> using vc = vector<T>; template <class T> using vvc = vector<vector<T>>; #define eb emplace_back #define all(x) (x).begin(), (x).end() #define rep(i, n) for (ll i = 0; i < (n); i++) #def...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vl = vector<ll>; template <class T> using vc = vector<T>; template <class T> using vvc = vector<vector<T>>; #define eb emplace_back #define all(x) (x).begin(), (x).end() #define rep(i, n) for (ll i = 0; i < (n); i++) #def...
[["-", 0, 57, 15, 339, 51, 16, 12, 118, 119, 120], ["+", 0, 57, 15, 339, 51, 16, 12, 118, 119, 120]]
1
1,048
n = int(input()) left = [] right = [] for i in range(n): s = input() n0 = 0 n1 = 0 l = len(s) for j in range(l): if s[j] == "(": n0 += 1 else: if n0 == 0: n1 += 1 else: n0 -= 1 if n0 > 0 or n1 > 0: if n0 ...
n = int(input()) left = [] right = [] for i in range(n): s = input() n0 = 0 n1 = 0 l = len(s) for j in range(l): if s[j] == "(": n0 += 1 else: if n0 == 0: n1 += 1 else: n0 -= 1 if n0 > 0 or n1 > 0: if n0 ...
[["-", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["-", 0, 14, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 0, 22]]
5
224
#ifdef LOCAL //#define _GLIBCXX_DEBUG #endif //#pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl") //#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<int, int> Pi; typedef vector<ll>...
#ifdef LOCAL //#define _GLIBCXX_DEBUG #endif //#pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl") //#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<int, int> Pi; typedef vector<ll>...
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["-", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 2...
1
1,667
def main(): n = int(input()) s = [list(input()) for _ in range(n)] L_cnt = [] R_cnt = [] LR_cnt = [] min_l,min_r = 10**6,10**6 for i in range(n): t = s[i] flag = 0 l = 0 r = 0 for j in range(len(t)): if not flag and t[j] == ')': ...
def main(): n = int(input()) s = [list(input()) for _ in range(n)] L_cnt = [] R_cnt = [] LR_cnt = [] min_l,min_r = 10**6,10**6 for i in range(n): t = s[i] flag = 0 l = 0 r = 0 for j in range(len(t)): if not flag and t[j] == ')': ...
[["-", 0, 1, 0, 677, 12, 206, 51, 206, 51, 22], ["+", 0, 1, 0, 677, 12, 206, 51, 206, 51, 22]]
5
456
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdint> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <random> #include <regex> #include...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdint> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <random> #include <regex> #include...
[["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 72], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22]]
1
2,673
import sys read = sys.stdin.read n = int(input()) ss = read().split() cnt_p = [] cnt_m = [] for i in range(n): left = 0 right = 0 for s in ss[i]: if(s == '('): left += 1 elif(s == ')'): if(left > 0): left -= 1 else: right ...
import sys read = sys.stdin.read n = int(input()) ss = read().split() cnt_p = [] cnt_m = [] for i in range(n): left = 0 right = 0 for s in ss[i]: if(s == '('): left += 1 elif(s == ')'): if(left > 0): left -= 1 else: right ...
[["-", 51, 670, 8, 23, 0, 657, 31, 206, 206, 612], ["+", 51, 670, 8, 23, 0, 657, 31, 206, 206, 612]]
5
220
// This program is written by Brian Peng. #pragma GCC optimize("Ofast", "inline", "no-stack-protector") #include <bits/stdc++.h> using namespace std; #define Rd(a) (a = rd()) #define Gc(a) (a = getchar()) #define Pc(a) putchar(a) int rd() { int x; char c(getchar()); bool k; while (!isdigit(c) && c ^ '-') if...
// This program is written by Brian Peng. #pragma GCC optimize("Ofast", "inline", "no-stack-protector") #include <bits/stdc++.h> using namespace std; #define Rd(a) (a = rd()) #define Gc(a) (a = getchar()) #define Pc(a) putchar(a) int rd() { int x; char c(getchar()); bool k; while (!isdigit(c) && c ^ '-') if...
[["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["-", 0, 57, 64, 9, 0, 57, 64, 37, 0, 146], ["+", 0, 57, 64, 9, 0, 57, 64, 37, 0, 147]]
1
649
#include <bits/stdc++.h> using namespace std; using int32 = int_fast32_t; using int64 = int_fast64_t; const int32 INF = 1e9; const int32 MOD = 1e9 + 7; const int64 LLINF = 1e18; #define YES(n) cout << ((n) ? "YES\n" : "NO\n") #define Yes(n) cout << ((n) ? "Yes\n" : "No\n") #define POSSIBLE cout << ((n) ? "POSSIBLE\n...
#include <bits/stdc++.h> using namespace std; using int32 = int_fast32_t; using int64 = int_fast64_t; const int32 INF = 1e9; const int32 MOD = 1e9 + 7; const int64 LLINF = 1e18; #define YES(n) cout << ((n) ? "YES\n" : "NO\n") #define Yes(n) cout << ((n) ? "Yes\n" : "No\n") #define POSSIBLE cout << ((n) ? "POSSIBLE\n...
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72]]
1
355
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <time.h> #include ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <time.h> #include ...
[["-", 3, 4, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 3, 4, 0, 2, 3, 4, 0, 16, 12, 22]]
1
828
#include <bits/stdc++.h> using namespace std; using Int = long long; int PREP = (cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(9), 0); // int SEGV = getenv("D") || (exit(system("D= SEGFAULT_SIGNALS=all catchsegv // ./prog.exe") >> 8), 0); int main() { int N; cin >> N; ve...
#include <bits/stdc++.h> using namespace std; using Int = long long; int PREP = (cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(9), 0); // int SEGV = getenv("D") || (exit(system("D= SEGFAULT_SIGNALS=all catchsegv // ./prog.exe") >> 8), 0); int main() { int N; cin >> N; ve...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]]
1
347
import sys import heapq sys.setrecursionlimit(10**6) input = sys.stdin.readline def end(flag): if flag: print('Yes') else: print('No') exit(0) n = int(input()) # S = [tuple() for _ in range(n)] plus = [] minus = [] zero = [] total = 0 for i in range(n): s = input()[:-1] cnt = 0 M...
import sys import heapq sys.setrecursionlimit(10**6) input = sys.stdin.readline def end(flag): if flag: print('Yes') else: print('No') exit(0) n = int(input()) # S = [tuple() for _ in range(n)] plus = [] minus = [] zero = [] total = 0 for i in range(n): s = input()[:-1] cnt = 0 M...
[["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 12, 612]]
5
308
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int N; cin >> N; vector<string> S(N); for (int i = 0; i < N; i++) cin >> S[i]; vector<pair<int, int>> ps1, ps2; int all = 0; for (int i = 0; i < N; i++) { int K = S[i].size(); int bottom = 0; int sub = 0; ...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int N; cin >> N; vector<string> S(N); for (int i = 0; i < N; i++) cin >> S[i]; vector<pair<int, int>> ps1, ps2; int all = 0; for (int i = 0; i < N; i++) { int K = S[i].size(); int bottom = 0; int sub = 0; ...
[["-", 0, 37, 0, 16, 12, 16, 31, 118, 28, 22], ["+", 0, 37, 0, 16, 12, 16, 31, 118, 28, 22], ["-", 0, 37, 0, 16, 12, 16, 12, 118, 28, 22], ["+", 0, 37, 0, 16, 12, 16, 12, 118, 28, 22]]
1
449
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define fi first #define se second #define mp make_pair #define fastIO \ ios::sync_with_stdio(false); \ c...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define fi first #define se second #define mp make_pair #define fastIO \ ios::sync_with_stdio(false); \ c...
[["+", 0, 16, 31, 2, 3, 4, 0, 91, 17, 33], ["+", 31, 2, 3, 4, 0, 16, 31, 91, 17, 33], ["+", 0, 16, 12, 2, 3, 4, 0, 91, 17, 33], ["+", 12, 2, 3, 4, 0, 16, 31, 91, 17, 33]]
1
272
#define LOCAL #define _USE_MATH_DEFINES #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #inc...
#define LOCAL #define _USE_MATH_DEFINES #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #inc...
[["-", 0, 7, 15, 16, 12, 16, 12, 103, 0, 125], ["+", 0, 7, 15, 16, 12, 16, 12, 103, 0, 125]]
1
1,113
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector<array<int, 2>> v, w; for (int i = 0; i < n; i++) { string s; cin >> s; int mini = 0; int curr = 0; for (auto &c : s) { if (c == '(') curr++; ...
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector<array<int, 2>> v, w; for (int i = 0; i < n; i++) { string s; cin >> s; int mini = 0; int curr = 0; for (auto &c : s) { if (c == '(') curr++; ...
[["-", 0, 2, 3, 4, 0, 83, 0, 16, 31, 22], ["-", 0, 2, 3, 4, 0, 83, 0, 16, 17, 33], ["+", 0, 2, 3, 4, 0, 83, 0, 16, 17, 33], ["+", 0, 2, 3, 4, 0, 83, 0, 16, 12, 22]]
1
282
// // Created by yamunaku on 2020/05/10. // #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define repl(i, l, r) for (int i = (l); i < (r); i++) #define per(i, n) for (int i = ((n)-1); i >= 0; i--) #define perl(i, l, r) for (int i = ((r)-1); i >= (l); i--) #define all(x...
// // Created by yamunaku on 2020/05/10. // #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define repl(i, l, r) for (int i = (l); i < (r); i++) #define per(i, n) for (int i = ((n)-1); i >= 0; i--) #define perl(i, l, r) for (int i = ((r)-1); i >= (l); i--) #define all(x...
[["-", 64, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 64, 9, 0, 1, 0, 2, 63, 118, 28, 22]]
1
479
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String input = in.nextLine(); String s = "ABC", t = "ARC"; if (input == s) { System.out.println("ARC"); } else { System.out.println("ABC"); } } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String input = in.nextLine(); String s = "ABC", t = "ARC"; if (input.equals(s)) { System.out.println("ARC"); } else { System.out.println("ABC"); } } }
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 15, 0, 492, 0, 131], ["+", 8, 196, 0, 57, 15, 15, 0, 492, 141, 22], ["+", 0, 57, 15, 15, 0, 492, 3, 4, 0, 24], ["+", 0, 57, 15, 15, 0, 492, 3, 4, 0, 25]]
3
90
S = input() print("ARC") if S=="ABC" else print("ARC")
S = input() print("ARC") if S=="ABC" else print("ABC")
[["-", 0, 41, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 41, 0, 652, 3, 4, 0, 557, 0, 6]]
5
24
s = input() print("ABC" if s == "ARC" else "ABC")
s=input();print("ABC"if s=="ARC"else"ARC")
[["+", 36, 36, 36, 36, 36, 36, 0, 656, 0, 35], ["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]]
5
21
S=int() if S=='ABC': print('ARC') else: print('ABC')
S=input() if S==('ABC'): print('ARC') else: print('ABC')
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 23, 0, 24], ["+", 0, 656, 0, 57, 15, 666, 0, 23, 0, 25]]
5
26
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string S; cin >> S; if (S == "ABC") cout << "ARC" << endl; else cout << "ARC" << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string S; cin >> S; if (S == "ABC") cout << "ARC" << endl; else cout << "ABC" << endl; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
52
#include <stdio.h> int main() { char nama[5]; scanf("%s", nama); if (nama[1] == 'B') { printf("ARC"); } else if (nama[2] == 'R') { printf("ABC"); } return 0; }
#include <stdio.h> int main() { char activity[50]; scanf("%s", activity); if (activity[1] == 'B') { printf("ARC"); } else if (activity[1] == 'R') { printf("ABC"); } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 49, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 69, 28, 22], ["+", 0, 57, 15, 339, 51...
1
67
#include <stdio.h> int main() { char nama[5]; scanf("%s", nama); if (nama[1] == 'B') { printf("ARC"); } else if (nama[2] == 'R') { printf("ABC"); } return 0; }
#include <stdio.h> int main() { char nama[5]; scanf("%s", nama); if (nama[1] == 'B') { printf("ARC"); } else if (nama[1] == 'R') { printf("ABC"); } else { } return 0; }
[["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13], ["+", 0, 57, 75, 76, 0, 57, 64, 9, 0, 46], ["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95], ["+", 75, 76, 0, 57, 75, 76, 0, 9, 0, 45]]
1
67
S = gets.to_s if S == "ABC" puts "ARC" else puts "ABC" end
S = gets.strip.to_s #問答無用で改行コードを落とせ if S == "ABC" puts "ARC" else puts "ABC" end
[["+", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131]]
4
21
S = gets.to_s if S == "ABC" then puts "ARC" else puts "ABC" end
S = gets.strip.to_s if (S == "ABC") then puts "ARC" else puts "ABC" end
[["+", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["+", 36, 36, 0, 493, 0, 121, 15, 739, 0, 24], ["+", 36, 36, 0, 493, 0, 121, 15, 739, 0, 25]]
4
22
print("ABC" if input()[1] == "B" else "ARC")
print("ARC" if input()[1] == "B" else "ABC")
[["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]]
5
21
// Hail god Yato #include <bits/stdc++.h> using namespace std; #define hs \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0...
// Hail god Yato #include <bits/stdc++.h> using namespace std; #define hs \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0...
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
117
#include <iostream> using namespace std; int main() { string s; cin >> s; if (s[1] == 'R') cout << "ABC" << endl; else cout << "AGC" << endl; return 0; }
#include <iostream> using namespace std; int main() { string s; cin >> s; if (s[1] == 'R') cout << "ABC" << endl; else cout << "ARC" << endl; return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
50
s=gets.chomp if s=="ABC" p "ARC" else p "ABC" end
s=gets.chomp if s=="ABC" puts "ARC" else puts "ABC" end
[["-", 0, 493, 0, 121, 64, 749, 0, 652, 735, 22], ["+", 0, 493, 0, 121, 64, 749, 0, 652, 735, 22], ["-", 0, 493, 0, 121, 75, 95, 0, 652, 735, 22], ["+", 0, 493, 0, 121, 75, 95, 0, 652, 735, 22]]
4
21
/* author : nishi5451 created: 11.08.2020 23:14:26 */ #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { string s; if (s == "ABC") cout << "ARC" << endl; else cout << "ABC" << endl; return 0; }
/* author : nishi5451 created: 11.08.2020 23:14:26 */ #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { string s; cin >> s; if (s == "ABC") cout << "ARC" << endl; else cout << "ABC" << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
57
#include <stdio.h> int main() { char S[3]; scanf("%s", S); if (S[1] == "B") printf("ARC"); else printf("ABC"); return 0; }
#include <stdio.h> int main() { char S[3]; scanf("%s", S); if (S[1] == 'B') printf("ARC"); else printf("ABC"); return 0; }
[["-", 0, 57, 15, 23, 0, 16, 12, 5, 0, 62], ["+", 0, 57, 15, 23, 0, 16, 12, 103, 0, 104]]
0
52
#include <stdio.h> int main(void) { char a[5]; scanf("%s", a); if (a[1] == 'B') { a[1] = 'R'; } else { a[1] = 'B'; } printf("%c", a); return 0; }
#include <stdio.h> int main(void) { char a[5]; scanf("%s", a); if (a[1] == 'B') { a[1] = 'R'; } else { a[1] = 'B'; } puts(a); return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21]]
0
70
S = input() if(S == ABC): print("ARC") else: print("ABC")
S = input() if(S == "ABC"): print("ARC") else: print("ABC")
[["+", 0, 57, 15, 23, 0, 666, 0, 557, 0, 654], ["+", 0, 57, 15, 23, 0, 666, 0, 557, 0, 655]]
5
26
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vector<int>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; #define debug(x) cerr << #x << ": " << x << endl; #define MOD 1000000007ULL; #define rep(i, n) for (int i = 0; i < n; i++) int main() { s...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vector<int>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; #define debug(x) cerr << #x << ": " << x << endl; #define MOD 1000000007ULL; #define rep(i, n) for (int i = 0; i < n; i++) int main() { s...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
105
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String string = sc.nextLine(); char[] str_char = new char[3]; for (int i = 0; i < 3; i++) { str_char[i] = string.charAt(i); } if (str_char[1] == 'B') { str...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String string = sc.nextLine(); char[] str_char = new char[3]; for (int i = 0; i < 3; i++) { str_char[i] = string.charAt(i); } if (str_char[1] == 'B') { str...
[["-", 0, 57, 64, 196, 0, 1, 0, 11, 12, 252], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 12, 252]]
3
120
#include <bits/stdc++.h> using namespace std; typedef long long lol; //マクロ // forループ関係 //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか // Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる #define REP(i, n) for (lol i = 0; i < lol(n); i++) #define REPD(i, n) for (lol i = n - 1; i >= 0; i--) #define FOR(i, a, b) fo...
#include <bits/stdc++.h> using namespace std; typedef long long lol; //マクロ // forループ関係 //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか // Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる #define REP(i, n) for (lol i = 0; i < lol(n); i++) #define REPD(i, n) for (lol i = n - 1; i >= 0; i--) #define FOR(i, a, b) fo...
[["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
227
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define ll long long #define ull unsigned long long #define si set<ll> #define vi vector<ll> #define popcount(x) __builtin_popcountll(x) #define mii map<ll, ll> #define vpi vector<pair<ll, ll>> #define sz(c) (int)c.size() #define fr first #define ll l...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define ll long long #define ull unsigned long long #define si set<ll> #define vi vector<ll> #define popcount(x) __builtin_popcountll(x) #define mii map<ll, ll> #define vpi vector<pair<ll, ll>> #define sz(c) (int)c.size() #define fr first #define ll l...
[["-", 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
305
#include <iostream> #define rep(i, n) for (int i = 0; i < (n); i++) #define ll long long using namespace std; int main() { string s; cin >> s; if (s.compare("ABC")) { cout << "ARC" << endl; } else { cout << "ABC" << endl; } return 0; }
#include <iostream> #define rep(i, n) for (int i = 0; i < (n); i++) #define ll long long using namespace std; int main() { string s; cin >> s; if (s.compare("ABC") == 0) { cout << "ARC" << endl; } else { cout << "ABC" << endl; } return 0; }
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
65
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; if (s[2] == 'B') { cout << "ARC" << endl; } else { cout << "ABC" << endl; } }
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; if (s[1] == 'B') { cout << "ARC" << endl; } else { cout << "ABC" << endl; } }
[["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13]]
1
53
#include <stdio.h> int main(void) { char S[4]; scanf("%s", S); if (S[1] == "B") { printf("ARC\n"); } else { printf("ABC\n"); } return 0; }
#include <stdio.h> int main(void) { char S[4]; scanf("%s", S); if (S[1] == 'B') { printf("ARC\n"); } else { printf("ABC\n"); } return 0; }
[["-", 0, 57, 15, 23, 0, 16, 12, 5, 0, 62], ["+", 0, 57, 15, 23, 0, 16, 12, 103, 0, 104]]
0
59
#include <stdio.h> int main() { char s[3]; scanf("%c", &s); if (s[1] == 'R') { printf("ABC\n"); } else { printf("ARC\n"); } return 0; }
#include <stdio.h> int main() { char s[3]; scanf("%s", &s); if (s[1] == 'R') { printf("ABC\n"); } else { printf("ARC\n"); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
59
#include <stdio.h> int main() { char S[3]; gets(S); if (S[1] == 'B') { printf("ARC"); } else { printf("ARC"); } return 0; }
#include <stdio.h> int main() { char S[3]; gets(S); if (S[1] == 'B') { printf("ARC"); } else { printf("ABC"); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
52
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rep2(i, s, n) for (int i = (s); i < (n); ++i) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define pb push_back #define eb emplace_back #define vi vector<int> #d...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rep2(i, s, n) for (int i = (s); i < (n); ++i) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define pb push_back #define eb emplace_back #define vi vector<int> #d...
[["-", 0, 30, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 4, 0, 13]]
1
1,108
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdlib> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; struct edge { ll to; ll cost; }; using graph = vector<vector<edge>>; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep2(i, n...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdlib> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; struct edge { ll to; ll cost; }; using graph = vector<vector<edge>>; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep2(i, n...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72]]
1
636
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define RREP(i, m, n) for (int i = (int)(m); i >= (int)(n); i--) #define rrep(i, n) RREP(i, (n)-1, 0) #define all(v) v.begin(), v.end() ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define RREP(i, m, n) for (int i = (int)(m); i >= (int)(n); i--) #define rrep(i, n) RREP(i, (n)-1, 0) #define all(v) v.begin(), v.end() ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
515
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int(i) = 0; (i) < (n); ++(i)) #define REPR(i, n) for (int(i) = (n); (i) >= 0; --(i)) #define FOR(i, n, m) for (int(i) = (n); (i) < (m); ++(i)) // constexpr int INF = 1e9; constexpr ll INF = 1LL << 61; constexpr ll mod = 9982443...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int(i) = 0; (i) < (n); ++(i)) #define REPR(i, n) for (int(i) = (n); (i) >= 0; --(i)) #define FOR(i, n, m) for (int(i) = (n); (i) < (m); ++(i)) // constexpr int INF = 1e9; constexpr ll INF = 1LL << 61; constexpr ll mod = 9982443...
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
424
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < n; ++i) #define all(c) begin(c), end(c) template <typename T1, typename T2> bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return true; } else return false; } template <typename T1, typename T2> bool ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < n; ++i) #define all(c) begin(c), end(c) template <typename T1, typename T2> bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return true; } else return false; } template <typename T1, typename T2> bool ...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
539
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) constexpr int MX = 1000005; int n, el, er; char s[MX]; using P = pair<int, int>; P ls[MX], rs[MX]; int main() { scanf("%d", &n); rep(i, n) { scanf("%s", s); int len = strlen(s), l = 0, r = 0; rep(j, len) { ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) constexpr int MX = 1000005; int n, el, er; char s[MX]; using P = pair<int, int>; P ls[MX], rs[MX]; int main() { scanf("%d", &n); rep(i, n) { scanf("%s", s); int len = strlen(s), l = 0, r = 0; rep(j, len) { ...
[["-", 0, 218, 8, 9, 0, 37, 0, 16, 17, 18], ["+", 0, 218, 8, 9, 0, 37, 0, 16, 17, 47]]
1
320
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repit(it, li) for (auto it = li.begin(); it != li.end(); it++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n; cin >> n; string s; int sum = 0; vector<P> ps[2]; rep(i, n) { cin >> ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repit(it, li) for (auto it = li.begin(); it != li.end(); it++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n; cin >> n; string s; int sum = 0; vector<P> ps[2]; rep(i, n) { cin >> ...
[["-", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120]]
1
315
n=int(input()) d=[] e=[] for i in range(n): p=[0,0] s=input() for j in s: if j==")": if p[0]!=0: p[0]-=1 else: p[1]+=1 else: p[0]+=1 if p[1]-p[0]>=0: d.append(p) else: e.append(p) d=sorted(d,key=lambd...
n=int(input()) d=[] e=[] for i in range(n): p=[0,0] s=input() for j in s: if j==")": if p[0]!=0: p[0]-=1 else: p[1]+=1 else: p[0]+=1 if p[0]-p[1]>=0: d.append(p) else: e.append(p) d=sorted(d,key=lambd...
[["-", 0, 57, 15, 666, 0, 657, 31, 206, 206, 612], ["+", 0, 57, 15, 666, 0, 657, 31, 206, 206, 612], ["-", 0, 57, 15, 666, 0, 657, 12, 206, 206, 612], ["+", 0, 57, 15, 666, 0, 657, 12, 206, 206, 612]]
5
195
#include <bits/stdc++.h> #define fi first #define se second #define mp make_pair using namespace std; typedef pair<int, int> pii; char buf[1000010]; bool cmp(pii a, pii b) { return max(-a.se, -a.fi - b.se) < max(-b.se, -b.fi - b.se); } int main() { int n; scanf("%d", &n); int tot = 0; vector<pii> p, q; ...
#include <bits/stdc++.h> #define fi first #define se second #define mp make_pair using namespace std; typedef pair<int, int> pii; char buf[1000010]; bool cmp(pii a, pii b) { return max(-a.se, -a.fi - b.se) < max(-b.se, -b.fi - a.se); } int main() { int n; scanf("%d", &n); int tot = 0; vector<pii> p, q; ...
[["-", 12, 2, 3, 4, 0, 16, 12, 118, 28, 22], ["+", 12, 2, 3, 4, 0, 16, 12, 118, 28, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
404
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vint; typedef vector<vector<ll>> vvint; #define rep(i, n) for (ll i = 0; i < n; i++) #define repf(i, f, n) for (ll i = f; i < n; i++) #define repr(i, n) for (ll i = n - 1; i >= 0; i--) #define mp make_pair #define mt make_tuple #de...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vint; typedef vector<vector<ll>> vvint; #define rep(i, n) for (ll i = 0; i < n; i++) #define repf(i, f, n) for (ll i = f; i < n; i++) #define repr(i, n) for (ll i = n - 1; i >= 0; i--) #define mp make_pair #define mt make_tuple #de...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["-", 0, 57, 64, 9, 0, 37, 0, 16, 17, 18], ["+", 0, 57, 64, 9, 0, 37, 0, 16, 17, 47]]
1
477
#from collections import deque,defaultdict printn = lambda x: print(x,end='') inn = lambda : int(input()) inl = lambda: list(map(int, input().split())) inm = lambda: map(int, input().split()) ins = lambda : input().strip() DBG = True # and False BIG = 10**18 R = 10**9 + 7 #R = 998244353 def ddprint(x): if D...
#from collections import deque,defaultdict printn = lambda x: print(x,end='') inn = lambda : int(input()) inl = lambda: list(map(int, input().split())) inm = lambda: map(int, input().split()) ins = lambda : input().strip() DBG = True # and False BIG = 10**18 R = 10**9 + 7 #R = 998244353 def ddprint(x): if D...
[["-", 0, 1, 0, 662, 12, 657, 31, 657, 17, 33], ["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22]]
5
360
#include <bits/stdc++.h> using namespace std; struct brac { bool type; int need, supply; brac(string &s) { int minnest_min = 0; int curr = 0; for (const char &c : s) { if (c == '(') curr++; else curr--; minnest_min = min(minnest_min, curr); } if (curr >= 0) {...
#include <bits/stdc++.h> using namespace std; struct brac { bool type; int need, supply; brac(string &s) { int minnest_min = 0; int curr = 0; for (const char &c : s) { if (c == '(') curr++; else curr--; minnest_min = min(minnest_min, curr); } if (curr >= 0) {...
[["-", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120]]
1
367
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; #define pp pair<int, int> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define ld long double #define al(a) (a).begin(), (a).end() #define mk make_pair #define check cout << "?" << endl; ll MOD = 1000000007; ll mod = 9...
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; #define pp pair<int, int> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define ld long double #define al(a) (a).begin(), (a).end() #define mk make_pair #define check cout << "?" << endl; ll MOD = 1000000007; ll mod = 9...
[["-", 0, 9, 0, 1, 0, 11, 12, 118, 119, 120], ["+", 0, 9, 0, 1, 0, 11, 12, 118, 119, 120]]
1
353
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify import math import bisect import random from itertools import permutations, accumulate, combinations, product import sys import string from bisect import bisect_left, bisect_right from math import factorial, ceil, floor, co...
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify import math import bisect import random from itertools import permutations, accumulate, combinations, product import sys import string from bisect import bisect_left, bisect_right from math import factorial, ceil, floor, co...
[["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146]]
5
472
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC push_options #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #include <bits/stdc++.h> #include <immintrin.h> #include <xmmintrin.h> using namespace ::std; __attribute__((constructor)) void init() { cin.tie(0); ios::sync...
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC push_options #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #include <bits/stdc++.h> #include <immintrin.h> #include <xmmintrin.h> using namespace ::std; __attribute__((constructor)) void init() { cin.tie(0); ios::sync...
[["-", 0, 57, 64, 1, 0, 2, 63, 118, 28, 22], ["+", 0, 57, 64, 1, 0, 2, 63, 118, 28, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
1,074
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <float.h> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <float.h> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include...
[["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 49, 50, 51, 16, 31, 2, 63, 118, 28, 22], ["+", 49, 50, 51, 16, 31, 2, 63, 118, 17, 131], ["+", 49, 50, 51, 16, 31, 2, 63, 118, 119, 120], ["+", 49, 50, 51, 16, 31, 2, 3, 4, 0, 24], ["+", 49, 50, 51, 16, 31, 2, 3, 4, 0, 25]]
1
1,373
def Yes(): print('Yes') exit() def No(): print('No') exit() def parse(s): ret = [0, 0] for c in s: if c == ')': if ret[0]: ret[0] -= 1 else: ret[1] -= 1 else: ret[0] += 1 return ret N = int(input()) S =...
def Yes(): print('Yes') exit() def No(): print('No') exit() def parse(s): ret = [0, 0] for c in s: if c == ')': if ret[0]: ret[0] -= 1 else: ret[1] -= 1 else: ret[0] += 1 return ret N = int(input()) S =...
[["+", 3, 4, 0, 653, 51, 670, 8, 664, 17, 33], ["-", 3, 4, 0, 653, 51, 670, 8, 206, 206, 612], ["+", 0, 653, 51, 670, 8, 664, 28, 206, 206, 612]]
5
258
n = int(input()) s = [input() for i in range(n)] l, r = [], [] for i in s: a, b = 0, 0 for j in range(len(i)): if i[j] == "(": b += 1 if i[j] == ")": if b <= 0: a -= 1 else: b += 1 if b - a > 0: l.append([a, b]) ...
n = int(input()) s = [input() for i in range(n)] l, r = [], [] for i in s: a, b = 0, 0 for j in range(len(i)): if i[j] == "(": b += 1 if i[j] == ")": if b <= 0: a += 1 else: b -= 1 if b - a > 0: l.append([a, b]) ...
[["-", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 107], ["-", 75, 76, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 17, 110]]
5
204
package main import ( "bufio" "fmt" "math" "os" "sort" "strconv" "strings" ) var sc = bufio.NewScanner(os.Stdin) type kakko struct { str string min int max int } func main() { N := getStdinInt() F := make([]kakko, 0, N) L := make([]kakko, 0, N) for i := 0; i < N; i++ { s := getStdin() min, max := ...
package main import ( "bufio" "fmt" "math" "os" "sort" "strconv" "strings" ) var sc = bufio.NewScanner(os.Stdin) type kakko struct { str string min int max int } func main() { N := getStdinInt() F := make([]kakko, 0, N) L := make([]kakko, 0, N) for i := 0; i < N; i++ { s := getStdin() min, max := ...
[["-", 12, 432, 0, 16, 31, 2, 3, 4, 0, 22], ["+", 12, 432, 0, 16, 31, 2, 3, 4, 0, 22], ["-", 12, 16, 31, 437, 439, 438, 439, 437, 439, 22], ["+", 12, 16, 31, 437, 439, 438, 439, 437, 439, 22], ["-", 31, 2, 3, 4, 0, 438, 439, 437, 439, 22], ["+", 31, 2, 3, 4, 0, 438, 439, 437, 439, 22]]
7
1,057
#include <bits/stdc++.h> #define ss second #define ff first #define all(x) x.begin(), x.end() #define DEBUG using namespace std; using ll = long long; using pii = pair<ll, ll>; const int oo = 1e9 + 7; const ll mod = 998244353, maxn = 200200; const double PI = acos(-1); bool comp(pii a, pii b) { return a.ss > b.ss; }...
#include <bits/stdc++.h> #define ss second #define ff first #define all(x) x.begin(), x.end() #define DEBUG using namespace std; using ll = long long; using pii = pair<ll, ll>; const int oo = 1e9 + 7; const ll mod = 998244353, maxn = 200200; const double PI = acos(-1); bool comp(pii a, pii b) { return a.ss > b.ss; }...
[["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22]]
1
351
import sys input = sys.stdin.readline n = int(input()) plus = [] minus = [] for _ in range(n): min_s = 0 ts = 0 s = input().strip() for c in s: ts += 1 if c == '(' else -1 min_s = min(ts, min_s) if ts >= 0: plus.append((min_s, ts)) else: minus.append((min_s - ts...
import sys input = sys.stdin.readline n = int(input()) plus = [] minus = [] for _ in range(n): min_s = 0 ts = 0 s = input().strip() for c in s: ts += 1 if c == '(' else -1 min_s = min(ts, min_s) if ts >= 0: plus.append((-min_s, ts)) else: minus.append((-(min_s -...
[["+", 0, 652, 3, 4, 0, 660, 0, 664, 17, 33], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 660, 0, 664, 28, 23, 0, 25], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 72], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 33]]
5
196
import sys input = sys.stdin.readline def main(): n = int(input()) a = [] b = [] for i in range(n): s = input() c1, c2 = 0, 0 for i in range(len(s)): if s[i] == "(": c2 += 1 if s[i] == ")": if c2: c2 -= 1 else: c1 += 1 if c1 >= c2: ...
import sys input = sys.stdin.readline def main(): n = int(input()) a = [] b = [] for i in range(n): s = input() c1, c2 = 0, 0 for i in range(len(s)): if s[i] == "(": c2 += 1 if s[i] == ")": if c2: c2 -= 1 else: c1 += 1 if c1 >= c2: ...
[["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146]]
5
228
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update> oset; #define sim template <class c #defi...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update> oset; #define sim template <class c #defi...
[["-", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["-", 63, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 63, 2, 3, 4, 0, 2, 63, 118, 119, 120]]
1
616
#include <bits/stdc++.h> using namespace std; template <typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl using ll = long long; const ll mod = 1e9 + 7; const int maxn = 1e6 + 5; string sim(string s) { string stk; for (char c : s) { if (stk.e...
#include <bits/stdc++.h> using namespace std; template <typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl using ll = long long; const ll mod = 1e9 + 7; const int maxn = 1e6 + 5; string sim(string s) { string stk; for (char c : s) { if (stk.e...
[["-", 8, 9, 0, 37, 0, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 37, 0, 16, 31, 16, 17, 33], ["-", 8, 9, 0, 37, 0, 16, 12, 16, 31, 22], ["-", 8, 9, 0, 37, 0, 16, 12, 16, 17, 33]]
1
565
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> us...
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> us...
[["+", 64, 1, 0, 2, 3, 4, 0, 91, 17, 33], ["+", 75, 76, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 91, 17, 33], ["+", 0, 2, 3, 4, 0, 91, 28, 23, 0, 25]]
1
509
s=input() if s.find('B')=='1': print('ARC') else: print('ABC')
s=input() if s.find('B')==1: print('ARC') else: print('ABC')
[["-", 0, 656, 0, 57, 15, 666, 0, 557, 0, 654], ["-", 0, 656, 0, 57, 15, 666, 0, 557, 0, 655]]
5
33
function Main(input) { console.log(input === 'ABC' ? 'ARC' : 'ABC'); } // デバッグ用 function debug() { var input = document.getElementById("input").value; Main(input); } //* この行以降は編集しないでください(標準入出力から一度に読み込み、Mainを呼び出します) Main(require("fs").readFileSync("/dev/stdin", "utf8"));
function Main(input) { console.log(input.trim() === 'ABC' ? 'ARC' : 'ABC'); } // デバッグ用 function debug() { var input = document.getElementById("input").value; Main(input); } //* この行以降は編集しないでください(標準入出力から一度に読み込み、Mainを呼び出します) Main(require("fs").readFileSync("/dev/stdin", "utf8"));
[["+", 0, 510, 15, 16, 31, 2, 63, 558, 0, 131], ["+", 0, 510, 15, 16, 31, 2, 63, 558, 559, 560], ["+", 0, 510, 15, 16, 31, 2, 3, 3, 0, 24], ["+", 0, 510, 15, 16, 31, 2, 3, 3, 0, 25]]
2
74
#include <stdio.h> int main(void) { char s[4]; scanf("%s", s); if (s[1] == 'B') { s[1] = 'R'; printf("%s\n", s); } else { s[1] == 'B'; printf("%s\n", s); } return 0; }
#include <stdio.h> int main(void) { char s[4]; scanf("%s", s); if (s[1] == 'B') { s[1] = 'R'; printf("%s\n", s); } else { s[1] = 'B'; printf("%s\n", s); } return 0; }
[["-", 75, 76, 0, 9, 0, 1, 0, 16, 17, 60], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32]]
1
81
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < n; i++) #define repl(i, l, r) for (ll i = (l); i < (r); i++) #define per(i, n) for (ll i = n - 1; i >= 0; i--) #define perl(i, r, l) for (ll i = r - 1; i >= l; i--) #define fi first #define se second #define pb push_back #define ins inse...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < n; i++) #define repl(i, l, r) for (ll i = (l); i < (r); i++) #define per(i, n) for (ll i = n - 1; i >= 0; i--) #define perl(i, r, l) for (ll i = r - 1; i >= l; i--) #define fi first #define se second #define pb push_back #define ins inse...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
385
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; ll GetDigit(ll num) { return log10(num) + 1; } // numの桁数を求める int main() { string s; cin >> s; if (s == "ARC") cout << "ABC" << endl; else cout << "ABC" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; ll GetDigit(ll num) { return log10(num) + 1; } // numの桁数を求める int main() { string s; cin >> s; if (s == "ARC") cout << "ABC" << endl; else cout << "ARC" << endl; return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
78
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(2) == 'B') { cout << "ARC" << endl; } else { cout << "ABC" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(1) == 'B') { cout << "ARC" << endl; } else { cout << "ABC" << endl; } }
[["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 13], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 13]]
1
53
#include <stdio.h> int main(void) { char s[100]; scanf("%s", s); if (s == "ABC") { printf("ARC\n"); } else { printf("ABC\n"); } return 0; }
#include <stdio.h> int main(void) { char s[30]; scanf("%s", s); if (s[1] == 'B') { printf("ARC\n"); } else { printf("ABC\n"); } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 0, 70], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 71, 13], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 0, 73], ["-", 0, 57, 15, 23, 0, 16, 12, 5, 0, 62], ["-", 0, 57, 15, 23, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 15...
0
56
# 166 A S = input() print('ABC') if S == 'ARC' else print('ABC')
# 166 A S = input() print('ABC') if S == 'ARC' else print('ARC')
[["-", 0, 41, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 41, 0, 652, 3, 4, 0, 557, 0, 6]]
5
25
def main(): s = input() if s == "ABC" : print("ARC") else: print("ARC") if __name__ == "__main__": main()
def main(): s = input() if s == "ABC" : print("ARC") else: print("ABC") if __name__ == "__main__": main()
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
41
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> #define ll long long #define ull unsigned long long #define YES cout << "YES" << endl #define NO cout << "NO" << endl #define yes cout << "Yes" << endl #define no cout << "No" << endl #define FOR(i, start, s...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> #define ll long long #define ull unsigned long long #define YES cout << "YES" << endl #define NO cout << "NO" << endl #define yes cout << "Yes" << endl #define no cout << "No" << endl #define FOR(i, start, s...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
128
text = input() if text == "ABC": print("ARC") else: print(text)
text = input() if text == "ABC": print("ARC") else: print("ABC")
[["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655]]
5
24
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s[1] = 'B') cout << "ARC"; else cout << "ABC"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s[1] == 'B') cout << "ARC"; else cout << "ABC"; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
46
#include <stdio.h> int main() { char S[5]; scanf("%s", &S); if (S[1] == 'B') { S[1] = 'R'; } else { S[1] = 'B'; } printf("%S\n", S); return 0; }
#include <stdio.h> int main() { char S[3]; scanf("%s", &S); if (S[1] == 'B') { S[1] = 'R'; } else { S[1] = 'B'; } printf("%s\n", S); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
71
#include <bits/stdc++.h> typedef long long int ll; using namespace std; void solve() { string s; cin >> s; if (s[1] == 'R') cout << "ABC"; else cout << "ABC"; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); return 0; }
#include <bits/stdc++.h> typedef long long int ll; using namespace std; void solve() { string s; cin >> s; if (s[1] == 'R') cout << "ABC"; else cout << "ARC"; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); return 0; }
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
76
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < (ll)(n); ++i) #define MOD 1000000007 using namespace std; using ll = long long; int main() { string s; cin >> s; if (s == "ABC") s = "ARC"; cout << s << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < (ll)(n); ++i) #define MOD 1000000007 using namespace std; using ll = long long; int main() { string s; cin >> s; if (s == "ABC") s = "ARC"; else s = "ABC"; cout << s << endl; return 0; }
[["+", 0, 14, 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], ["+", 75, 76, 0, 1, 0, 11, 12, 5, 0, 62], ["+", 75, 76, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 8, 9, 0, 57, 75, 76, 0, 1, 0, 35]]
1
59
# ABC が開催された次の週には ARC が開催され、ARC が行われた次の週には ABC が開催 # 先週開催されたコンテストを表す文字列Sが与えられる # 制約: S は ABC または ARC # S = 'ABC' if S == 'ABC': print('ARC') else: print('ABC')
# ABC が開催された次の週には ARC が開催され、ARC が行われた次の週には ABC が開催 # 先週開催されたコンテストを表す文字列Sが与えられる # 制約: S は ABC または ARC # S = 'ABC' S = input() if S == 'ABC': print('ARC') else: print('ABC')
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
25
#include <stdio.h> #include <string.h> int main() { char *s; scanf("%s", s); int a = strcmp(s, "ABC"); if (a == 0) puts("ARC"); else puts("ABC"); return 0; }
#include <stdio.h> #include <string.h> int main() { char s[10]; scanf("%s", s); int a = strcmp(s, "ABC"); if (a == 0) puts("ARC"); else puts("ABC"); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 84, 0, 48], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 0, 70], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 0, 73]]
0
59
s = input() if s is "ARC": print("ABC") else: print("ARC")
s = input() if s == "ARC": print("ABC") else: print("ARC")
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 709], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60]]
5
26
#include <algorithm> #include <assert.h> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> ...
#include <algorithm> #include <assert.h> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
315
#include <stdio.h> #include <string.h> int main() { char S[4]; scanf("%s", S); if (strcmp(S, "ABC") == 0) { printf("%s", "ARC"); } else if (strcmp(S, "ABC") == 0) { printf("%s", "ARC"); } return 0; }
#include <stdio.h> #include <string.h> int main() { char S[4]; scanf("%s", S); if (strcmp(S, "ARC") == 0) { printf("%s", "ABC"); } else if (strcmp(S, "ABC") == 0) { printf("%s", "ARC"); } return 0; }
[["-", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
81
a = str(input()) if a=="ABC": print("AGC") elif a=="AGC": print("ABC")
a = str(input()) if a=="ABC": print("ARC") elif a=="ARC": print("ABC")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 57, 75, 665, 15, 666, 0, 557, 0, 6], ["+", 0, 57, 75, 665, 15, 666, 0, 557, 0, 6]]
5
34
S=input() if S[1]==B: print('ARC') else: print('ABC')
S=input() if S[1]=='B': print('ARC') else: print('ABC')
[["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 654], ["+", 0, 656, 0, 57, 15, 666, 0, 557, 0, 655]]
5
27