Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
9 values
p03086
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; long cnt = 0, tmp = 0, ans = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'C' || s[i] == 'G') { tmp++; } else { cnt = max(tmp, cnt); tmp = 0; } } cout << cnt << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; long cnt = 0, tmp = 0, ans = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'C' || s[i] == 'G') { tmp++; cnt = max(tmp, cnt); } else { tmp = 0; } } cout << cnt << endl; }
[ "control_flow.branch.else.add" ]
900,317
900,318
u053429210
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios_base::sync_with_stdio(false); string s; cin >> s; int c[15]; for (int k = 0; k < 15; k++) { c[k] = 0; } int j = 0; int e; for (int i = 0; i < s.length(); i++) { if ((s[i] == 'A' || s[i] == 'G' || s[i] == 'T' || s[i] == 'C') && (s[i + 1] == 'A' || s[i + 1] == 'G' || s[i + 1] == 'T' || s[i + 1] == 'C')) { c[j] = c[j] + 1; } else { j++; } if ((s[i] == 'A' || s[i] == 'G' || s[i] == 'T' || s[i] == 'C') && (!(s[i + 1] == 'A' || s[i + 1] == 'G' || s[i + 1] == 'T' || s[i + 1] == 'C'))) { e = 1; } } sort(c, c + 15); if (c[14] != 0 && c[14] >= e) { cout << c[14] + 1; } else if (c[14] < e) { cout << e; } else { cout << 0; } }
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios_base::sync_with_stdio(false); string s; cin >> s; int c[15]; for (int k = 0; k < 15; k++) { c[k] = 0; } int j = 0; int e = 0; for (int i = 0; i < s.length(); i++) { if ((s[i] == 'A' || s[i] == 'G' || s[i] == 'T' || s[i] == 'C') && (s[i + 1] == 'A' || s[i + 1] == 'G' || s[i + 1] == 'T' || s[i + 1] == 'C')) { c[j] = c[j] + 1; } else { j++; } if ((s[i] == 'A' || s[i] == 'G' || s[i] == 'T' || s[i] == 'C') && (!(s[i + 1] == 'A' || s[i + 1] == 'G' || s[i + 1] == 'T' || s[i + 1] == 'C'))) { e = 1; } } sort(c, c + 15); if (c[14] != 0 && c[14] >= e) { cout << c[14] + 1; } else if (c[14] < e) { cout << e; } else { cout << 0; } }
[ "variable_declaration.value.change" ]
900,319
900,320
u979944294
cpp
p03086
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; #define fi first #define se second #define pb push_back #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define H_MAX 50 #define W_MAX 50 int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; int H, W; namespace patch { template <typename T> std::string to_string(const T &n) { std::ostringstream stm; stm << n; return stm.str(); } } // namespace patch int main() { string s; cin >> s; int count = 0; int max = 0; rep(i, s.size()) { rep(j, s.size()) { if (i >= j) continue; int t = i; while (t < j) { if (s[t] == 'A' || s[t] == 'C' || s[t] == 'G' || s[t] == 'T') { count = count + 1; max = max > count ? max : count; } else { count = 0; } t++; } count = 0; } } cout << max << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; #define fi first #define se second #define pb push_back #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define H_MAX 50 #define W_MAX 50 int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; int H, W; namespace patch { template <typename T> std::string to_string(const T &n) { std::ostringstream stm; stm << n; return stm.str(); } } // namespace patch int main() { string s; cin >> s; int count = 0; int max = 0; rep(i, s.size()) { rep(j, s.size()) { if (i > j) continue; int t = i; while (t <= j) { if (s[t] == 'A' || s[t] == 'C' || s[t] == 'G' || s[t] == 'T') { count = count + 1; max = max > count ? max : count; } else { count = 0; } t++; } count = 0; } } cout << max << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.loop.condition.change" ]
900,323
900,324
u808943968
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int N = S.size(); vector<int> A(N); for (int i = 0; i < N; i++) { int sum = 0; for (int j = i; j < N; j++) { char c = S.at(j); if (c == 'A' || c == 'C' || c == 'G' || c == 'T') sum++; else break; } sum = A.at(i); } int Max = A.at(0); for (int i = 1; i < N; i++) if (Max <= A.at(i)) Max = A.at(i); cout << Max << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int N = S.size(); vector<int> A(N); for (int i = 0; i < N; i++) { int sum = 0; for (int j = i; j < N; j++) { char c = S.at(j); if (c == 'A' || c == 'C' || c == 'G' || c == 'T') sum++; else break; } A.at(i) = sum; } int Max = A.at(0); for (int i = 1; i < N; i++) if (Max <= A.at(i)) Max = A.at(i); cout << Max << endl; return 0; }
[ "assignment.change" ]
900,329
900,330
u101018317
cpp
p03086
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdlib> #include <map> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { string s; cin >> s; int ans = 0; int tmp = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') ++tmp; else { ans = max(ans, tmp); tmp = 0; } } cout << ans << endl; }
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdlib> #include <map> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { string s; cin >> s; int ans = 0; int tmp = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { ++tmp; ans = max(ans, tmp); } else tmp = 0; } cout << ans << endl; }
[ "control_flow.branch.else.add" ]
900,347
900,348
u557934154
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int tmp = 0, ans = 0; for (int i = 0; i < S.size(); ++i) { int j = i; while (j < S.size()) { if (S[j] == 'A' || S[j] == 'C' || S[j] == 'G' || S[j] == 'T') { tmp++; } else { ans = max(ans, tmp); tmp = 0; break; } ++j; } ans = max(ans, tmp); } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int tmp = 0, ans = 0; for (int i = 0; i < S.size(); ++i) { int j = i; int tmp = 0; while (j < S.size()) { if (S[j] == 'A' || S[j] == 'C' || S[j] == 'G' || S[j] == 'T') { tmp++; } else { ans = max(ans, tmp); tmp = 0; break; } ++j; } ans = max(ans, tmp); } cout << ans << endl; }
[ "variable_declaration.add" ]
900,355
900,356
u883725898
cpp
p03086
#include <algorithm> #include <cmath> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define mp(a, b) make_pair((a), (b)) #define bs(n) ((ull)1 << (ull)n) using namespace std; typedef long long ll; typedef unsigned long long ull; constexpr ll inf = INT64_MAX / 4; constexpr double pi = asin(1) * 2; constexpr ll mod = 1000000007; constexpr double eps = 0.000000001; bool ok(string s) { for (auto &e : s) { bool t = false; for (auto &f : "ACGT") if (e == f) t = true; if (!t) return false; } return true; } int main() { string s; cin >> s; int r = 0; for (int i = 0; i < s.length(); i++) for (int j = 0; i + j < s.length(); j++) if (ok(s.substr(i, j))) r = max(r, j); cout << r << endl; }
#include <algorithm> #include <cmath> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define mp(a, b) make_pair((a), (b)) #define bs(n) ((ull)1 << (ull)n) using namespace std; typedef long long ll; typedef unsigned long long ull; constexpr ll inf = INT64_MAX / 4; constexpr double pi = asin(1) * 2; constexpr ll mod = 1000000007; constexpr double eps = 0.000000001; bool ok(string s) { for (auto &e : s) { bool t = false; for (auto &f : "ACGT") if (e == f) t = true; if (!t) return false; } return true; } int main() { string s; cin >> s; int r = 0; for (int i = 0; i < s.length(); i++) for (int j = 0; i + j <= s.length(); j++) if (ok(s.substr(i, j))) r = max(r, j); cout << r << endl; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
900,359
900,360
u751537640
cpp
p03086
#include <algorithm> #include <cmath> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define mp(a, b) make_pair((a), (b)) #define bs(n) ((ull)1 << (ull)n) using namespace std; typedef long long ll; typedef unsigned long long ull; constexpr ll inf = INT64_MAX / 4; constexpr double pi = asin(1) * 2; constexpr ll mod = 1000000007; constexpr double eps = 0.000000001; bool ok(string s) { for (auto &e : s) { bool t = false; for (auto &f : "ACGT") if (e == f) t = true; if (!t) return false; } return true; } int main() { string s; cin >> s; int r = 0; for (int i = 0; i < s.length(); i++) for (int j = 1; i + j < s.length(); j++) if (ok(s.substr(0, j))) r = max(r, j); cout << r << endl; }
#include <algorithm> #include <cmath> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define mp(a, b) make_pair((a), (b)) #define bs(n) ((ull)1 << (ull)n) using namespace std; typedef long long ll; typedef unsigned long long ull; constexpr ll inf = INT64_MAX / 4; constexpr double pi = asin(1) * 2; constexpr ll mod = 1000000007; constexpr double eps = 0.000000001; bool ok(string s) { for (auto &e : s) { bool t = false; for (auto &f : "ACGT") if (e == f) t = true; if (!t) return false; } return true; } int main() { string s; cin >> s; int r = 0; for (int i = 0; i < s.length(); i++) for (int j = 0; i + j <= s.length(); j++) if (ok(s.substr(i, j))) r = max(r, j); cout << r << endl; }
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "identifier.replace.add", "literal.replace.remove",...
900,362
900,360
u751537640
cpp
p03086
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; int main() { string s; cin >> s; int karians = 0; int ans = 0; rep(i, s.size()) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { karians++; } else { ans = max(ans, karians); karians = 0; } } cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; int main() { string s; cin >> s; int karians = 0; int ans = 0; rep(i, s.size() + 1) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { karians++; } else { ans = max(ans, karians); karians = 0; } } cout << ans << endl; }
[ "expression.operation.binary.add" ]
900,363
900,364
u314917898
cpp
p03086
#include "bits/stdc++.h" using namespace std; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < S.size(); ++i) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { int j = i; while (S[j] == 'A' || S[j] == 'C' || S[j] == 'G' || S[j] == 'T') j++; if (j - i + 1 > ans) ans = j - i + 1; } } cout << ans << endl; return 0; }
#include "bits/stdc++.h" using namespace std; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < S.size(); ++i) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { int j = i; while (S[j] == 'A' || S[j] == 'C' || S[j] == 'G' || S[j] == 'T') j++; if (j - i > ans) ans = j - i; } } cout << ans << endl; return 0; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,369
900,370
u906839513
cpp
p03086
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define fi first #define se second #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i < (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define all(x) (x).begin(), (x).end() #define maxs(x, y) (x = max(x, y)) #define mins(x, y) (x = min(x, y)) #define pb push_back #define sz(x) (int)(x).size() #define PQ(T) priority_queue<T, v(T), greater<T>> using namespace std; typedef long long ll; typedef unsigned uint; typedef unsigned long long ull; typedef pair<int, int> P; const ll LINF = 1001002003004005006ll; const int INF = 1001001001; const int mod = 1000000007; int main() { string s; cin >> s; int ans = 0; int now = 0; rep(i, s.size()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { ++now; } else { ans = max(ans, now); now = 0; } } cout << ans << endl; return 0; }
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define fi first #define se second #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i < (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define all(x) (x).begin(), (x).end() #define maxs(x, y) (x = max(x, y)) #define mins(x, y) (x = min(x, y)) #define pb push_back #define sz(x) (int)(x).size() #define PQ(T) priority_queue<T, v(T), greater<T>> using namespace std; typedef long long ll; typedef unsigned uint; typedef unsigned long long ull; typedef pair<int, int> P; const ll LINF = 1001002003004005006ll; const int INF = 1001001001; const int mod = 1000000007; int main() { string s; cin >> s; int ans = 0; int now = 0; rep(i, s.size()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { ++now; ans = max(ans, now); } else { now = 0; } } cout << ans << endl; return 0; }
[ "control_flow.branch.else.add" ]
900,373
900,374
u655777757
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 0; int count = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) == 'A' || s.at(i) == 'T' || s.at(i) == 'G' || s.at(i) == 'C') { count++; } else { if (count > ans) { ans = count; } count = 0; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 0; int count = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) == 'A' || s.at(i) == 'T' || s.at(i) == 'G' || s.at(i) == 'C') { count++; } else { if (count > ans) { ans = count; } count = 0; } } cout << max(ans, count) << endl; }
[ "call.add", "call.arguments.add" ]
900,375
900,376
u756208532
cpp
p03086
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cmath> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; const ll inf = (ll)1e9; const ll mod = (ll)1e9 + 7; #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define print(s) cout << s; #define println(s) cout << s << endl; #define printd(s, f) cout << fixed << setprecision(f) << s << endl; int main() { string s; cin >> s; int c = 0; int res = 0; for (int i = 0; i < s.length(); i++) { string x = s.substr(i, 1); if (x == "A" || x == "C" || x == "G" || x == "T") { c++; } else { res = max(res, c); } } res = max(res, c); println(res); }
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cmath> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; const ll inf = (ll)1e9; const ll mod = (ll)1e9 + 7; #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define print(s) cout << s; #define println(s) cout << s << endl; #define printd(s, f) cout << fixed << setprecision(f) << s << endl; int main() { string s; cin >> s; int c = 0; int res = 0; for (int i = 0; i < s.length(); i++) { string x = s.substr(i, 1); if (x == "A" || x == "C" || x == "G" || x == "T") { c++; } else { res = max(res, c); c = 0; } } res = max(res, c); println(res); }
[ "assignment.add" ]
900,377
900,378
u366125700
cpp
p03086
#include <iostream> using namespace std; int main() { string str; cin >> str; int ans; int cnt; bool flag = true; for (int i = 0; i < str.size(); i++) { if (flag) { if (str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] == 'T') { cnt++; } else { flag = false; if (ans < cnt) { ans = cnt; } } } else { if (str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] == 'T') { flag = true; cnt = 1; } } if (str.size() - 1 == i) { if (ans < cnt) { ans = cnt; } } } cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main() { string str; cin >> str; int ans = 0; int cnt = 0; bool flag = true; for (int i = 0; i < str.size(); i++) { if (flag) { if (str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] == 'T') { cnt++; } else { flag = false; if (ans < cnt) { ans = cnt; } } } else { if (str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] == 'T') { flag = true; cnt = 1; } } if (str.size() - 1 == i) { if (ans < cnt) { ans = cnt; } } } cout << ans << endl; return 0; }
[ "variable_declaration.value.change" ]
900,381
900,382
u806657856
cpp
p03086
#include <cmath> #include <iostream> #include <stdio.h> #include <string> using namespace std; int main(void) { std::string s = ""; std::string ATGC = "ATGC"; int flag[10] = {}; cin >> s; for (int i = 0; i < sizeof(s); i++) { for (int j = 0; j < 4; j++) { if (s[i] == ATGC[j]) { flag[i] = 1; break; } flag[i] = 0; } } int ans = 0, current = 0; for (int k = 0; k < 10; k++) { if (flag[k] == 1) { current++; ans = max(current, ans); } else { current = 0; } } cout << ans << endl; return 0; }
#include <cmath> #include <iostream> #include <stdio.h> #include <string> using namespace std; int main(void) { std::string s = ""; std::string ATGC = "ATGC"; int flag[10] = {}; cin >> s; for (int i = 0; i < s.size(); i++) { for (int j = 0; j < 4; j++) { if (s[i] == ATGC[j]) { flag[i] = 1; break; } flag[i] = 0; } } int ans = 0, current = 0; for (int k = 0; k < 10; k++) { if (flag[k] == 1) { current++; ans = max(current, ans); } else { current = 0; } } cout << ans << endl; return 0; }
[ "control_flow.loop.for.condition.change", "call.add" ]
900,387
900,388
u244416763
cpp
p03086
#include <bits/stdc++.h> using namespace std; #define __ << " " << #define ___ << " " #define bash push_back #define ALL(x) x.begin(), x.end() //#define int long long struct IoSetup { IoSetup() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(12); cerr << fixed << setprecision(12); } } IoSetup; typedef long long ll; typedef pair<int, int> pii; static constexpr const signed int INF = 0x3f3f3f3f; static constexpr const signed long long LINF = 0x3f3f3f3f3f3f3f3fLL; static constexpr const signed int SMOD = 1000000007; static constexpr const signed int NMOD = 998244353; static constexpr const signed int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; static constexpr const signed int dy[] = {0, -1, 0, 1, -1, 1, -1, 1}; inline bool inside(int x, int y, int w, int h) { return (x >= 0 && y >= 0 && x < w && y < h); } template <class T> bool chmax(T &a, const T &b) { return (a = max(a, b)) == b; } template <class T> bool chmin(T &a, const T &b) { return (a = min(a, b)) == b; } inline int qp(int a, ll b, int mo) { int ans = 1; do { if (b & 1) ans = 1ll * ans * a % mo; a = 1ll * a * a % mo; } while (b >>= 1); return ans; } string s; signed main() { cin >> s; int maxi = 0; string a = "ACGT"; for (int i = 0; i < s.size(); i++) { for (int j = i + 1; j < s.size(); j++) { bool f = true; for (int k = i; k <= j; k++) if (a.find(s[k]) == string::npos) f = false; if (f) chmax(maxi, j - i + 1); } } cout << maxi << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define __ << " " << #define ___ << " " #define bash push_back #define ALL(x) x.begin(), x.end() //#define int long long struct IoSetup { IoSetup() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(12); cerr << fixed << setprecision(12); } } IoSetup; typedef long long ll; typedef pair<int, int> pii; static constexpr const signed int INF = 0x3f3f3f3f; static constexpr const signed long long LINF = 0x3f3f3f3f3f3f3f3fLL; static constexpr const signed int SMOD = 1000000007; static constexpr const signed int NMOD = 998244353; static constexpr const signed int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; static constexpr const signed int dy[] = {0, -1, 0, 1, -1, 1, -1, 1}; inline bool inside(int x, int y, int w, int h) { return (x >= 0 && y >= 0 && x < w && y < h); } template <class T> bool chmax(T &a, const T &b) { return (a = max(a, b)) == b; } template <class T> bool chmin(T &a, const T &b) { return (a = min(a, b)) == b; } inline int qp(int a, ll b, int mo) { int ans = 1; do { if (b & 1) ans = 1ll * ans * a % mo; a = 1ll * a * a % mo; } while (b >>= 1); return ans; } string s; signed main() { cin >> s; int maxi = 0; string a = "ACGT"; for (int i = 0; i < s.size(); i++) { for (int j = i; j < s.size(); j++) { bool f = true; for (int k = i; k <= j; k++) if (a.find(s[k]) == string::npos) f = false; if (f) chmax(maxi, j - i + 1); } } cout << maxi << endl; return 0; }
[ "control_flow.loop.for.initializer.change", "expression.operation.binary.remove" ]
900,389
900,390
u678146855
cpp
p03086
#include <bits/stdc++.h> using namespace std; #define FOR(i, n) for (int i = 0; i < n; i++) #define why(n, x) \ int n; \ while (cin >> n, n != x) #define iFOR(i, x, n) for (int i = x; i < n; i++) #define unless(flg) if (!(flg)) #define read cin << #define echo cout << #define fin << '\n' #define __ << " " << #define ___ << " " #define bash push_back #define ALL(x) x.begin(), x.end() #define SWAP(a, b) ((a != b) && (a += b, b = a - b, a -= b)) #define cinf(n, x) \ for (int UNCH = 0; UNCH < (n); UNCH++) \ cin >> x[UNCH]; #define fcin(n, x) \ for (int UNCH = 1; UNCH <= (n); UNCH++) \ cin >> x[UNCH]; #define memmin(x) memset((x), -1, sizeof((x))) #define memzer(x) memset((x), 0, sizeof((x))) #define meminf(x) memset((x), 0x3f, sizeof((x))) //#define int long long typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vit; typedef map<string, int> mstit; typedef vector<pii> vpi; typedef greater<pii> gpi; typedef priority_queue<pii, vpi, gpi> dijk; static const signed int INF = 0x3f3f3f3f; static const signed long long LINF = 0x3f3f3f3f3f3f3f3fLL; static const signed int SMOD = 1000000007; static const signed int NMOD = 1000000009; static const signed int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; static const signed int dy[] = {0, -1, 0, 1, -1, 1, -1, 1}; bool inside(int x, int y, int w, int h) { return (x >= 0 && y >= 0 && x < w && y < h); } template <class T> T abs(T &x) { return x < 0 ? -x : x; } template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } int qp(int a, ll b, int mo) { int ans = 1; do { if (b & 1) ans = 1ll * ans * a % mo; a = 1ll * a * a % mo; } while (b >>= 1); return ans; } int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } void solve() { string s; int ans = 0; cin >> s; FOR(i, s.length()) { iFOR(j, i + 1, s.length()) { bool hoge = true; iFOR(k, i, j + 1) { if (s[k] == 'A' || s[k] == 'C' || s[k] == 'G' || s[k] == 'T') { } else { hoge = false; } } if (hoge) { chmax(ans, j - i + 1); } } } cout << ans fin; } struct xyz { xyz() { cin.tie(0), ios::sync_with_stdio(false); cout << fixed << setprecision(12); }; } xyzzy; signed main() { solve(); return 0; }
#include <bits/stdc++.h> using namespace std; #define FOR(i, n) for (int i = 0; i < n; i++) #define why(n, x) \ int n; \ while (cin >> n, n != x) #define iFOR(i, x, n) for (int i = x; i < n; i++) #define unless(flg) if (!(flg)) #define read cin << #define echo cout << #define fin << '\n' #define __ << " " << #define ___ << " " #define bash push_back #define ALL(x) x.begin(), x.end() #define SWAP(a, b) ((a != b) && (a += b, b = a - b, a -= b)) #define cinf(n, x) \ for (int UNCH = 0; UNCH < (n); UNCH++) \ cin >> x[UNCH]; #define fcin(n, x) \ for (int UNCH = 1; UNCH <= (n); UNCH++) \ cin >> x[UNCH]; #define memmin(x) memset((x), -1, sizeof((x))) #define memzer(x) memset((x), 0, sizeof((x))) #define meminf(x) memset((x), 0x3f, sizeof((x))) //#define int long long typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vit; typedef map<string, int> mstit; typedef vector<pii> vpi; typedef greater<pii> gpi; typedef priority_queue<pii, vpi, gpi> dijk; static const signed int INF = 0x3f3f3f3f; static const signed long long LINF = 0x3f3f3f3f3f3f3f3fLL; static const signed int SMOD = 1000000007; static const signed int NMOD = 1000000009; static const signed int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; static const signed int dy[] = {0, -1, 0, 1, -1, 1, -1, 1}; bool inside(int x, int y, int w, int h) { return (x >= 0 && y >= 0 && x < w && y < h); } template <class T> T abs(T &x) { return x < 0 ? -x : x; } template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } int qp(int a, ll b, int mo) { int ans = 1; do { if (b & 1) ans = 1ll * ans * a % mo; a = 1ll * a * a % mo; } while (b >>= 1); return ans; } int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } void solve() { string s; int ans = 0; cin >> s; FOR(i, s.length()) { iFOR(j, i, s.length()) { bool hoge = true; iFOR(k, i, j + 1) { if (s[k] == 'A' || s[k] == 'C' || s[k] == 'G' || s[k] == 'T') { } else { hoge = false; } } if (hoge) { chmax(ans, j - i + 1); } } } cout << ans fin; } struct xyz { xyz() { cin.tie(0), ios::sync_with_stdio(false); cout << fixed << setprecision(12); }; } xyzzy; signed main() { solve(); return 0; }
[ "expression.operation.binary.remove" ]
900,391
900,392
u678146855
cpp
p03086
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <set> #include <string> #include <vector> //#include<bits/stdc++.h> #define int long long #define mod 1000000007 #define for0(i, n) for (int i = 0; i < (n); i++) #define for1(i, n) for (int i = 1; i <= (n); i++) #define mp make_pair #define all(x) x.begin(), x.end() using namespace std; signed main() { string s; int ans = 0, cnt = 0; cin >> s; for (char ch : s) if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') cnt++; else ans = max(ans, cnt); ans = max(ans, cnt); cout << ans << endl; }
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <set> #include <string> #include <vector> //#include<bits/stdc++.h> #define int long long #define mod 1000000007 #define for0(i, n) for (int i = 0; i < (n); i++) #define for1(i, n) for (int i = 1; i <= (n); i++) #define mp make_pair #define all(x) x.begin(), x.end() using namespace std; signed main() { string s; int ans = 0, cnt = 0; cin >> s; for (char ch : s) if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') cnt++; else { ans = max(ans, cnt); cnt = 0; } ans = max(ans, cnt); cout << ans << endl; }
[ "assignment.add" ]
900,398
900,399
u141968173
cpp
p03086
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, s, n) for (int i = (s); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() typedef long long int ll; typedef pair<int, int> P; const long long INF = 3e18 + 12; const int inf = 1e9; int main() { string s; cin >> s; int n = s.length(); int ans = 0; rep(i, n) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { int a = 1; rep(j, n - i) { if (s[i + j] == 'A' || s[i + j] == 'C' || s[i + j] == 'G' || s[i + j] == 'T') { a++; ans = max(ans, a); continue; } break; } } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, s, n) for (int i = (s); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() typedef long long int ll; typedef pair<int, int> P; const long long INF = 3e18 + 12; const int inf = 1e9; int main() { string s; cin >> s; int n = s.length(); int ans = 0; rep(i, n) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { int a = 0; rep(j, n - i) { if (s[i + j] == 'A' || s[i + j] == 'C' || s[i + j] == 'G' || s[i + j] == 'T') { a++; ans = max(ans, a); continue; } break; } } } cout << ans << endl; return 0; }
[ "literal.number.change", "variable_declaration.value.change" ]
900,410
900,411
u099184991
cpp
p03086
#include <bits/stdc++.h> using namespace std; #define int long long using P = pair<int, int>; const int INF = 1e18; #define put(n) cout << (n) << endl #define rep(i, N) for (int(i) = 0; (i) < (N); ++(i)) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define pb(n) push_back(n) signed main() { string S; cin >> S; set<char> st({'A', 'G', 'C', 'T'}); int ans = 0; rep(i, S.size()) { rep(j, S.size() - i) { string t = S.substr(i, j); bool ok = true; for (char c : t) { if (st.count(c) == 0) ok = false; } if (ok) ans = max(ans, (int)t.size()); } } put(ans); }
#include <bits/stdc++.h> using namespace std; #define int long long using P = pair<int, int>; const int INF = 1e18; #define put(n) cout << (n) << endl #define rep(i, N) for (int(i) = 0; (i) < (N); ++(i)) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define pb(n) push_back(n) signed main() { string S; cin >> S; set<char> st({'A', 'G', 'C', 'T'}); int ans = 0; rep(i, S.size()) { rep(j, S.size() + 1 - i) { string t = S.substr(i, j); bool ok = true; for (char c : t) { if (st.count(c) == 0) ok = false; } if (ok) ans = max(ans, (int)t.size()); } } put(ans); }
[ "expression.operation.binary.add" ]
900,412
900,413
u031178961
cpp
p03086
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <string> #include <vector> typedef long long ll; using namespace std; int main(void) { string s; cin >> s; int ans = 0; for (int i = 0; i < s.length(); i++) { for (int j = 1; j < s.length() - i; j++) { string a = s.substr(i, j); bool acgt = true; for (int k = 0; k < a.length(); k++) { if (a[k] == 'A' || a[k] == 'C' || a[k] == 'G' || a[k] == 'T') ; else acgt = false; } if (acgt) { ans = max(ans, (int)a.length()); } } } cout << ans << endl; return 0; }
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <string> #include <vector> typedef long long ll; using namespace std; int main(void) { string s; cin >> s; int ans = 0; for (int i = 0; i < s.length(); i++) { for (int j = 1; j <= s.length() - i; j++) { string a = s.substr(i, j); bool acgt = true; for (int k = 0; k < a.length(); k++) { if (a[k] == 'A' || a[k] == 'C' || a[k] == 'G' || a[k] == 'T') ; else acgt = false; } if (acgt) { ans = max(ans, (int)a.length()); } } } cout << ans << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
900,416
900,417
u112240752
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 0; int max1 = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'C' || s[i] == 'G') ans++; else { max1 = max(ans, max1); ans = 0; } } cout << max1 << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 0; int max1 = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'C' || s[i] == 'G') { ans++; max1 = max(ans, max1); } else { ans = 0; } } cout << max1 << endl; }
[ "control_flow.branch.else.add" ]
900,418
900,419
u459105164
cpp
p03086
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define rep2(i, s, n) for (int i = s; i < n; ++i) #define all(a) a.begin(), a.end() using namespace std; using ll = long long; using P = pair<int, int>; int main() { string s; cin >> s; int ans = 0; rep(i, s.size()) rep2(j, 1, s.size() - i) { string ns = s.substr(i, j); bool ok = true; for (char c : ns) if (c != 'A' && c != 'C' && c != 'G' && c != 'T') ok = false; if (ok) ans = max(ans, j); } cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define rep2(i, s, n) for (int i = s; i < n; ++i) #define all(a) a.begin(), a.end() using namespace std; using ll = long long; using P = pair<int, int>; int main() { string s; cin >> s; int ans = 0; rep(i, s.size()) rep2(j, 1, s.size() - i + 1) { string ns = s.substr(i, j); bool ok = true; for (char c : ns) if (c != 'A' && c != 'C' && c != 'G' && c != 'T') ok = false; if (ok) ans = max(ans, j); } cout << ans << endl; }
[ "expression.operation.binary.add" ]
900,424
900,425
u853721692
cpp
p03086
#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() { ios::sync_with_stdio(false); cin.tie(0); int count = 0, ans = 0; char c; while (cin >> c) { if (c == 'A' || c == 'C' || c == 'G' || c == 'T') { ++count; } else { ans = max(ans, count); count = 0; } } cout << ans; }
#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() { ios::sync_with_stdio(false); cin.tie(0); int count = 0, ans = 0; char c; while (cin >> c) { if (c == 'A' || c == 'C' || c == 'G' || c == 'T') { ++count; } else { ans = max(ans, count); count = 0; } } cout << max(ans, count); }
[ "call.add", "call.arguments.add" ]
900,429
900,430
u505466816
cpp
p03086
#include <bits/stdc++.h> using namespace std; using lint = long long; const lint mod = 998244353; #define all(x) (x).begin(), (x).end() #define bitcount(n) __builtin_popcountl((lint)(n)) #define fcout cout << fixed << setprecision(15) #define highest(x) (63 - __builtin_clzl(x)) template <class T> inline void YES(T condition) { if (condition) cout << "YES" << endl; else cout << "NO" << endl; } template <class T> inline void Yes(T condition) { if (condition) cout << "Yes" << endl; else cout << "No" << endl; } template <class T = string, class U = char> int character_count(T text, U character) { int ans = 0; for (U i : text) { ans += (i == character); } return ans; } lint power(lint base, lint exponent, lint module) { if (exponent % 2) { return power(base, exponent - 1, module) * base % module; } else if (exponent) { lint root_ans = power(base, exponent / 2, module); return root_ans * root_ans % module; } else { return 1; } } struct position { int y, x; }; position mv[4] = { {0, -1}, {1, 0}, {0, 1}, {-1, 0}}; // double euclidean(position first, position second){ return // sqrt((second.x - first.x) * (second.x - first.x) + (second.y - // first.y) * (second.y - first.y)); } template <class T, class U> string to_string(pair<T, U> x) { return to_string(x.first) + "," + to_string(x.second); } string to_string(string x) { return x; } template <class itr> void array_output(itr start, itr goal) { string ans; for (auto i = start; i != goal; i++) ans += to_string(*i) + " "; if (!ans.empty()) ans.pop_back(); cout << ans << endl; } template <class itr> void cins(itr first, itr last) { for (auto i = first; i != last; i++) { cin >> (*i); } } template <class T> T gcd_calc(T a, T b) { if (b) { return gcd_calc(b, a % b); } else { return a; } } template <class T> T gcd(T a, T b) { if (a < b) swap(a, b); return gcd_calc(a, b); } template <class T> T lcm(T a, T b) { return a / gcd(a, b) * b; } struct combination { vector<lint> fact, inv; combination(int sz) : fact(sz + 1), inv(sz + 1) { fact[0] = 1; for (int i = 1; i <= sz; i++) { fact[i] = fact[i - 1] * i % mod; } inv[sz] = power(fact[sz], mod - 2, mod); for (int i = sz - 1; i >= 0; i--) { inv[i] = inv[i + 1] * (i + 1) % mod; } } lint C(int p, int q) const { if (q < 0 || p < q) return 0; return (fact[p] * inv[q] % mod * inv[p - q] % mod); } }; template <class itr> bool next_sequence(itr first, itr last, int max_bound) { itr now = last; while (now != first) { now--; (*now)++; if ((*now) == max_bound) { (*now) = 0; } else { return true; } } return false; } inline int at(int x, int k) { return (x >> k) & 1; } random_device rnd; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < S.size(); i++) { for (int j = i + 1; j < S.size(); j++) { string sub = S.substr(i, j - i); ans = max(ans, (character_count(sub, 'A') + character_count(sub, 'T') + character_count(sub, 'C') + character_count(sub, 'G') == j - i) * (j - i)); } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; using lint = long long; const lint mod = 998244353; #define all(x) (x).begin(), (x).end() #define bitcount(n) __builtin_popcountl((lint)(n)) #define fcout cout << fixed << setprecision(15) #define highest(x) (63 - __builtin_clzl(x)) template <class T> inline void YES(T condition) { if (condition) cout << "YES" << endl; else cout << "NO" << endl; } template <class T> inline void Yes(T condition) { if (condition) cout << "Yes" << endl; else cout << "No" << endl; } template <class T = string, class U = char> int character_count(T text, U character) { int ans = 0; for (U i : text) { ans += (i == character); } return ans; } lint power(lint base, lint exponent, lint module) { if (exponent % 2) { return power(base, exponent - 1, module) * base % module; } else if (exponent) { lint root_ans = power(base, exponent / 2, module); return root_ans * root_ans % module; } else { return 1; } } struct position { int y, x; }; position mv[4] = { {0, -1}, {1, 0}, {0, 1}, {-1, 0}}; // double euclidean(position first, position second){ return // sqrt((second.x - first.x) * (second.x - first.x) + (second.y - // first.y) * (second.y - first.y)); } template <class T, class U> string to_string(pair<T, U> x) { return to_string(x.first) + "," + to_string(x.second); } string to_string(string x) { return x; } template <class itr> void array_output(itr start, itr goal) { string ans; for (auto i = start; i != goal; i++) ans += to_string(*i) + " "; if (!ans.empty()) ans.pop_back(); cout << ans << endl; } template <class itr> void cins(itr first, itr last) { for (auto i = first; i != last; i++) { cin >> (*i); } } template <class T> T gcd_calc(T a, T b) { if (b) { return gcd_calc(b, a % b); } else { return a; } } template <class T> T gcd(T a, T b) { if (a < b) swap(a, b); return gcd_calc(a, b); } template <class T> T lcm(T a, T b) { return a / gcd(a, b) * b; } struct combination { vector<lint> fact, inv; combination(int sz) : fact(sz + 1), inv(sz + 1) { fact[0] = 1; for (int i = 1; i <= sz; i++) { fact[i] = fact[i - 1] * i % mod; } inv[sz] = power(fact[sz], mod - 2, mod); for (int i = sz - 1; i >= 0; i--) { inv[i] = inv[i + 1] * (i + 1) % mod; } } lint C(int p, int q) const { if (q < 0 || p < q) return 0; return (fact[p] * inv[q] % mod * inv[p - q] % mod); } }; template <class itr> bool next_sequence(itr first, itr last, int max_bound) { itr now = last; while (now != first) { now--; (*now)++; if ((*now) == max_bound) { (*now) = 0; } else { return true; } } return false; } inline int at(int x, int k) { return (x >> k) & 1; } random_device rnd; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < S.size(); i++) { for (int j = i + 1; j <= S.size(); j++) { string sub = S.substr(i, j - i); ans = max(ans, (character_count(sub, 'A') + character_count(sub, 'T') + character_count(sub, 'C') + character_count(sub, 'G') == j - i) * (j - i)); } } cout << ans << endl; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
900,435
900,436
u115888500
cpp
p03086
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> using namespace std; int main() { string S; cin >> S; int max_length = 0; for (int i = 0; i < (int)S.size(); ++i) { if (S[i] != 'A' && S[i] != 'T' && S[i] != 'C' && S[i] != 'G') continue; int count = 0; for (int j = i + 1; j < (int)S.size(); ++j) { if (S[j] != 'A' && S[j] != 'T' && S[j] != 'C' && S[j] != 'G') break; ++count; } if (max_length < count) max_length = count; } cout << max_length << endl; }
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string> #include <vector> using namespace std; int main() { string S; cin >> S; int max_length = 0; for (int i = 0; i < (int)S.size(); ++i) { if (S[i] != 'A' && S[i] != 'T' && S[i] != 'C' && S[i] != 'G') continue; int count = 1; for (int j = i + 1; j < (int)S.size(); ++j) { if (S[j] != 'A' && S[j] != 'T' && S[j] != 'C' && S[j] != 'G') break; ++count; } if (max_length < count) max_length = count; } cout << max_length << endl; }
[ "literal.number.change", "variable_declaration.value.change" ]
900,441
900,442
u323542775
cpp
p03086
#include <bits/stdc++.h> using namespace std; #define long long long #define read cin >> #define echo cout << #define fin << endl #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) for (int i = (0); i < (n); ++i) // for debug macro bool global_debug_flag = false; #define DEBUG(val) \ if (global_debug_flag) \ cout << #val << " = " << val << endl int main() { string s; cin >> s; int len = s.size(); int ans = 0; FOR(i, 0, len - 1) { if (s[i] != 'A' && s[i] != 'G' && s[i] != 'C' && s[i] != 'T') { continue; } else { ans = max(ans, 1); FOR(j, i + 1, len) { DEBUG(i); DEBUG(j); if (s[j] == 'A' || s[j] == 'G' || s[j] == 'C' || s[j] == 'T') { ans = max(ans, j - i + 1); } else { break; } } } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; #define long long long #define read cin >> #define echo cout << #define fin << endl #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) for (int i = (0); i < (n); ++i) // for debug macro bool global_debug_flag = false; #define DEBUG(val) \ if (global_debug_flag) \ cout << #val << " = " << val << endl int main() { string s; cin >> s; int len = s.size(); int ans = 0; FOR(i, 0, len) { if (s[i] != 'A' && s[i] != 'G' && s[i] != 'C' && s[i] != 'T') { continue; } else { ans = max(ans, 1); FOR(j, i + 1, len) { DEBUG(i); DEBUG(j); if (s[j] == 'A' || s[j] == 'G' || s[j] == 'C' || s[j] == 'T') { ans = max(ans, j - i + 1); } else { break; } } } } cout << ans << endl; }
[ "expression.operation.binary.remove" ]
900,458
900,459
u947517859
cpp
p03086
#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() { string s; cin >> s; int ans = 0; rep(i, s.size()) { int count = 0; for (int j = i; j < s.size(); j++) { if (s.at(j) == 'A' || s.at(j) == 'C' || s.at(j) == 'G' || s.at(j) == 'T') count++; else ans = max(ans, count); } } cout << ans << endl; return 0; }
#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() { string s; cin >> s; int ans = 0; rep(i, s.size()) { int count = 0; for (int j = i; j < s.size(); j++) { if (s.at(j) == 'A' || s.at(j) == 'C' || s.at(j) == 'G' || s.at(j) == 'T') count++; else break; } ans = max(ans, count); } cout << ans << endl; return 0; }
[ "control_flow.break.add" ]
900,460
900,461
u615662061
cpp
p03086
// #define _CRT_SECURE_NO_WARNINGS // #define _USE_MATH_DEFINES // M_PI=3.1415... #include <algorithm> #include <bitset> // bitset<8> bs1(131uL); // 10000011 bs1[0]は1 01stringからビット集合生成可 #include <cctype> #include <climits> // A/Bを計算するときA==LLONG_MIN && B==-1のみ(1ull<<63)で代用 #include <cmath> #include <cstdio> #include <cstdlib> #include <functional> #include <iomanip> // 20桁出力 cout << setprecision(20) << double; #include <iostream> #include <locale> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long LL; typedef pair<LL, LL> P; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<LL> VL; typedef vector<VL> VVL; // VVL v(100,VL(100,0)); typedef vector<pair<LL, LL>> VP; typedef vector<string> VS; typedef map<int, int> MAPII; typedef multimap<int, char, greater<int>> MuMAPIC; typedef multimap<int, string, greater<int>> MuMIS; typedef pair<LL, pair<P, P>> PP; #define INF 999999999999999997 // 少し加算したらオーバーフローする #define MP make_pair #define FAST_IO \ cin.tie(0); \ ios::sync_with_stdio(false); #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define FORL(i, a, b) for (LL i = (a); i < (b); i++) #define FOR_REV(i, a, b) for (int i = (a); i >= (b); i--) #define foreach_it(type, it, c) \ for (type::iterator it = c.begin(), c_end = c.end(); it != c_end; ++it) #define FOR_ITR(d) \ for (auto itr = d.begin(), d_end = d.end(); itr != d_end; ++itr) // C++11 #define O(s) cout << s << endl; #define DUMP_VVI(b) \ if (dbgF) { \ FOR(i, 0, b.size()) { \ FOR(j, 0, b[i].size()) printf("%d ", b[i][j]); \ puts(""); \ } \ } #define D_OUT(str, value) \ if (dbgF) { \ cout << str << " : " << value << endl; \ } template <class T> T IN() { T d; cin >> d; return d; } LL gcd(LL a, LL b) { return (b > 0) ? gcd(b, a % b) : a; } // 最大公約数(Greatest Common Divisor) LL lcm(LL a, LL b) { return a / gcd(a, b) * b; } // 最小公倍数(Least Common Multiple) bool uruu(LL Y) { return (((Y % 4 == 0 && Y % 100 != 0) || Y % 400 == 0) ? true : false); } // うるう年判定 string Replace(string S, string from, string to) { auto p = S.find(from); while (p != string::npos) { S.replace(p, from.size(), to); p = S.find(from, p + to.size()); } return S; } // 桁和 LL Ketawa_s(string s) { LL a = 0; FOR(i, 0, s.length()) a += s[i] - '0'; return a; } //二項係数 nCk mod pを求める const LL MAX = 510000, p = 998244353; LL fac[MAX], finv[MAX], inv[MAX]; /* 前処理 */ void COM_init() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; FOR(i, 2, MAX) { fac[i] = fac[i - 1] * i % p; inv[i] = p - inv[p % i] * (p / i) % p; finv[i] = finv[i - 1] * inv[i] % p; } } /* 主処理 */ LL COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % p) % p; } int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; int dxx[8] = {0, 1, 1, 1, 0, -1, -1, -1}; int dyy[8] = {1, 1, 0, -1, -1, -1, 0, 1}; // ------------------------------------------------------------------------------- int main() { FAST_IO; bool dbgF = true; // for D_OUT(str, value) ... cout<< str <<" : "<< value <<endl; string S; cin >> S; LL ans = 0; FOR(i, 0, S.length()) { FOR(j, i + 1, S.length()) { string sub = S.substr(i, j - i); if (count(sub.begin(), sub.end(), 'A') + count(sub.begin(), sub.end(), 'C') + count(sub.begin(), sub.end(), 'G') + count(sub.begin(), sub.end(), 'T') == sub.length()) { ans = max(ans, (LL)sub.length()); } } } O(ans); return 0; }
// #define _CRT_SECURE_NO_WARNINGS // #define _USE_MATH_DEFINES // M_PI=3.1415... #include <algorithm> #include <bitset> // bitset<8> bs1(131uL); // 10000011 bs1[0]は1 01stringからビット集合生成可 #include <cctype> #include <climits> // A/Bを計算するときA==LLONG_MIN && B==-1のみ(1ull<<63)で代用 #include <cmath> #include <cstdio> #include <cstdlib> #include <functional> #include <iomanip> // 20桁出力 cout << setprecision(20) << double; #include <iostream> #include <locale> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long LL; typedef pair<LL, LL> P; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<LL> VL; typedef vector<VL> VVL; // VVL v(100,VL(100,0)); typedef vector<pair<LL, LL>> VP; typedef vector<string> VS; typedef map<int, int> MAPII; typedef multimap<int, char, greater<int>> MuMAPIC; typedef multimap<int, string, greater<int>> MuMIS; typedef pair<LL, pair<P, P>> PP; #define INF 999999999999999997 // 少し加算したらオーバーフローする #define MP make_pair #define FAST_IO \ cin.tie(0); \ ios::sync_with_stdio(false); #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define FORL(i, a, b) for (LL i = (a); i < (b); i++) #define FOR_REV(i, a, b) for (int i = (a); i >= (b); i--) #define foreach_it(type, it, c) \ for (type::iterator it = c.begin(), c_end = c.end(); it != c_end; ++it) #define FOR_ITR(d) \ for (auto itr = d.begin(), d_end = d.end(); itr != d_end; ++itr) // C++11 #define O(s) cout << s << endl; #define DUMP_VVI(b) \ if (dbgF) { \ FOR(i, 0, b.size()) { \ FOR(j, 0, b[i].size()) printf("%d ", b[i][j]); \ puts(""); \ } \ } #define D_OUT(str, value) \ if (dbgF) { \ cout << str << " : " << value << endl; \ } template <class T> T IN() { T d; cin >> d; return d; } LL gcd(LL a, LL b) { return (b > 0) ? gcd(b, a % b) : a; } // 最大公約数(Greatest Common Divisor) LL lcm(LL a, LL b) { return a / gcd(a, b) * b; } // 最小公倍数(Least Common Multiple) bool uruu(LL Y) { return (((Y % 4 == 0 && Y % 100 != 0) || Y % 400 == 0) ? true : false); } // うるう年判定 string Replace(string S, string from, string to) { auto p = S.find(from); while (p != string::npos) { S.replace(p, from.size(), to); p = S.find(from, p + to.size()); } return S; } // 桁和 LL Ketawa_s(string s) { LL a = 0; FOR(i, 0, s.length()) a += s[i] - '0'; return a; } //二項係数 nCk mod pを求める const LL MAX = 510000, p = 998244353; LL fac[MAX], finv[MAX], inv[MAX]; /* 前処理 */ void COM_init() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; FOR(i, 2, MAX) { fac[i] = fac[i - 1] * i % p; inv[i] = p - inv[p % i] * (p / i) % p; finv[i] = finv[i - 1] * inv[i] % p; } } /* 主処理 */ LL COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % p) % p; } int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; int dxx[8] = {0, 1, 1, 1, 0, -1, -1, -1}; int dyy[8] = {1, 1, 0, -1, -1, -1, 0, 1}; // ------------------------------------------------------------------------------- int main() { FAST_IO; bool dbgF = true; // for D_OUT(str, value) ... cout<< str <<" : "<< value <<endl; string S; cin >> S; LL ans = 0; FOR(i, 0, S.length()) { FOR(j, i + 1, S.length() + 1) { string sub = S.substr(i, j - i); if (count(sub.begin(), sub.end(), 'A') + count(sub.begin(), sub.end(), 'C') + count(sub.begin(), sub.end(), 'G') + count(sub.begin(), sub.end(), 'T') == sub.length()) { ans = max(ans, (LL)sub.length()); } } } O(ans); return 0; }
[ "expression.operation.binary.add" ]
900,468
900,469
u211964883
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string s; int n = s.size(), ans = 0; for (int i = 0; i < n; i++) { int cnt = 0; while ((s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') && i < n) { cnt++; i++; } ans = max(ans, cnt); } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int n = s.size(), ans = 0; for (int i = 0; i < n; i++) { int cnt = 0; while ((s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') && i < n) { cnt++; i++; } ans = max(ans, cnt); } cout << ans << endl; return 0; }
[]
900,470
900,471
u370447425
cpp
p03086
#include <iostream> #include <string> using namespace std; int main(void) { string s; cin >> s; int i, l = 0, m = 0; for (i = 0; i < s.length(); i++) { switch (s[i]) { case 'A': case 'C': case 'D': case 'T': l++; m = max(m, l); break; default: l = 0; } } cout << m << endl; }
#include <iostream> #include <string> using namespace std; int main(void) { string s; cin >> s; int i, l = 0, m = 0; for (i = 0; i < s.length(); i++) { switch (s[i]) { case 'A': case 'C': case 'G': case 'T': l++; m = max(m, l); break; default: l = 0; } } cout << m << endl; }
[ "literal.string.change" ]
900,483
900,484
u803684095
cpp
p03086
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1e9 + 7; // const ll MOD = 998244353; // const ll MOD = ; ll mod(ll A, ll M) { return (A % M + M) % M; } const ll INF = 1LL << 60; template <class T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } ll divceil(ll A, ll B) { return (A + (B - 1)) / B; } ll myctoi(char C) { return C - '0'; } char myitoc(ll N) { return '0' + N; } #define FINALANS(A) \ do { \ cout << (A) << '\n'; \ exit(0); \ } while (false) int main() { string S; cin >> S; ll N = S.size(); ll ans = 0; for (ll i = 0; i < N; i++) { for (ll j = i + 1; j < N; j++) { bool ok = true; for (ll k = i; k <= j; k++) { const string T = "ACGT"; bool ok2 = false; for (ll l = 0; l < 4; l++) { if (S.at(k) == T.at(l)) { ok2 = true; break; } } if (!ok2) { ok = false; break; } } if (ok) chmax(ans, j - i + 1); } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1e9 + 7; // const ll MOD = 998244353; // const ll MOD = ; ll mod(ll A, ll M) { return (A % M + M) % M; } const ll INF = 1LL << 60; template <class T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } ll divceil(ll A, ll B) { return (A + (B - 1)) / B; } ll myctoi(char C) { return C - '0'; } char myitoc(ll N) { return '0' + N; } #define FINALANS(A) \ do { \ cout << (A) << '\n'; \ exit(0); \ } while (false) int main() { string S; cin >> S; ll N = S.size(); ll ans = 0; for (ll i = 0; i < N; i++) { for (ll j = i; j < N; j++) { bool ok = true; for (ll k = i; k <= j; k++) { const string T = "ACGT"; bool ok2 = false; for (ll l = 0; l < 4; l++) { if (S.at(k) == T.at(l)) { ok2 = true; break; } } if (!ok2) { ok = false; break; } } if (ok) chmax(ans, j - i + 1); } } cout << ans << endl; }
[ "control_flow.loop.for.initializer.change", "expression.operation.binary.remove" ]
900,485
900,486
u811472478
cpp
p03086
/* これを入れて実行 g++ code.cpp ./a.out */ #include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string> #include <tuple> #include <unordered_map> #include <utility> #include <vector> #define all(x) (x).begin(), (x).end() using namespace std; typedef long long ll; typedef long double ld; int dy4[4] = {-1, 0, +1, 0}; int dx4[4] = {0, +1, 0, -1}; int dy8[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; int dx8[8] = {0, 1, 1, 1, 0, -1, -1, -1}; const long long INF = 1LL << 60; const ll MOD = 1e9 + 7; bool greaterSecond(const pair<int, int> &f, const pair<int, int> &s) { return f.second > s.second; } ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } ll nCr(ll n, ll r) { if (r == 0 || r == n) { return 1; } else if (r == 1) { return n; } return (nCr(n - 1, r) + nCr(n - 1, r - 1)); } ll nPr(ll n, ll r) { r = n - r; ll ret = 1; for (ll i = n; i >= r + 1; i--) ret *= i; return ret; } //-----------------------ここから----------- int main(void) { string s; cin >> s; int ans = 0; for (int i = 0; i < s.size(); i++) { for (int j = i + 1; j < s.size(); j++) { bool f = true; for (int k = i; k <= j; k++) { if (!(s[k] == 'A' || s[k] == 'C' || s[k] == 'G' || s[k] == 'T')) { f = false; break; } } if (f) ans = max(ans, j - i + 1); } } cout << ans << endl; }
/* これを入れて実行 g++ code.cpp ./a.out */ #include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string> #include <tuple> #include <unordered_map> #include <utility> #include <vector> #define all(x) (x).begin(), (x).end() using namespace std; typedef long long ll; typedef long double ld; int dy4[4] = {-1, 0, +1, 0}; int dx4[4] = {0, +1, 0, -1}; int dy8[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; int dx8[8] = {0, 1, 1, 1, 0, -1, -1, -1}; const long long INF = 1LL << 60; const ll MOD = 1e9 + 7; bool greaterSecond(const pair<int, int> &f, const pair<int, int> &s) { return f.second > s.second; } ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } ll nCr(ll n, ll r) { if (r == 0 || r == n) { return 1; } else if (r == 1) { return n; } return (nCr(n - 1, r) + nCr(n - 1, r - 1)); } ll nPr(ll n, ll r) { r = n - r; ll ret = 1; for (ll i = n; i >= r + 1; i--) ret *= i; return ret; } //-----------------------ここから----------- int main(void) { string s; cin >> s; int ans = 0; for (int i = 0; i < s.size(); i++) { for (int j = i; j < s.size(); j++) { bool f = true; for (int k = i; k <= j; k++) { if (!(s[k] == 'A' || s[k] == 'C' || s[k] == 'G' || s[k] == 'T')) { f = false; break; } } if (f) ans = max(ans, j - i + 1); } } cout << ans << endl; }
[ "control_flow.loop.for.initializer.change", "expression.operation.binary.remove" ]
900,496
900,497
u845000384
cpp
p03086
#include <iostream> #include <string> #include <vector> using namespace std; //文字列から全部分文字列を生成する // string -> vector<string> vector<string> subStringMaker(string); //文字列がA, T, C, Gだけで構成されているかを判定する // string -> bool bool isInDomain(string); int main() { string S; int substringLength = 0; vector<string> subString; cin >> S; subString = subStringMaker(S); for (auto &v : subString) { if (isInDomain(v)) { if (v.length() > substringLength) substringLength = v.length(); } } cout << substringLength << endl; } vector<string> subStringMaker(string S) { int limit = S.length(); vector<string> subStringVector; for (int i = 0; i < limit; i++) { for (int j = i + 1; j <= limit; j++) { subStringVector.push_back(S.substr(i, j)); } } return subStringVector; } bool isInDomain(string S) { for (int i = 0; i < S.length(); i++) { char c = S.at(i); if (c != 'A' && c != 'T' && c != 'C' && c != 'G') return false; } return true; }
#include <iostream> #include <string> #include <vector> using namespace std; //文字列から全部分文字列を生成する // string -> vector<string> vector<string> subStringMaker(string); //文字列がA, T, C, Gだけで構成されているかを判定する // string -> bool bool isInDomain(string); int main() { string S; int substringLength = 0; vector<string> subString; cin >> S; subString = subStringMaker(S); for (auto &v : subString) { if (isInDomain(v)) { if (v.length() > substringLength) substringLength = v.length(); } } cout << substringLength << endl; } vector<string> subStringMaker(string S) { int limit = S.length(); vector<string> subStringVector; for (int i = 0; i < limit; i++) { for (int j = 1; j <= limit - i; j++) { subStringVector.push_back(S.substr(i, j)); } } return subStringVector; } bool isInDomain(string S) { for (int i = 0; i < S.length(); i++) { char c = S.at(i); if (c != 'A' && c != 'T' && c != 'C' && c != 'G') return false; } return true; }
[ "control_flow.loop.for.initializer.change", "expression.operation.binary.remove", "control_flow.loop.for.condition.change" ]
900,513
900,514
u172386990
cpp
p03086
#include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; typedef unsigned long ul; typedef unsigned long long ull; typedef long long ll; typedef vector<int> vint; typedef vector<vector<int>> vvint; typedef pair<int, int> pint; typedef vector<pint> vpint; #define rep(i, n) for (int i = 0; i < n; i++) #define repf(i, f, n) for (int i = f; i < n; i++) #define repr(i, n) for (int i = n - 1; i >= 0; i--) #define mp make_pair #define mt make_tuple #define pb push_back #define pf push_front #define fi first #define se second #define INT_MAX 2147483647 #define vmax(vec) *max_element(vec.begin(), vec.end()) #define vmin(vec) *min_element(vec.begin(), vec.end()) #define vsort(vec) sort(vec.begin(), vec.end()) int dy[] = {0, 0, 1, -1}; int dx[] = { 1, -1, 0, 0, }; int main() { string a = "AGCT"; string S; cin >> S; int ans = 0; bool flag = false; int anss = 0; rep(i, S.size()) { rep(j, 4) { if (S[i] == a[j]) { flag = true; ans++; } } anss = max(anss, ans); if (!flag) ans = 0; } cout << anss << endl; } //
#include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; typedef unsigned long ul; typedef unsigned long long ull; typedef long long ll; typedef vector<int> vint; typedef vector<vector<int>> vvint; typedef pair<int, int> pint; typedef vector<pint> vpint; #define rep(i, n) for (int i = 0; i < n; i++) #define repf(i, f, n) for (int i = f; i < n; i++) #define repr(i, n) for (int i = n - 1; i >= 0; i--) #define mp make_pair #define mt make_tuple #define pb push_back #define pf push_front #define fi first #define se second #define INT_MAX 2147483647 #define vmax(vec) *max_element(vec.begin(), vec.end()) #define vmin(vec) *min_element(vec.begin(), vec.end()) #define vsort(vec) sort(vec.begin(), vec.end()) int dy[] = {0, 0, 1, -1}; int dx[] = { 1, -1, 0, 0, }; int main() { string a = "AGCT"; string S; cin >> S; int ans = 0; bool flag = false; int anss = 0; rep(i, S.size()) { rep(j, 4) { if (S[i] == a[j]) { flag = true; ans++; } } anss = max(anss, ans); if (!flag) ans = 0; flag = false; } cout << anss << endl; } //
[ "assignment.add" ]
900,525
900,526
u644070128
cpp
p03086
#include <bits/stdc++.h> using namespace std; bool cek(char c) { if (c == 'A') { return true; } else if (c == 'C') { return true; } else if (c == 'G') { return true; } else if (c == 'T') { return true; } else { return false; } } int main() { string s; cin >> s; int maxL = 0; int Lnow = 0; for (int i = 0; s[i]; i++) { if (cek(s[i])) { Lnow++; if (Lnow > maxL) { maxL = Lnow; } } else { Lnow = 1; } } cout << maxL << endl; return 0; }
#include <bits/stdc++.h> using namespace std; bool cek(char c) { if (c == 'A') { return true; } else if (c == 'C') { return true; } else if (c == 'G') { return true; } else if (c == 'T') { return true; } return false; } int main() { string s; cin >> s; int maxL = 0; int Lnow = 0; for (int i = 0; s[i]; i++) { if (cek(s[i])) { Lnow++; if (Lnow > maxL) { maxL = Lnow; } } else { Lnow = 0; } } cout << maxL << endl; return 0; }
[ "literal.number.change", "assignment.value.change" ]
900,527
900,528
u695546097
cpp
p03086
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() const int INF = (1 << 30); const i64 INFL = (1LL << 62); const i64 MOD = 1000000007; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int cnt = 0; int tmp = 0; char acgt[4] = {'A', 'C', 'G', 'T'}; rep(i, s.size()) { bool flag = true; rep(j, 4) { if (s[i] == acgt[j]) flag = false; } if (flag) { cnt = max(cnt, tmp); } else { ++tmp; } } cnt = max(cnt, tmp); cout << cnt << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() const int INF = (1 << 30); const i64 INFL = (1LL << 62); const i64 MOD = 1000000007; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int cnt = 0; int tmp = 0; char acgt[4] = {'A', 'C', 'G', 'T'}; rep(i, s.size()) { bool flag = true; rep(j, 4) { if (s[i] == acgt[j]) flag = false; } if (flag) { cnt = max(cnt, tmp); tmp = 0; } else { ++tmp; } } cnt = max(cnt, tmp); cout << cnt << endl; return 0; }
[ "assignment.add" ]
900,529
900,530
u706695185
cpp
p03086
#include <bits/stdc++.h> #define mod 1000000007 #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long ll; const long long INF = 1LL << 60; int main(void) { string S; cin >> S; int ans = 0, count = 0; rep(i, S.size()) { if (S[i] != 'A' && S[i] != 'G' && S[i] != 'C' && S[i] != 'T') { if (count != 0) { ans = max(ans, count); count = 0; } } else { count++; } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define mod 1000000007 #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long ll; const long long INF = 1LL << 60; int main(void) { string S; cin >> S; int ans = 0, count = 0; rep(i, S.size()) { if (S[i] != 'A' && S[i] != 'G' && S[i] != 'C' && S[i] != 'T') { if (count != 0) { ans = max(ans, count); count = 0; } } else { count++; } } cout << max(ans, count) << endl; return 0; }
[ "call.add", "call.arguments.add" ]
900,541
900,542
u895536055
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; int MAX = 0; for (int i = 0; i < a.size(); i++) { for (int j = 1; j < a.size() - i; j++) { string b = a.substr(i, j); int key = 0; int length = 0; for (int s = 0; s < b.size(); s++) { if (b.at(s) != 'A' && b.at(s) != 'C' && b.at(s) != 'G' && b.at(s) != 'T') { key = 1; break; } else length++; } if (MAX < length && key != 1) MAX = length; } } cout << MAX << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; int MAX = 0; for (int i = 0; i < a.size(); i++) { for (int j = 1; j <= a.size() - i; j++) { string b = a.substr(i, j); int key = 0; int length = 0; for (int s = 0; s < b.size(); s++) { if (b.at(s) != 'A' && b.at(s) != 'C' && b.at(s) != 'G' && b.at(s) != 'T') { key = 1; break; } else length++; } if (MAX < length && key != 1) MAX = length; } } cout << MAX << endl; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
900,554
900,555
u613960672
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; int MAX = 0; for (int i = 0; i < a.size(); i++) { for (int j = i + 1; j < a.size() + 1; j++) { string b = a.substr(i, j); int key = 0; int length = 0; for (int s = 0; s < b.size(); s++) { if (b.at(s) != 'A' && b.at(s) != 'C' && b.at(s) != 'G' && b.at(s) != 'T') { key = 1; break; } else length++; } if (MAX < length && key != 1) MAX = length; } } cout << MAX << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; int MAX = 0; for (int i = 0; i < a.size(); i++) { for (int j = 1; j <= a.size() - i; j++) { string b = a.substr(i, j); int key = 0; int length = 0; for (int s = 0; s < b.size(); s++) { if (b.at(s) != 'A' && b.at(s) != 'C' && b.at(s) != 'G' && b.at(s) != 'T') { key = 1; break; } else length++; } if (MAX < length && key != 1) MAX = length; } } cout << MAX << endl; }
[ "control_flow.loop.for.initializer.change", "expression.operation.binary.remove", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
900,556
900,555
u613960672
cpp
p03086
#include "bits/stdc++.h" using namespace std; typedef long long ll; template <class T> bool INRANGE(T x, T a, T b) { return a <= x && x <= b; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } #define REP(i, n) for (int i = 0; i < (n); ++i) #define RREP(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (a); i >= (b); --i) #define ALL(v) (v).begin(), (v).end() #define RALL(a) (a).rbegin(), (a).rend() #define debug(x) \ cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \ << " " << __FILE__ << endl; typedef vector<int> vi; typedef vector<string> vs; typedef vector<vi> vvi; typedef pair<int, int> pii; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int ans = 0; int tmp = 0; for (char ch : s) { if (ch == 'A' or ch == 'C' or ch == 'G' or ch == 'T') { tmp++; } else { ans = max(ans, tmp); tmp = 0; } } cout << ans << endl; return 0; }
#include "bits/stdc++.h" using namespace std; typedef long long ll; template <class T> bool INRANGE(T x, T a, T b) { return a <= x && x <= b; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } #define REP(i, n) for (int i = 0; i < (n); ++i) #define RREP(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (a); i >= (b); --i) #define ALL(v) (v).begin(), (v).end() #define RALL(a) (a).rbegin(), (a).rend() #define debug(x) \ cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \ << " " << __FILE__ << endl; typedef vector<int> vi; typedef vector<string> vs; typedef vector<vi> vvi; typedef pair<int, int> pii; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int ans = 0; int tmp = 0; for (char ch : s) { if (ch == 'A' or ch == 'C' or ch == 'G' or ch == 'T') { tmp++; } else { ans = max(ans, tmp); tmp = 0; } } cout << max(ans, tmp) << endl; return 0; }
[ "call.add", "call.arguments.add" ]
900,558
900,559
u299377613
cpp
p03086
// // Created on 2019-02-09. // #include "bits/stdc++.h" using namespace std; typedef long long ll; template <class T> bool INRANGE(T x, T a, T b) { return a <= x && x <= b; } #define REP(i, n) for (int i = 0; i < (n); ++i) #define ALL(v) (v).begin(), (v).end() #define RALL(a) (a).rbegin(), (a).rend() #define debug(x) \ cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \ << " " << __FILE__ << endl; #define PB push_back #define INF 1e9 #define MOD 1e9 + 7 #define EPS 1e-9 typedef vector<int> vi; typedef vector<string> vs; typedef vector<vi> vvi; typedef pair<int, int> pii; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string b; cin >> b; int max_len = 0; int ans; REP(i, b.length()) { if (b[i] == 'A' or b[i] == 'T' or b[i] == 'C' or b[i] == 'G') max_len++; else { ans = max(max_len, ans); max_len = 0; } } cout << max(max_len, ans) << endl; return 0; }
// // Created on 2019-02-09. // #include "bits/stdc++.h" using namespace std; typedef long long ll; template <class T> bool INRANGE(T x, T a, T b) { return a <= x && x <= b; } #define REP(i, n) for (int i = 0; i < (n); ++i) #define ALL(v) (v).begin(), (v).end() #define RALL(a) (a).rbegin(), (a).rend() #define debug(x) \ cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \ << " " << __FILE__ << endl; #define PB push_back #define INF 1e9 #define MOD 1e9 + 7 #define EPS 1e-9 typedef vector<int> vi; typedef vector<string> vs; typedef vector<vi> vvi; typedef pair<int, int> pii; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string b; cin >> b; int max_len = 0; int ans = -1; REP(i, b.length()) { if (b[i] == 'A' or b[i] == 'T' or b[i] == 'C' or b[i] == 'G') max_len++; else { ans = max(max_len, ans); max_len = 0; } } cout << max(max_len, ans) << endl; return 0; }
[ "variable_declaration.value.change" ]
900,560
900,561
u299377613
cpp
p03086
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define ll long long #define rep2(i, a, b) for (ll i = a; i <= b; ++i) #define rep(i, n) for (ll i = 0; i < n; i++) #define rep3(i, a, b) for (ll i = a; i >= b; i--) #define pii pair<int, int> #define pll pair<ll, ll> #define pq priority_queue #define pb push_back #define eb emplace_back #define veci vector<int> #define vecll vector<ll> #define vecpii vector<pii> #define vec2(a, b) vector<vec>(a, vec(b)) #define vec2ll(a, b) vector<vec>(a, vecll(b)) #define vec3(a, b, c) vector<vector<vec>>(a, vec2(b, c)) #define vec3ll(a, b, c) vector<vector<vecll>>(a, vec2ll(b, c)) #define fi first #define se second #define all(c) begin(c), end(c) #define ios ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define lb(c, x) distance(c.begin(), lower_bound(all(c), x)) #define ub(c, x) distance(c.begin(), upper_bound(all(c), x)) using namespace std; int in() { int x; cin >> x; return x; } ll lin() { ll x; cin >> x; return x; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } template <class T> inline void print(pair<T, T> p) { cout << "(" << p.first << "," << p.second << ") "; } // template<class T> inline void print(vector<pair<T,T>> v){for(auto // e:v)print(e); cout<<endl;} template<class T> inline void print(T v){for(auto // e:v)cout<<e<<" ";cout<<endl;} template <typename T> istream &operator>>(istream &is, vector<T> &vec) { for (T &x : vec) is >> x; return is; } const ll INF = 1e18 + 1; int main() { string s; cin >> s; ll n = s.length(); ll ans = -1; ll m = 0; rep(i, n) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { m++; if (ans < m) { ans = m; } } else { m = 0; } } cout << ans << endl; return 0; }
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define ll long long #define rep2(i, a, b) for (ll i = a; i <= b; ++i) #define rep(i, n) for (ll i = 0; i < n; i++) #define rep3(i, a, b) for (ll i = a; i >= b; i--) #define pii pair<int, int> #define pll pair<ll, ll> #define pq priority_queue #define pb push_back #define eb emplace_back #define veci vector<int> #define vecll vector<ll> #define vecpii vector<pii> #define vec2(a, b) vector<vec>(a, vec(b)) #define vec2ll(a, b) vector<vec>(a, vecll(b)) #define vec3(a, b, c) vector<vector<vec>>(a, vec2(b, c)) #define vec3ll(a, b, c) vector<vector<vecll>>(a, vec2ll(b, c)) #define fi first #define se second #define all(c) begin(c), end(c) #define ios ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define lb(c, x) distance(c.begin(), lower_bound(all(c), x)) #define ub(c, x) distance(c.begin(), upper_bound(all(c), x)) using namespace std; int in() { int x; cin >> x; return x; } ll lin() { ll x; cin >> x; return x; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } template <class T> inline void print(pair<T, T> p) { cout << "(" << p.first << "," << p.second << ") "; } // template<class T> inline void print(vector<pair<T,T>> v){for(auto // e:v)print(e); cout<<endl;} template<class T> inline void print(T v){for(auto // e:v)cout<<e<<" ";cout<<endl;} template <typename T> istream &operator>>(istream &is, vector<T> &vec) { for (T &x : vec) is >> x; return is; } const ll INF = 1e18 + 1; int main() { string s; cin >> s; ll n = s.length(); ll ans = 0; ll m = 0; rep(i, n) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { m++; if (ans < m) { ans = m; } } else { m = 0; } } cout << ans << endl; return 0; }
[ "literal.number.change", "variable_declaration.value.change" ]
900,564
900,565
u882039496
cpp
p03086
#include <iostream> #include <stdio.h> #include <string> #define rep(i, n) for (int i = 0; i < (n); i++) #include <algorithm> #include <vector> using namespace std; int main() { string s; cin >> s; vector<int> dp(12); if (s.at(0) == 'A' || s.at(0) == 'C' || s.at(0) == 'G' || s.at(0) == 'T') dp[0] = 1; else dp[0] = 0; int ans = 0; for (int i = 1; i < s.size(); i++) { if (s.at(i) == 'A' || s.at(i) == 'C' || s.at(i) == 'G' || s.at(i) == 'T') { dp[i] = dp[i - 1] + 1; ans = max(ans, dp[i]); } else { dp[i] = 0; } } cout << ans << endl; return 0; }
#include <iostream> #include <stdio.h> #include <string> #define rep(i, n) for (int i = 0; i < (n); i++) #include <algorithm> #include <vector> using namespace std; int main() { string s; cin >> s; vector<int> dp(12); if (s.at(0) == 'A' || s.at(0) == 'C' || s.at(0) == 'G' || s.at(0) == 'T') dp[0] = 1; else dp[0] = 0; int ans = dp[0]; for (int i = 1; i < s.size(); i++) { if (s.at(i) == 'A' || s.at(i) == 'C' || s.at(i) == 'G' || s.at(i) == 'T') { dp[i] = dp[i - 1] + 1; ans = max(ans, dp[i]); } else { dp[i] = 0; } } cout << ans << endl; return 0; }
[]
900,580
900,581
u648009244
cpp
p03086
#include <iostream> #include <stdio.h> #include <string> #define rep(i, n) for (int i = 0; i < (n); i++) #include <algorithm> #include <vector> using namespace std; int main() { string s; cin >> s; vector<int> dp(12); if (s.at(0) == 'A' || s.at(0) == 'C' || s.at(0) == 'G' || s.at(0) == 'T') dp[0] = 1; else dp[0] = 0; int ans = 0; for (int i = 1; i < s.size(); i++) { if (s.at(i) == 'A' || s.at(i) == 'C' || s.at(i) == 'G' || s.at(i) == 'T') { dp[i] = dp[i - 1] + 1; ans = max(ans, dp[i]); } else { dp[i] = 0; } } cout << ans << endl; return 0; }
#include <iostream> #include <stdio.h> #include <string> #define rep(i, n) for (int i = 0; i < (n); i++) #include <algorithm> #include <vector> using namespace std; int main() { string s; cin >> s; vector<int> dp(12); if (s.at(0) == 'A' || s.at(0) == 'C' || s.at(0) == 'G' || s.at(0) == 'T') dp[0] = 1; else dp[0] = 0; int ans = dp[0]; for (int i = 1; i < s.size(); i++) { if (s.at(i) == 'A' || s.at(i) == 'C' || s.at(i) == 'G' || s.at(i) == 'T') { dp[i] = dp[i - 1] + 1; ans = max(ans, dp[i]); } else { dp[i] = 0; } } cout << ans << endl; return 0; }
[]
900,580
900,582
u648009244
cpp
p03086
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl const int maxn = 1e6 + 5; bool f(char x) { string s = "ACGT"; for (char c : s) { if (c == x) return true; } return false; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int ans = 0; string s; cin >> s; int n = s.size(); for (int i = 0; i < n;) { int j = i; if (!f(i)) { i++; continue; } while (j < n && f(s[j])) j++; ans = max(ans, j - i); i = j; } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl const int maxn = 1e6 + 5; bool f(char x) { string s = "ACGT"; for (char c : s) { if (c == x) return true; } return false; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int ans = 0; string s; cin >> s; int n = s.size(); for (int i = 0; i < n;) { int j = i; if (!f(s[i])) { i++; continue; } while (j < n && f(s[j])) j++; ans = max(ans, j - i); i = j; } cout << ans; return 0; }
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
900,593
900,594
u774417629
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; int ans = 0, count = 0; for (int i = 0; i < S.size(); i++) { if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T') { count++; } else { ans = max(ans, count); count = 0; } } ans = max(ans, count); cout << ans; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int ans = 0, count = 0; for (int i = 0; i < S.size(); i++) { if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T') { count++; } else { ans = max(ans, count); count = 0; } } ans = max(ans, count); cout << ans; }
[]
900,595
900,596
u347057617
cpp
p03086
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { int count = 0; string S; vector<int> ACGT(20); cin >> S; rep(i, S.size()) { if (S[i] == 'A' or S[i] == 'C' or S[i] == 'G' or S[i] == 'T') { ACGT[i] = 1; } } rep(i, S.size()) { int tmp = 0; for (int j = i; j < S.size(); j++) { if (S[j] == 1) { tmp++; } else break; } count = max(count, tmp); } cout << count; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { int count = 0; string S; vector<int> ACGT(20); cin >> S; rep(i, S.size()) { if (S[i] == 'A' or S[i] == 'C' or S[i] == 'G' or S[i] == 'T') { ACGT[i] = 1; } } rep(i, S.size()) { int tmp = 0; for (int j = i; j < S.size(); j++) { if (ACGT[j]) { tmp++; } else break; } count = max(count, tmp); } cout << count; }
[ "identifier.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,597
900,598
u573537453
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int res = 0; for (int i = 0; i < (int)s.length(); i++) { for (int j = i + 1; j < (int)s.length(); j++) { int tmp = 0; for (int k = i; k < j; k++) { if (s[k] != 'A' && s[k] != 'C' && s[k] != 'G' && s[k] != 'T') break; else tmp++; } res = max(res, tmp); } } cout << res; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int res = 0; for (int i = 0; i < (int)s.length(); i++) { for (int j = i; j < (int)s.length(); j++) { int tmp = 0; for (int k = i; k <= j; k++) { if (s[k] != 'A' && s[k] != 'C' && s[k] != 'G' && s[k] != 'T') break; else tmp++; } res = max(res, tmp); } } cout << res; }
[ "control_flow.loop.for.initializer.change", "expression.operation.binary.remove", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
900,599
900,600
u607728868
cpp
p03086
#include <bits/stdc++.h> #include <iomanip> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; typedef long l; typedef pair<int, int> P; const ll INF = 100000000000000001; const double PI = 3.141592653589; int main() { string s; cin >> s; int length = 0; int index = 0; rep(i, s.size() - 1) { if (s[i] != 'A' && s[i] != 'T' && s[i] != 'G' && s[i] != 'C') continue; int end = 0; for (int j = i + 1; j < s.size(); j++) { if (s[j] != 'A' && s[j] != 'T' && s[j] != 'G' && s[j] != 'C') break; end = j; } // cout<<i<<" "<<end<<endl; if (length < end - i) { length = end - i + 1; index = i; } } cout << length << endl; return 0; }
#include <bits/stdc++.h> #include <iomanip> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; typedef long l; typedef pair<int, int> P; const ll INF = 100000000000000001; const double PI = 3.141592653589; int main() { string s; cin >> s; int length = 0; int index = 0; rep(i, s.size()) { if (s[i] != 'A' && s[i] != 'T' && s[i] != 'G' && s[i] != 'C') continue; int end = 0; for (int j = i; j < s.size(); j++) { if (s[j] != 'A' && s[j] != 'T' && s[j] != 'G' && s[j] != 'C') break; end = j; } // cout<<i<<" "<<end<<endl; if (length < end - i + 1) { length = end - i + 1; index = i; } } // if(s.size()==1&&(s[0]=='A'||s[0]=='T'||s[0]=='G'||s[0]=='C')) // length=1; cout << length << endl; return 0; }
[ "expression.operation.binary.remove", "control_flow.loop.for.initializer.change", "control_flow.branch.if.condition.change" ]
900,618
900,619
u634999820
cpp
p03086
#include <bits/stdc++.h> #include <iomanip> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; typedef long l; typedef pair<int, int> P; const ll INF = 100000000000000001; const double PI = 3.141592653589; int main() { string s; cin >> s; int length = 0; int index = 0; rep(i, s.size() - 1) { if (s[i] != 'A' && s[i] != 'T' && s[i] != 'G' && s[i] != 'C') continue; int end = 0; for (int j = i + 1; j < s.size(); j++) { if (s[j] != 'A' && s[j] != 'T' && s[j] != 'G' && s[j] != 'C') break; end = j; } // cout<<end<<endl; if (length < end - i) { length = end - i + 1; index = i; } } cout << length << endl; return 0; }
#include <bits/stdc++.h> #include <iomanip> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; typedef long l; typedef pair<int, int> P; const ll INF = 100000000000000001; const double PI = 3.141592653589; int main() { string s; cin >> s; int length = 0; int index = 0; rep(i, s.size()) { if (s[i] != 'A' && s[i] != 'T' && s[i] != 'G' && s[i] != 'C') continue; int end = 0; for (int j = i; j < s.size(); j++) { if (s[j] != 'A' && s[j] != 'T' && s[j] != 'G' && s[j] != 'C') break; end = j; } // cout<<i<<" "<<end<<endl; if (length < end - i + 1) { length = end - i + 1; index = i; } } // if(s.size()==1&&(s[0]=='A'||s[0]=='T'||s[0]=='G'||s[0]=='C')) // length=1; cout << length << endl; return 0; }
[ "expression.operation.binary.remove", "control_flow.loop.for.initializer.change", "control_flow.branch.if.condition.change" ]
900,620
900,619
u634999820
cpp
p03086
#include <bits/stdc++.h> #define ll long long #define REP(i, n) for (int i = 0; i < n; ++i) #define print(x) cout << x << endl; using namespace std; void solve() { string S; cin >> S; int ans = 0; string target = "AGCT"; for (int i = 0; i < S.length(); ++i) { for (int j = i + 1; j < S.length(); ++j) { int left = i; int right = j; bool ok = true; for (int x = i; x < right; ++x) { if (find(target.begin(), target.end(), S[x]) == target.end()) { ok = false; break; } } if (ok) { ans = max(ans, right - left); } } } print(ans); } int main() { solve(); return 0; }
#include <bits/stdc++.h> #define ll long long #define REP(i, n) for (int i = 0; i < n; ++i) #define print(x) cout << x << endl; using namespace std; void solve() { string S; cin >> S; int ans = 0; string target = "AGCT"; for (int i = 0; i < S.length(); ++i) { for (int j = i + 1; j < S.length() + 1; ++j) { int left = i; int right = j; bool ok = true; for (int x = i; x < right; ++x) { if (find(target.begin(), target.end(), S[x]) == target.end()) { ok = false; break; } } if (ok) { ans = max(ans, right - left); } } } print(ans); } int main() { solve(); return 0; }
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
900,621
900,622
u929199273
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { int i; string s; cin >> s; int a = 0, ma = 0; for (i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { a++; } else { ma = max(ma, a); a = 0; } } cout << ma; }
#include <bits/stdc++.h> using namespace std; int main() { int i; string s; cin >> s; int a = 0, ma = 0; for (i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { a++; } else { ma = max(ma, a); a = 0; } } cout << max(ma, a); }
[ "call.add", "call.arguments.add" ]
900,637
900,638
u952130512
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int ans = 0; int tmp = 0; int n = S.length(); for (int i = 0; i < n; ++i) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { tmp += 1; if (i == n) ans = max(ans, tmp); } else { ans = max(ans, tmp); tmp = 0; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int ans = 0; int tmp = 0; int n = S.length(); for (int i = 0; i < n; ++i) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { tmp += 1; if (i == n - 1) ans = max(ans, tmp); } else { ans = max(ans, tmp); tmp = 0; } } cout << ans << endl; }
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
900,639
900,640
u981304949
cpp
p03086
#include <algorithm> #include <cmath> #include <cstring> #include <functional> #include <iostream> #include <string> #include <utility> #include <vector> #define rep(i, a, b) for (int(i) = (a); (i) < (b); (i)++) using namespace std; int main() { int ans(0), b(0); string a; cin >> a; rep(i, 0, a.length() - 1) { if (a[i] == 'A' || a[i] == 'T' || a[i] == 'G' || a[i] == 'C') { b++; } else b = 0; if (ans < b) ans = b; } cout << ans << endl; }
#include <algorithm> #include <cmath> #include <cstring> #include <functional> #include <iostream> #include <string> #include <utility> #include <vector> #define rep(i, a, b) for (int(i) = (a); (i) < (b); (i)++) using namespace std; int main() { int ans(0), b(0); string a; cin >> a; rep(i, 0, a.length()) { if (a[i] == 'A' || a[i] == 'T' || a[i] == 'G' || a[i] == 'C') { b++; } else b = 0; if (ans < b) ans = b; } cout << ans << endl; }
[ "expression.operation.binary.remove" ]
900,653
900,654
u456658814
cpp
p03086
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REPl(i, n) for (ll i = 0; i < (ll)(n); i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define REPRl(i, n) for (ll i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < (int)n; i++) #define FORl(i, m, n) for (ll i = m; i < (ll)n; i++) #define ALL(v) v.begin(), v.end() ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a * b / gcd(a, b); } int main() { string s; cin >> s; int len = 0; int ans = 0; REP(i, s.size()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { len++; } else { ans = max(ans, len); len = 0; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REPl(i, n) for (ll i = 0; i < (ll)(n); i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define REPRl(i, n) for (ll i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < (int)n; i++) #define FORl(i, m, n) for (ll i = m; i < (ll)n; i++) #define ALL(v) v.begin(), v.end() ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a * b / gcd(a, b); } int main() { string s; cin >> s; int len = 0; int ans = 0; REP(i, s.size()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { len++; } else { ans = max(ans, len); len = 0; } } cout << max(ans, len) << endl; }
[ "call.add", "call.arguments.add" ]
900,655
900,656
u882037708
cpp
p03086
#include <bits/stdc++.h> int main() { std::string s; std::cin >> s; int max = 0; for (int i = 0; i < s.size(); ++i) { int cnt = 0; for (int j = i; j < s.size(); ++j) { if (s[j] == 'A' || s[j] == 'G' || s[j] == 'C' || s[j] == 'T') { ++cnt; } else { max = std::max(max, cnt); } } } std::cout << max << std::endl; return 0; }
#include <bits/stdc++.h> int main() { std::string s; std::cin >> s; int max = 0; for (int i = 0; i < s.size(); ++i) { int cnt = 0; for (int j = i; j < s.size(); ++j) { if (s[j] == 'A' || s[j] == 'G' || s[j] == 'C' || s[j] == 'T') { ++cnt; } else { break; } } max = std::max(max, cnt); } std::cout << max << std::endl; return 0; }
[ "control_flow.break.add" ]
900,657
900,658
u042751985
cpp
p03086
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main() { string s; cin >> s; int maxcnt = 0; int cnt = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { cnt++; } else { maxcnt = max(cnt, maxcnt); } } maxcnt = max(cnt, maxcnt); cout << maxcnt << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main() { string s; cin >> s; int maxcnt = 0; int cnt = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { cnt++; } else { maxcnt = max(cnt, maxcnt); cnt = 0; } } maxcnt = max(cnt, maxcnt); cout << maxcnt << endl; }
[ "assignment.add" ]
900,665
900,666
u232711814
cpp
p03086
#include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; int cnt = 0; int prev = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { cnt++; } else { if (prev < cnt) { prev = cnt; } cnt = 0; } } cout << prev << endl; return 0; }
#include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; int cnt = 0; int prev = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { cnt++; } else { if (prev < cnt) { prev = cnt; } cnt = 0; } } cout << max(cnt, prev) << endl; return 0; }
[ "call.add", "call.arguments.change" ]
900,673
900,674
u904995051
cpp
p03086
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) using namespace std; typedef long long ll; #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0; int ma = 0; rep(i, s.length()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { count++; } else { ma = max(ma, count); count = 0; } } cout << ma << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) using namespace std; typedef long long ll; #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0; int ma = 0; rep(i, s.length()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { count++; ma = max(ma, count); } else { count = 0; } } cout << ma << endl; return 0; }
[ "control_flow.branch.else.add" ]
900,677
900,678
u441823651
cpp
p03086
#include <bits/stdc++.h> #define INF 1e9 using namespace std; #define REPR(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(a) (a).begin(), (a).end() template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; } template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; } typedef long long ll; int main() { string s; cin >> s; int count = 0; int max_count = 0; REP(i, s.size()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') count++; else chmax(max_count, count); } cout << max(count, max_count) << endl; return 0; }
#include <bits/stdc++.h> #define INF 1e9 using namespace std; #define REPR(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(a) (a).begin(), (a).end() template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; } template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; } typedef long long ll; int main() { string s; cin >> s; int count = 0; int max_count = 0; REP(i, s.size()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') count++; else { chmax(max_count, count); count = 0; } } cout << max(count, max_count) << endl; return 0; }
[ "assignment.add" ]
900,679
900,680
u492030100
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int count1 = 0; int count2 = 0; for (int i = 0; i < S.size(); i++) { if (S.at(i) == 'A' || S.at(i) == 'T' || S.at(i) == 'G' || S.at(i) == 'C') count1++; else { count2 = max(count1, count2); count1 = 0; } } cout << count2 << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int count1 = 0; int count2 = 0; for (int i = 0; i < S.size(); i++) { if (S.at(i) == 'A' || S.at(i) == 'T' || S.at(i) == 'G' || S.at(i) == 'C') count1++; else { count2 = max(count1, count2); count1 = 0; } } cout << max(count1, count2) << endl; }
[ "call.add", "call.arguments.change" ]
900,690
900,691
u838744063
cpp
p03086
#include <iostream> #include <string> int main() { std::string s; std::cin >> s; int tmp = 0; int ret = 0; for (int i = 0; i < sizeof(s); i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { tmp++; if (ret < tmp) ret = tmp; } else tmp = 0; } std::cout << ret << std::endl; return 0; }
#include <iostream> #include <string> int main() { std::string s; std::cin >> s; int tmp = 0; int ret = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { tmp++; if (ret < tmp) ret = tmp; } else tmp = 0; } std::cout << ret << std::endl; return 0; }
[ "control_flow.loop.for.condition.change", "call.add" ]
900,694
900,695
u741144749
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0; int answer = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) == 'A' || s.at(i) == 'C' || s.at(i) == 'G' || s.at(i) == 'T') { count++; if (i == s.size() - 1) { answer = count; } } else { if (answer < count) { answer = count; count = 0; } else { count = 0; } } } cout << answer << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0; int answer = 0; for (int i = 0; i < s.size(); i++) { if (s.at(i) == 'A' || s.at(i) == 'C' || s.at(i) == 'G' || s.at(i) == 'T') { count++; if (i == s.size() - 1 && answer < count) { answer = count; } } else { if (answer < count) { answer = count; count = 0; } else { count = 0; } } } cout << answer << endl; }
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
900,704
900,705
u572559885
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; int num; int answer = -90; cin >> S; for (int i = 0; i < S.size(); ++i) { num = 0; for (int j = 0; j < S.size() - i - 1; ++j) { if (!(S[i + j] == 'A' || S[i + j] == 'C' || S[i + j] == 'G' || S[i + j] == 'T')) { goto end; } else { num++; } } end: answer = max(answer, num); } cout << answer << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; int num; int answer = -90; cin >> S; for (int i = 0; i < S.size(); ++i) { num = 0; for (int j = 0; j < S.size() - i; ++j) { if (!(S[i + j] == 'A' || S[i + j] == 'C' || S[i + j] == 'G' || S[i + j] == 'T')) { goto end; } else { num++; } } end: answer = max(answer, num); } cout << answer << endl; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,710
900,711
u091026689
cpp
p03086
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long int ll; int main(void) { string s; cin >> s; int sum = 0; int mx = 0; rep(i, s.length()) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { sum += 1; } else { mx = max(mx, sum); sum = 0; } } cout << mx << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long int ll; int main(void) { string s; cin >> s; int sum = 0; int mx = 0; rep(i, s.length() + 1) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { sum += 1; } else { mx = max(mx, sum); sum = 0; } } cout << mx << endl; return 0; }
[ "expression.operation.binary.add" ]
900,714
900,715
u905170328
cpp
p03086
#include <bits/stdc++.h> #include <math.h> using namespace std; int main() { string S; cin >> S; int N = S.size(); int ans = 0; for (int i = 0; i < N; i++) { if (S[i] == 'A' || S[i] == 'G' || S[i] == 'C' || S[i] == 'T') { int longa = 0; for (int j = i; j < N - i; j++) { if (S[j] == 'A' || S[j] == 'G' || S[j] == 'C' || S[j] == 'T') { longa++; } else break; } ans = max(ans, longa); } } cout << ans << endl; }
#include <bits/stdc++.h> #include <math.h> using namespace std; int main() { string S; cin >> S; int N = S.size(); int ans = 0; for (int i = 0; i < N; i++) { if (S[i] == 'A' || S[i] == 'G' || S[i] == 'C' || S[i] == 'T') { int longa = 0; for (int j = i; j < N; j++) { if (S[j] == 'A' || S[j] == 'G' || S[j] == 'C' || S[j] == 'T') { longa++; } else break; } ans = max(ans, longa); } } cout << ans << endl; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,716
900,717
u393754572
cpp
p03086
#include <bits/stdc++.h> #include <math.h> using namespace std; int main() { string S; cin >> S; int N = S.size(); int ans = 0; for (int i = 0; i < N; i++) { if (S[i] == 'A' || S[i] == 'G' || S[i] == 'C' || S[i] == 'T') { int longa = 0; for (int j = i; j < N - i; j++) { if (S[j] == 'A' || S[j] == 'G' || S[j] == 'C' || S[j] == 'T') { longa++; } } ans = max(ans, longa); } } cout << ans << endl; }
#include <bits/stdc++.h> #include <math.h> using namespace std; int main() { string S; cin >> S; int N = S.size(); int ans = 0; for (int i = 0; i < N; i++) { if (S[i] == 'A' || S[i] == 'G' || S[i] == 'C' || S[i] == 'T') { int longa = 0; for (int j = i; j < N; j++) { if (S[j] == 'A' || S[j] == 'G' || S[j] == 'C' || S[j] == 'T') { longa++; } else break; } ans = max(ans, longa); } } cout << ans << endl; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
900,718
900,717
u393754572
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; set<char> st = {'A', 'C', 'G', 'T'}; int ans = 0; int n = 0; for (int i = 0; i < S.size(); i++) { if (st.find(S[i]) == st.end()) { ans = max(n, ans); n = 0; } else { n++; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; set<char> st = {'A', 'C', 'G', 'T'}; int ans = 0; int n = 0; for (int i = 0; i < S.size(); i++) { if (st.find(S[i]) == st.end()) { ans = max(n, ans); n = 0; } else { n++; } } cout << max(n, ans) << endl; }
[ "call.add", "call.arguments.change" ]
900,723
900,724
u198464650
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0, maximum = 0; for (int i = 0; i < s.size() - 1; i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { count++; maximum = max(maximum, count); } else { count = 0; } } cout << maximum << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0, maximum = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { count++; maximum = max(maximum, count); } else { count = 0; } } cout << maximum << endl; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,725
900,726
u931071094
cpp
p03086
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long int ll; using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); string S; cin >> S; int n = S.length(); int len = 0; string check = "ACGT"; for (int i = 0; i < n; i++) { for (int j = 1; j < n - i; j++) { string tmp_S = S.substr(i, j); int res = 0; for (auto _q : tmp_S) { res = check.find(_q); if (res < 0) break; } if (res >= 0) len = max(len, j); } } cout << len << endl; // system("pause"); return 0; }
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long int ll; using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); string S; cin >> S; int n = S.length(); int len = 0; string check = "ACGT"; for (int i = 0; i < n; i++) { for (int j = 1; j <= n - i; j++) { string tmp_S = S.substr(i, j); int res = 0; for (auto _q : tmp_S) { res = check.find(_q); if (res < 0) break; } if (res >= 0) len = max(len, j); } } cout << len << endl; // system("pause"); return 0; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
900,729
900,730
u438265890
cpp
p03086
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string S; cin >> S; int cnt = 0, max = 0; rep(i, S.size()) { for (int j = i; j < S.size(); j++) { if (S.at(j) == 'A' | S.at(i) == 'C' | S.at(j) == 'G' | S.at(j) == 'T') cnt++; else break; } if (max < cnt) max = cnt; cnt = 0; } cout << max << 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; int cnt = 0, max = 0; rep(i, S.size()) { for (int j = i; j < S.size(); j++) { if (S.at(j) == 'A' | S.at(j) == 'C' | S.at(j) == 'G' | S.at(j) == 'T') cnt++; else break; } if (max < cnt) max = cnt; cnt = 0; } cout << max << endl; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
900,735
900,736
u749022615
cpp
p03086
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; typedef long long ll; const ll INF = 1e9 + 7; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { string S; int count = 1, MAX = 0; cin >> S; bool check = true; for (int i = 0; i < S.length() - 1; i++) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { if (check != false) { check = false; count = 1; } else { count++; } } else if (!check) { MAX = max(count, MAX); check = true; } } MAX = max(count, MAX); cout << MAX << endl; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; typedef long long ll; const ll INF = 1e9 + 7; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { string S; int count = 0, MAX = 0; cin >> S; bool check = true; for (int i = 0; i < S.length(); i++) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { if (check != false) { check = false; count = 1; } else { count += 1; } } else if (!check) { MAX = max(count, MAX); check = true; } } MAX = max(count, MAX); cout << MAX << endl; return 0; }
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,739
900,740
u534015096
cpp
p03086
#include <bits/stdc++.h> #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, m, n) for (int i = (m); i < (n); ++i) #define FORR(i, m, n) for (int i = (m); i >= (n); --i) #define ifaxb(a, x, b) if (a < x && x < b) // 比較は昇順 #define vi vector<int> #define vii vector<vi> #define vs vector<string> #define vss vector<vs> #define all(x) x.begin(), x.end() #define ff first #define ss second #define pq priority_queue #define ipair pair<int, int> #define spair pair<string, string> #define lpair pair<LL, LL> #define MP make_pair #define MM multimap #define PB push_back #define INF 2147483647 #define _INF -2147483647 #define pi 3.1415926536 #define MAXN 100004 using namespace std; typedef long long ll; int main() { string S; cin >> S; int max = 0; // 最大値 int len = 0; // 計測中の長さ rep(i, S.size()) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { len++; } else { if (max < len) { max = len; } len = 0; } } cout << max << endl; return 0; }
#include <bits/stdc++.h> #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, m, n) for (int i = (m); i < (n); ++i) #define FORR(i, m, n) for (int i = (m); i >= (n); --i) #define ifaxb(a, x, b) if (a < x && x < b) // 比較は昇順 #define vi vector<int> #define vii vector<vi> #define vs vector<string> #define vss vector<vs> #define all(x) x.begin(), x.end() #define ff first #define ss second #define pq priority_queue #define ipair pair<int, int> #define spair pair<string, string> #define lpair pair<LL, LL> #define MP make_pair #define MM multimap #define PB push_back #define INF 2147483647 #define _INF -2147483647 #define pi 3.1415926536 #define MAXN 100004 using namespace std; typedef long long ll; int main() { string S; cin >> S; int max = 0; // 最大値 int len = 0; // 計測中の長さ rep(i, S.size() + 1) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { len++; } else { if (max < len) { max = len; } len = 0; } } cout << max << endl; return 0; }
[ "expression.operation.binary.add" ]
900,745
900,746
u075520262
cpp
p03086
#include <algorithm> #include <cmath> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd #include <set> #include <string> #include <vector> #include <bits/stdc++.h> #include <cstdio> #include <cstdlib> #include <queue> #include <stack> #include <tuple> #include <utility> #define rep0(i, n) for (ll i = 0; i < n; i++) #define rrep0(i, n) for (ll i = n - 1; 0 <= i; i--) #define rep1(i, n) for (ll i = 1; i <= n; i++) #define rrep1(i, n) for (ll i = n; 1 <= i; i--) #define vll vector<ll> #define vi vector<int> #define all(x) (x).begin(), (x).end() #define mod 1000000007 using ll = long long; using namespace std; /*ビットxにi番目のフラグが立っているかどうか if(x & (1 << i)) ↑ a << b == a*pow(b,2) /*{0, 1, ..., n-1} の部分集合の全探索 for (int bit = 0; bit < (1 << n); ++bit) */ int main() { string s; cin >> s; int ans = 0; int cnt = 0; rrep0(i, s.size()) { if (s[i] == 'A' or s[i] == 'C' or s[i] == 'G' or s[i] == 'T') { cnt++; } else { ans = max(ans, cnt); cnt = 0; } } cout << ans; return 0; }
#include <algorithm> #include <cmath> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd #include <set> #include <string> #include <vector> #include <bits/stdc++.h> #include <cstdio> #include <cstdlib> #include <queue> #include <stack> #include <tuple> #include <utility> #define rep0(i, n) for (ll i = 0; i < n; i++) #define rrep0(i, n) for (ll i = n - 1; 0 <= i; i--) #define rep1(i, n) for (ll i = 1; i <= n; i++) #define rrep1(i, n) for (ll i = n; 1 <= i; i--) #define vll vector<ll> #define vi vector<int> #define all(x) (x).begin(), (x).end() #define mod 1000000007 using ll = long long; using namespace std; /*ビットxにi番目のフラグが立っているかどうか if(x & (1 << i)) ↑ a << b == a*pow(b,2) /*{0, 1, ..., n-1} の部分集合の全探索 for (int bit = 0; bit < (1 << n); ++bit) */ int main() { string s; cin >> s; int ans = 0; int cnt = 0; rep0(i, s.size()) { if (s[i] == 'A' or s[i] == 'C' or s[i] == 'G' or s[i] == 'T') { cnt++; } else { ans = max(ans, cnt); cnt = 0; } } cout << max(ans, cnt); return 0; }
[ "identifier.change", "call.function.change", "call.add", "call.arguments.add" ]
900,750
900,751
u667375816
cpp
p03086
#include <algorithm> #include <cmath> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd #include <set> #include <string> #include <vector> #include <bits/stdc++.h> #include <cstdio> #include <cstdlib> #include <queue> #include <stack> #include <tuple> #include <utility> #define rep0(i, n) for (ll i = 0; i < n; i++) #define rrep0(i, n) for (ll i = n - 1; 0 <= i; i--) #define rep1(i, n) for (ll i = 1; i <= n; i++) #define rrep1(i, n) for (ll i = n; 1 <= i; i--) #define vll vector<ll> #define vi vector<int> #define all(x) (x).begin(), (x).end() #define mod 1000000007 using ll = long long; using namespace std; /*ビットxにi番目のフラグが立っているかどうか if(x & (1 << i)) ↑ a << b == a*pow(b,2) /*{0, 1, ..., n-1} の部分集合の全探索 for (int bit = 0; bit < (1 << n); ++bit) */ int main() { string s; cin >> s; int ans = 0; int cnt = 0; rep0(i, s.size()) { if (s[i] == 'A' or s[i] == 'C' or s[i] == 'G' or s[i] == 'T') { cnt++; } else { ans = max(ans, cnt); cnt = 0; } } cout << ans; return 0; }
#include <algorithm> #include <cmath> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd #include <set> #include <string> #include <vector> #include <bits/stdc++.h> #include <cstdio> #include <cstdlib> #include <queue> #include <stack> #include <tuple> #include <utility> #define rep0(i, n) for (ll i = 0; i < n; i++) #define rrep0(i, n) for (ll i = n - 1; 0 <= i; i--) #define rep1(i, n) for (ll i = 1; i <= n; i++) #define rrep1(i, n) for (ll i = n; 1 <= i; i--) #define vll vector<ll> #define vi vector<int> #define all(x) (x).begin(), (x).end() #define mod 1000000007 using ll = long long; using namespace std; /*ビットxにi番目のフラグが立っているかどうか if(x & (1 << i)) ↑ a << b == a*pow(b,2) /*{0, 1, ..., n-1} の部分集合の全探索 for (int bit = 0; bit < (1 << n); ++bit) */ int main() { string s; cin >> s; int ans = 0; int cnt = 0; rep0(i, s.size()) { if (s[i] == 'A' or s[i] == 'C' or s[i] == 'G' or s[i] == 'T') { cnt++; } else { ans = max(ans, cnt); cnt = 0; } } cout << max(ans, cnt); return 0; }
[ "call.add", "call.arguments.add" ]
900,752
900,751
u667375816
cpp
p03086
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < S.size(); ++i) { for (int j = 1; j < S.size() - i - 1; ++j) { string temp = S.substr(i, j); bool flag = true; int l = temp.size(); for (int k = 0; k < l; ++k) { if (temp[k] != 'A' && temp[k] != 'T' && temp[k] != 'C' && temp[k] != 'G') { flag = false; } } if (flag) ans = max(ans, l); } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < S.size(); ++i) { for (int j = 1; j <= S.size() - i; ++j) { string temp = S.substr(i, j); bool flag = true; int l = temp.size(); for (int k = 0; k < l; ++k) { if (temp[k] != 'A' && temp[k] != 'T' && temp[k] != 'C' && temp[k] != 'G') { flag = false; } } if (flag) ans = max(ans, l); // cout << temp << " " << flag << endl; } } cout << ans << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "expression.operation.binary.remove" ]
900,755
900,756
u352969025
cpp
p03086
#include <algorithm> #include <cstdio> #include <iostream> #include <string> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) int main(void) { string s; cin >> s; int n = s.size(); int res = 0; REP(i2, n) { REP(i1, i2) { bool ok = true; for (int i = i1; i < i2; ++i) { if (s[i] != 'A' && s[i] != 'C' && s[i] != 'G' && s[i] != 'T') { ok = false; break; } } if (ok) { res = max(res, i2 - i1); } } } cout << res << endl; return 0; }
#include <algorithm> #include <cstdio> #include <iostream> #include <string> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); ++i) int main(void) { string s; cin >> s; int n = s.size(); int res = 0; REP(i2, n + 1) { REP(i1, i2) { bool ok = true; for (int i = i1; i < i2; ++i) { if (s[i] != 'A' && s[i] != 'C' && s[i] != 'G' && s[i] != 'T') { ok = false; break; } } if (ok) { res = max(res, i2 - i1); } } } cout << res << endl; return 0; }
[ "expression.operation.binary.add" ]
900,763
900,764
u703511577
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int real, phy; int count = 0; int max = -1; for (int i = 0; i < S.size() - 1; i++) { if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T' || S.at(i) == ' ') { count = 1; for (int j = i + 1; j < S.size(); j++) { if (S.at(j) == 'A' || S.at(j) == 'C' || S.at(j) == 'G' || S.at(j) == 'T' || S.at(j) == ' ') { count++; } else break; } } if (count > max) max = count; count = 0; } if (max == -1) cout << 0 << endl; else { cout << max << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int real, phy; int count = 0; int max = -1; for (int i = 0; i < S.size(); i++) { if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T' || S.at(i) == ' ') { count = 1; for (int j = i + 1; j < S.size(); j++) { if (S.at(j) == 'A' || S.at(j) == 'C' || S.at(j) == 'G' || S.at(j) == 'T' || S.at(j) == ' ') { count++; } else break; } } if (count > max) max = count; count = 0; } if (max == -1) cout << 0 << endl; else { cout << max << endl; } }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,777
900,778
u690326065
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int real, phy; int count = 0; int max = -1; for (int i = 0; i < S.size() - 1; i++) { if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T' || S.at(i) == ' ') { count = 1; for (int j = i + 1; j < S.size(); j++) { if (S.at(j) == 'A' || S.at(j) == 'C' || S.at(j) == 'G' || S.at(j) == 'T' || S.at(j) == ' ') { count++; } else break; } } if (count > max) max = count; count = 0; } if (max = -1) cout << 0 << endl; else { cout << max << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int real, phy; int count = 0; int max = -1; for (int i = 0; i < S.size(); i++) { if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T' || S.at(i) == ' ') { count = 1; for (int j = i + 1; j < S.size(); j++) { if (S.at(j) == 'A' || S.at(j) == 'C' || S.at(j) == 'G' || S.at(j) == 'T' || S.at(j) == ' ') { count++; } else break; } } if (count > max) max = count; count = 0; } if (max == -1) cout << 0 << endl; else { cout << max << endl; } }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove", "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
900,779
900,778
u690326065
cpp
p03086
#include <algorithm> #include <iostream> #include <string> int main() { std::string s; std::cin >> s; int mlen = 0; for (int i = 0; i < s.size() - 1; i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { int l = 1; for (int j = i + 1; j < s.size(); j++) { if (s[j] == 'A' || s[j] == 'T' || s[j] == 'G' || s[j] == 'C') { l++; } else { i = j - 1; break; } } mlen = std::max(mlen, l); } } std::cout << mlen << std::endl; return 0; }
#include <algorithm> #include <iostream> #include <string> int main() { std::string s; std::cin >> s; int mlen = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { int l = 1; for (int j = i + 1; j < s.size(); j++) { if (s[j] == 'A' || s[j] == 'T' || s[j] == 'G' || s[j] == 'C') { l++; } else { i = j - 1; break; } } mlen = std::max(mlen, l); } } std::cout << mlen << std::endl; return 0; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,782
900,783
u922974720
cpp
p03086
#include <bits/stdc++.h> using namespace std; // iterator #define REP(i, init, n) for (lli i = init; i < n; i++) #define REPE(i, init, n) for (lli i = init; i <= n; i++) #define REPIT(it, container) \ for (auto it = container.begin(); it != container.end(); it++) #define REPIT_R(it, container) \ for (auto it = container.rbegin(); it != container.rend(); it++) // input #define cin1(x) cin >> x #define cin2(x, y) cin >> x >> y #define cin3(x, y, z) cin >> x >> y >> z #define ncin1(n, x) \ REP(i, 0, n) { cin1(x[i]); } #define ncin2(n, x, y) \ REP(i, 0, n) { cin2(x[i], y[i]); } #define ncin3(n, x, y, z) \ REP(i, 0, n) { cin3(x[i], y[i], z[i]); } // output #define cout1(x) cout << #x << ": " << x << endl; #define cout2(x, y) cout << #x << ": " << x << ", " << #y << ": " << y << endl; #define cout3(x, y, z) \ cout << #x << ": " << x << ", " << #y << ": " << y << ", " << #z << ": " \ << z << endl; \ ; #define ncout1(n, x) \ REP(i, 0, n) { cout << #x << "[" << i << "]: " << x[i] << endl; } // sort #define sort_r(x, y) sort(x, y, greater<lli>()); // 降順(5,4,3,,,) #define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0])) typedef long long int lli; typedef pair<lli, lli> P; typedef tuple<lli, lli, lli> tup; int main() { string s; cin1(s); lli ans = 0; lli count = 0; REP(i, 0, s.length()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { count++; } else { ans = max(ans, count); count = 0; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; // iterator #define REP(i, init, n) for (lli i = init; i < n; i++) #define REPE(i, init, n) for (lli i = init; i <= n; i++) #define REPIT(it, container) \ for (auto it = container.begin(); it != container.end(); it++) #define REPIT_R(it, container) \ for (auto it = container.rbegin(); it != container.rend(); it++) // input #define cin1(x) cin >> x #define cin2(x, y) cin >> x >> y #define cin3(x, y, z) cin >> x >> y >> z #define ncin1(n, x) \ REP(i, 0, n) { cin1(x[i]); } #define ncin2(n, x, y) \ REP(i, 0, n) { cin2(x[i], y[i]); } #define ncin3(n, x, y, z) \ REP(i, 0, n) { cin3(x[i], y[i], z[i]); } // output #define cout1(x) cout << #x << ": " << x << endl; #define cout2(x, y) cout << #x << ": " << x << ", " << #y << ": " << y << endl; #define cout3(x, y, z) \ cout << #x << ": " << x << ", " << #y << ": " << y << ", " << #z << ": " \ << z << endl; \ ; #define ncout1(n, x) \ REP(i, 0, n) { cout << #x << "[" << i << "]: " << x[i] << endl; } // sort #define sort_r(x, y) sort(x, y, greater<lli>()); // 降順(5,4,3,,,) #define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0])) typedef long long int lli; typedef pair<lli, lli> P; typedef tuple<lli, lli, lli> tup; int main() { string s; cin1(s); lli ans = 0; lli count = 0; REP(i, 0, s.length()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { count++; } else { ans = max(ans, count); count = 0; } } cout << max(ans, count) << endl; }
[ "call.add", "call.arguments.add" ]
900,788
900,789
u058297300
cpp
p03086
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { string s; cin >> s; int ans = 0; int tmp = 0; rep(i, s.size()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') tmp++; else { if (tmp > ans) ans = tmp; tmp = 0; } } cout << ans; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { string s; cin >> s; int ans = 0; int tmp = 0; rep(i, s.size()) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { tmp++; if (tmp > ans) ans = tmp; } else { tmp = 0; } } cout << ans; }
[ "control_flow.branch.else.add" ]
900,793
900,794
u741134767
cpp
p03086
#include <algorithm> #include <bits/stdc++.h> #include <iostream> using namespace std; int main() { string s; cin >> s; int ans = 0; int cnt = 0; for (int i = 0; i < s.size() - 1; i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { cnt++; ans = max(ans, cnt); } else { cnt = 0; } } cout << ans << endl; return 0; }
#include <algorithm> #include <bits/stdc++.h> #include <iostream> using namespace std; int main() { string s; cin >> s; int ans = 0; int cnt = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { cnt++; ans = max(ans, cnt); } else { cnt = 0; } } cout << ans << endl; return 0; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,801
900,802
u835561357
cpp
p03086
#include <bits/stdc++.h> using namespace std; #define ll long long #define INF 99999999 #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() int main() { string a; cin >> a; int ans = 0; int tmp = 0; bool flag = false; const string b = "ATGC"; rep(i, a.size()) { if (!flag) tmp = 0; flag = false; rep(j, b.size()) { if (a[i] == b[j]) { flag = true; tmp++; break; } } if (!flag) ans = max(ans, tmp); } if (!flag) ans = max(ans, tmp); cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; #define ll long long #define INF 99999999 #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() int main() { string a; cin >> a; int ans = 0; int tmp = 0; bool flag = false; const string b = "ATGC"; rep(i, a.size()) { if (!flag) tmp = 0; flag = false; rep(j, b.size()) { if (a[i] == b[j]) { flag = true; tmp++; break; } } if (!flag) ans = max(ans, tmp); } ans = max(ans, tmp); cout << ans << endl; }
[]
900,803
900,804
u730271001
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 0; int cnt = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') ans++; if (cnt < ans) cnt = ans; else ans = 0; } cout << cnt << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int ans = 0; int cnt = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { ans++; if (cnt < ans) { cnt = ans; } } else { ans = 0; } } cout << cnt << endl; }
[]
900,805
900,806
u374190629
cpp
p03086
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define loop(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define debug(x) cout << #x << " = " << (x) << endl; using namespace std; using LL = long long int; using ULL = unsigned long long; int main() { string s; cin >> s; int n = s.size(); int max_length = 0; rep(i, n - 1) { loop(j, 1, n) { string sub = s.substr(i, j); bool ok = true; for (auto x : sub) { if (x != 'A' and x != 'C' and x != 'G' and x != 'T') { ok = false; } } if (ok) { max_length = max(max_length, (int)sub.size()); } } } cout << max_length << endl; return 0; }
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define loop(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define debug(x) cout << #x << " = " << (x) << endl; using namespace std; using LL = long long int; using ULL = unsigned long long; int main() { string s; cin >> s; int n = s.size(); int max_length = 0; rep(i, n) { loop(j, 1, n + 1) { string sub = s.substr(i, j); bool ok = true; for (auto x : sub) { if (x != 'A' and x != 'C' and x != 'G' and x != 'T') { ok = false; } } if (ok) { max_length = max(max_length, (int)sub.size()); } } } cout << max_length << endl; return 0; }
[ "expression.operation.binary.remove" ]
900,819
900,820
u614063956
cpp
p03086
#include <bits/stdc++.h> #define repeat(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { string S; cin >> S; int count = 0; int ans = 0; repeat(i, S.length() - 1) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { count++; } else { count = 0; } ans = max(count, ans); } cout << ans << endl; }
#include <bits/stdc++.h> #define repeat(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { string S; cin >> S; int count = 0; int ans = 0; repeat(i, S.length()) { if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') { count++; } else { count = 0; } ans = max(count, ans); } cout << ans << endl; }
[ "expression.operation.binary.remove" ]
900,840
900,841
u726060136
cpp
p03086
#define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define sz(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() #define mp make_pair #define pb push_back #define Cout(x) cout << (x) << endl #define Cout2(x, y) cout << (x) << " " << (y) << endl #define dump(x) cerr << #x << " = " << (x) << endl; typedef long long LL; typedef vector<int> VI; typedef vector<LL> VL; typedef vector<string> VS; typedef vector<bool> VB; typedef vector<vector<int>> VVI; typedef pair<int, int> PII; const int inf = 1e9; const double pi = acos(-1.0); bool check(string s) { bool ret = true; rep(i, sz(s)) { if (s[i] != 'A' && s[i] != 'C' && s[i] != 'G' && s[i] != 'T') ret = false; } return ret; } int main() { string s; cin >> s; int n = sz(s); int ans = 0; rep(i, n) { FOR(j, i + 1, n) { if (check(s.substr(i, j - i + 1))) ans = max(ans, j - i + 1); } } Cout(ans); }
#define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define sz(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() #define mp make_pair #define pb push_back #define Cout(x) cout << (x) << endl #define Cout2(x, y) cout << (x) << " " << (y) << endl #define dump(x) cerr << #x << " = " << (x) << endl; typedef long long LL; typedef vector<int> VI; typedef vector<LL> VL; typedef vector<string> VS; typedef vector<bool> VB; typedef vector<vector<int>> VVI; typedef pair<int, int> PII; const int inf = 1e9; const double pi = acos(-1.0); bool check(string s) { bool ret = true; rep(i, sz(s)) { if (s[i] != 'A' && s[i] != 'C' && s[i] != 'G' && s[i] != 'T') ret = false; } return ret; } int main() { string s; cin >> s; int n = sz(s); int ans = 0; rep(i, n) { FOR(j, i, n) { if (check(s.substr(i, j - i + 1))) ans = max(ans, j - i + 1); // dump(s.substr(i, j - i + 1)); } } Cout(ans); }
[ "expression.operation.binary.remove" ]
900,858
900,859
u172873334
cpp
p03086
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <fstream> #include <iomanip> #include <map> #include <queue> #include <stack> #include <string> #include <typeinfo> #include <vector> #define REP(i, n) for (int i = 0; i < n; i++) #define REP2(i, s, n) for (int i = s; i < n; i++) #define REP_1(i, n) for (int i = 1; i < n + 1; i++) #define bitSearch(bit, n) for (int bit = 0; bit < (1 << N); bit++) using namespace std; void printAns(long long a) { cout << a << endl; } void yesno(bool a) { if (a) cout << "Yes" << endl; else cout << "No" << endl; } void YESNO(bool a) { if (a) cout << "YES" << endl; else cout << "NO" << endl; } typedef long long ll; typedef unsigned long ul; typedef long double ld; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } // ll INF = 10000000; // ll mod = 1000000007;//10^9+7 // using Graph = vector<vector<pair<int, int>>>; // Graph G(100100); //番号ズレ注意!! int main() { string S; cin >> S; int N = S.size(); int ans = 0; int length = 0; REP(i, N) { if (S[i] != 'A' && S[i] != 'T' && S[i] != 'G' && S[i] != 'C') { chmax(ans, length); length = 0; continue; } else { length++; } if (i == N) { chmax(ans, length); } } cout << ans << endl; }
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <fstream> #include <iomanip> #include <map> #include <queue> #include <stack> #include <string> #include <typeinfo> #include <vector> #define REP(i, n) for (int i = 0; i < n; i++) #define REP2(i, s, n) for (int i = s; i < n; i++) #define REP_1(i, n) for (int i = 1; i < n + 1; i++) #define bitSearch(bit, n) for (int bit = 0; bit < (1 << N); bit++) using namespace std; void printAns(long long a) { cout << a << endl; } void yesno(bool a) { if (a) cout << "Yes" << endl; else cout << "No" << endl; } void YESNO(bool a) { if (a) cout << "YES" << endl; else cout << "NO" << endl; } typedef long long ll; typedef unsigned long ul; typedef long double ld; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } // ll INF = 10000000; // ll mod = 1000000007;//10^9+7 // using Graph = vector<vector<pair<int, int>>>; // Graph G(100100); //番号ズレ注意!! int main() { string S; cin >> S; int N = S.size(); int ans = 0; int length = 0; REP(i, N) { if (S[i] != 'A' && S[i] != 'T' && S[i] != 'G' && S[i] != 'C') { chmax(ans, length); length = 0; continue; } else { length++; } if (i == N - 1) { chmax(ans, length); } } cout << ans << endl; }
[ "control_flow.branch.if.condition.change" ]
900,860
900,861
u741556152
cpp
p03086
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #include <cmath> typedef long long ll; using namespace std; vector<int> arr; stack<int> st; queue<int> qu; queue<pair<int, int>> qu2; priority_queue<int> pq; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, n) for (int i = 1; i <= (int)(n); i++) typedef set<int> set_t; typedef set<string> set_g; typedef complex<double> xy_t; static const int NIL = -1; /*int P[10010]; void init(int n){ for(int i=0;i<n;++i)P[i]=i; } int root(int a) { if(P[a]==a)return a; return (P[a]=root(P[a])); } bool is_same_set(int a,int b){ return root(a) == root(b);//代表元を求める } void unite(int a,int b){ P[root(a)]=root(b); }//対set,グラフ? //セグメント木??? */ double dot_product(xy_t a, xy_t b) { return (conj(a) * b).real(); } //内積 double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } //外積 xy_t projection(xy_t p, xy_t b) { return b * dot_product(p, b) / norm(b); } //投影 //対図形 #define mod 1000000007 /*ll f[2001]; //int n,k とかしておく ll pw(ll x, ll y){//euclidの互除法より ll a= 1; while(y){ if(y&1){//奇数なら a = a*x%mod; } x = x*x%mod; y /= 2; } return a; } ll modinv(ll x){//逆元を求める return pw(x, mod - 2 ); } ll comb(int n,int r){ if(n<r){ return 0; } return f[n] * modinv(f[r])%mod*modinv(f[n-r])%mod; }//対combination//ただしfは用意してね */ struct BIT { vector<int> dat; int sz; BIT(int n) { for (sz = 1; sz < n; sz *= 2) ; dat.resize(++sz); } int q(int n) { int ret = 0; for (int i = n; i > 0; i -= i & -i) ret += dat[i]; //和の計算 iから最後の1のbit(i&-i 多分&はビット積)を減算 for (int i = n; i < sz; i += i & -i) dat[i]++; //値の加算 iから最後mの1のbitを加算 return ret; } }; int main() { string s; cin >> s; int n = s.size(); int a[n + 1], m, p; a[0] = 0; rep(i, n) { if (s[i] == 'A' || s[i] == 'G' || s[i] == 'C' || s[i] == 'T') { a[i + 1] = a[i] + 1; } else { a[i + 1] = 0; } if (m < a[i + 1]) { m = a[i + 1]; p = i + 1; } } cout << m << endl; return 0; }
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #include <cmath> typedef long long ll; using namespace std; vector<int> arr; stack<int> st; queue<int> qu; queue<pair<int, int>> qu2; priority_queue<int> pq; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, n) for (int i = 1; i <= (int)(n); i++) typedef set<int> set_t; typedef set<string> set_g; typedef complex<double> xy_t; static const int NIL = -1; /*int P[10010]; void init(int n){ for(int i=0;i<n;++i)P[i]=i; } int root(int a) { if(P[a]==a)return a; return (P[a]=root(P[a])); } bool is_same_set(int a,int b){ return root(a) == root(b);//代表元を求める } void unite(int a,int b){ P[root(a)]=root(b); }//対set,グラフ? //セグメント木??? */ double dot_product(xy_t a, xy_t b) { return (conj(a) * b).real(); } //内積 double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } //外積 xy_t projection(xy_t p, xy_t b) { return b * dot_product(p, b) / norm(b); } //投影 //対図形 #define mod 1000000007 /*ll f[2001]; //int n,k とかしておく ll pw(ll x, ll y){//euclidの互除法より ll a= 1; while(y){ if(y&1){//奇数なら a = a*x%mod; } x = x*x%mod; y /= 2; } return a; } ll modinv(ll x){//逆元を求める return pw(x, mod - 2 ); } ll comb(int n,int r){ if(n<r){ return 0; } return f[n] * modinv(f[r])%mod*modinv(f[n-r])%mod; }//対combination//ただしfは用意してね */ struct BIT { vector<int> dat; int sz; BIT(int n) { for (sz = 1; sz < n; sz *= 2) ; dat.resize(++sz); } int q(int n) { int ret = 0; for (int i = n; i > 0; i -= i & -i) ret += dat[i]; //和の計算 iから最後の1のbit(i&-i 多分&はビット積)を減算 for (int i = n; i < sz; i += i & -i) dat[i]++; //値の加算 iから最後mの1のbitを加算 return ret; } }; int main() { string s; cin >> s; int n = s.size(); int a[n + 1], m = 0, p; a[0] = 0; rep(i, n) { if (s[i] == 'A' || s[i] == 'G' || s[i] == 'C' || s[i] == 'T') { a[i + 1] = a[i] + 1; } else { a[i + 1] = 0; } if (m < a[i + 1]) { m = a[i + 1]; p = i + 1; } } cout << m << endl; return 0; }
[ "variable_declaration.value.change" ]
900,862
900,863
u300866293
cpp
p03086
#pragma GCC optimize("O3") #pragma GCC target("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) #define FORd(i, a, b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define f first #define s second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define shandom_ruffle random_shuffle const int MOD = 1000000007; const ll INF = 1e18; const int MX = 100001; // check the limits, dummy bool getBond(char c) { if (c == 'A') return true; if (c == 'T') return true; if (c == 'G') return true; if (c == 'C') return true; return false; } bool isGood(string s) { F0R(i, s.length()) if (!getBond(s[i])) return false; return true; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); string s; cin >> s; int ans = 0; F0Rd(i, s.length() + 1) { F0R(j, s.length() - i) if (isGood(s.substr(j, i))) { cout << i << endl; return 0; } } return 0; } // read the question correctly (ll vs int) // template by super1 derived from bqi343
#pragma GCC optimize("O3") #pragma GCC target("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) #define FORd(i, a, b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define f first #define s second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define shandom_ruffle random_shuffle const int MOD = 1000000007; const ll INF = 1e18; const int MX = 100001; // check the limits, dummy bool getBond(char c) { if (c == 'A') return true; if (c == 'T') return true; if (c == 'G') return true; if (c == 'C') return true; return false; } bool isGood(string s) { F0R(i, s.length()) if (!getBond(s[i])) return false; return true; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); string s; cin >> s; int ans = 0; F0Rd(i, s.length() + 1) { F0R(j, s.length() - i + 1) if (isGood(s.substr(j, i))) { cout << i << endl; return 0; } } return 0; } // read the question correctly (ll vs int) // template by super1 derived from bqi343
[ "expression.operation.binary.add" ]
900,868
900,869
u422558819
cpp
p03086
#pragma GCC optimize("O3") #pragma GCC target("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) #define FORd(i, a, b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define f first #define s second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define shandom_ruffle random_shuffle const int MOD = 1000000007; const ll INF = 1e18; const int MX = 100001; // check the limits, dummy bool getBond(char c) { if (c == 'A') return true; if (c == 'T') return true; if (c == 'G') return true; if (c == 'C') return true; return false; } bool isGood(string s) { F0R(i, s.length()) if (!getBond(s[i])) return false; return true; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); string s; cin >> s; int ans = 0; F0Rd(i, s.length()) { F0R(j, s.length() - i) if (isGood(s.substr(j, i))) { cout << i << endl; return 0; } } return 0; } // read the question correctly (ll vs int) // template by super1 derived from bqi343
#pragma GCC optimize("O3") #pragma GCC target("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) #define FORd(i, a, b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define f first #define s second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define shandom_ruffle random_shuffle const int MOD = 1000000007; const ll INF = 1e18; const int MX = 100001; // check the limits, dummy bool getBond(char c) { if (c == 'A') return true; if (c == 'T') return true; if (c == 'G') return true; if (c == 'C') return true; return false; } bool isGood(string s) { F0R(i, s.length()) if (!getBond(s[i])) return false; return true; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); string s; cin >> s; int ans = 0; F0Rd(i, s.length() + 1) { F0R(j, s.length() - i + 1) if (isGood(s.substr(j, i))) { cout << i << endl; return 0; } } return 0; } // read the question correctly (ll vs int) // template by super1 derived from bqi343
[ "expression.operation.binary.add" ]
900,870
900,869
u422558819
cpp
p03086
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string S; int ans = 0; cin >> S; for (int i = 0; i < S.length(); i++) { int cnt = 0; for (int j = i; j < S.length() - i; j++) { if (S[j] == 'A' || S[j] == 'C' || S[j] == 'G' || S[j] == 'T') { cnt++; } else break; } if (ans < cnt) ans = cnt; } cout << ans << endl; }
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string S; int ans = 0; cin >> S; for (int i = 0; i < S.length(); i++) { int cnt = 0; for (int j = i; j < S.length(); j++) { if (S[j] == 'A' || S[j] == 'C' || S[j] == 'G' || S[j] == 'T') { cnt++; } else break; } if (ans < cnt) ans = cnt; } cout << ans << endl; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,879
900,880
u243701707
cpp
p03086
#include <algorithm> #include <cstdlib> #include <iomanip> //小数点以下を表示させる(setprecision()) #include <iostream> //入出力 #include <list> #include <map> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string> #include <vector> //#include <bits/stdc++.h> using namespace std; typedef long long ll; // 64bit型 #define debug(x) \ cerr << x << " " \ << "(L:" << __LINE__ << ")" << '\n' #define PRINT(V) \ { \ for (int i = 0; i < V.size(); i++) { \ cout << V[i] << " "; \ } \ cout << endl; \ } int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } int main() { string S; cin >> S; string T = "ACGT"; int now = 0; int ans = -1; for (int i = 0; i < S.size(); i++) { bool ok = false; for (int j = 0; j < T.size(); j++) { if (S[i] == T[j]) { ok = true; } } if (!ok) { now = 0; } else { now++; ans = max(now, ans); } } cout << ans << endl; return 0; }
#include <algorithm> #include <cstdlib> #include <iomanip> //小数点以下を表示させる(setprecision()) #include <iostream> //入出力 #include <list> #include <map> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string> #include <vector> //#include <bits/stdc++.h> using namespace std; typedef long long ll; // 64bit型 #define debug(x) \ cerr << x << " " \ << "(L:" << __LINE__ << ")" << '\n' #define PRINT(V) \ { \ for (int i = 0; i < V.size(); i++) { \ cout << V[i] << " "; \ } \ cout << endl; \ } int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } int main() { string S; cin >> S; string T = "ACGT"; int now = 0; int ans = 0; for (int i = 0; i < S.size(); i++) { bool ok = false; for (int j = 0; j < T.size(); j++) { if (S[i] == T[j]) { ok = true; } } if (!ok) { now = 0; } else { now++; ans = max(now, ans); } } cout << ans << endl; return 0; }
[ "literal.number.change", "variable_declaration.value.change" ]
900,885
900,886
u966508131
cpp
p03086
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int count = 0; int max_count = 0; for (int i = 0; i < S.size(); i++) { if (S.at(i) == 'A' || S.at(i) == 'T' || S.at(i) == 'G' || S.at(i) == 'C') { count++; } else { max_count = max(max_count, count); count = 0; } } cout << max_count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int count = 0; int max_count = 0; for (int i = 0; i < S.size(); i++) { if (S.at(i) == 'A' || S.at(i) == 'T' || S.at(i) == 'G' || S.at(i) == 'C') { count++; } else { max_count = max(max_count, count); count = 0; } } cout << max(max_count, count) << endl; }
[ "call.add", "call.arguments.add" ]
900,895
900,896
u536916602
cpp
p03086
#include <algorithm> #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int cnt = 0; int max_cnt = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { cnt++; } else { max_cnt = max(max_cnt, cnt); cnt = 0; } } cout << max_cnt; return 0; }
#include <algorithm> #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int cnt = 0; int max_cnt = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') { cnt++; } else { max_cnt = max(max_cnt, cnt); cnt = 0; } } cout << max(max_cnt, cnt); return 0; }
[ "call.add", "call.arguments.add" ]
900,899
900,900
u066855390
cpp
p03086
#include <iostream> #include <string> using namespace std; int main() { string str; int N = 0, max = 0; cin >> str; for (int i = 0; i < str.length(); i++) { if ((str[i] == 'A') || (str[i] == 'T') || (str[i] == 'G') || (str[i] == 'C')) { N++; } else { if (max <= N) { max = N; N = 0; } } } cout << max << endl; return 0; }
#include <iostream> #include <string> using namespace std; int main() { string str; int N = 0, max = 0; cin >> str; for (int i = 0; i <= str.length(); i++) { if ((str[i] == 'A') || (str[i] == 'T') || (str[i] == 'G') || (str[i] == 'C')) { N++; } else { if (max <= N) { max = N; N = 0; } } } cout << max << endl; return 0; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
900,914
900,915
u565624841
cpp
p03086
#include <cstring> #include <iostream> using namespace std; int main() { string s; cin >> s; int max = 0; for (int i = 0; i < (s.size()) - 1; i++) { int t = 0; if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { t++; for (int j = i + 1; j < s.size(); j++) { if (s[j] == 'A' || s[j] == 'C' || s[j] == 'G' || s[j] == 'T') { t++; } else { break; } } } if (max < t) { max = t; } } cout << max << endl; return 0; }
#include <cstring> #include <iostream> using namespace std; int main() { string s; cin >> s; int max = 0; int t; for (int i = 0; i < (s.size()); i++) { t = 0; if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { t++; for (int j = i + 1; j < s.size(); j++) { if (s[j] == 'A' || s[j] == 'C' || s[j] == 'G' || s[j] == 'T') { t++; } else { break; } } } if (max < t) { max = t; } } cout << max << endl; return 0; }
[ "variable_declaration.add", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,918
900,919
u915768086
cpp
p03086
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main() { ll cnt = 0; ll ans = 0; string s; cin >> s; for (ll i = 0; i < s.size() - 1; i++) { if (s[i] != 'A' && s[i] != 'C' && s[i] != 'G' && s[i] != 'T') { ans = max(ans, cnt); cnt = 0; } else cnt++; } ans = max(ans, cnt); cout << ans << endl; }
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main() { ll cnt = 0; ll ans = 0; string s; cin >> s; for (ll i = 0; i < s.size(); i++) { if (s[i] != 'A' && s[i] != 'C' && s[i] != 'G' && s[i] != 'T') { ans = max(ans, cnt); cnt = 0; } else cnt++; } ans = max(ans, cnt); cout << ans << endl; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
900,922
900,923
u530497183
cpp