problem_id
stringlengths
6
6
language
stringclasses
2 values
original_status
stringclasses
3 values
original_src
stringlengths
19
243k
changed_src
stringlengths
19
243k
change
stringclasses
3 values
i1
int64
0
8.44k
i2
int64
0
8.44k
j1
int64
0
8.44k
j2
int64
0
8.44k
error
stringclasses
270 values
stderr
stringlengths
0
226k
p02720
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define rep(i, a, b) for (int i = a; i < b; i++) #define repA(i, a, b) for (ll i = a; i <= b; i++) #define repD(i, b, a) for (int i = b; i >= a; i--) #define fill(a) memset(a, 0, sizeof(a)) #define f first #define s second typedef l...
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define rep(i, a, b) for (int i = a; i < b; i++) #define repA(i, a, b) for (ll i = a; i <= b; i++) #define repD(i, b, a) for (int i = b; i >= a; i--) #define fill(a) memset(a, 0, sizeof(a)) #define f first #define s second typedef l...
replace
20
21
20
21
0
p02720
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i <= (b); i++) #define rng(a) a.begin(), a.end() #define ina(n, a) \ cin >> n; \ for (int i = 1; i <= n; i++) ...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (a); i <= (b); i++) #define rng(a) a.begin(), a.end() #define ina(n, a) \ cin >> n; \ for (int i = 1; i <= n; i++) ...
insert
50
50
50
62
TLE
p02720
C++
Runtime Error
/** * Author: @glaucoacassioc * Created on 11.09.2020, 15:32:16 **/ #include <bits/stdc++.h> #define INF 1000000000 using namespace std; typedef long long int ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; vector<vii> AdjList; vi pai, color, dist, ts; ll vals[1000002]; ll max...
/** * Author: @glaucoacassioc * Created on 11.09.2020, 15:32:16 **/ #include <bits/stdc++.h> #define INF 1000000000 using namespace std; typedef long long int ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; vector<vii> AdjList; vi pai, color, dist, ts; ll vals[1000002]; ll max...
insert
21
21
21
26
-11
p02720
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <stdio.h> #include <vector> using namespace std; #define int long long #define double long double #define rep(s, i, n) for (int i = s; i < n; i++) #define c(n) cout << n << endl; #define ic(n) ...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <stdio.h> #include <vector> using namespace std; #define int long long #define double long double #define rep(s, i, n) for (int i = s; i < n; i++) #define c(n) cout << n << endl; #define ic(n) ...
replace
153
154
153
154
-11
p02720
C++
Runtime Error
#define ll long long #define pub push_back #define pob pop_back #define puf push_front #define pof pop_front #define mp make_pair #define fo(i, n) for (ll i = 0; i < n; i++) // #include<bits/stdc++.h> #include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include ...
#define ll long long #define pub push_back #define pob pop_back #define puf push_front #define pof pop_front #define mp make_pair #define fo(i, n) for (ll i = 0; i < n; i++) // #include<bits/stdc++.h> #include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include ...
replace
152
157
152
157
0
p02720
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<long long> vll; typedef pair<int, int> pii; typedef pair<long long, int> pli; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() ll mod =...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<long long> vll; typedef pair<int, int> pii; typedef pair<long long, int> pli; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() ll mod =...
insert
21
21
21
25
0
p02720
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC optimize(3) #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma comment(linker, "/stack:200000000") #include <bits/stdc++.h> #define rep(i, a, b) for (long long i = a; i <= b; ++i) #define mp make_pair #define ll...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC optimize(3) #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma comment(linker, "/stack:200000000") #include <bits/stdc++.h> #define rep(i, a, b) for (long long i = a; i <= b; ++i) #define mp make_pair #define ll...
replace
50
51
50
51
-6
terminate called after throwing an instance of 'std::out_of_range' what(): stoi
p02720
C++
Runtime Error
#include <bits/stdc++.h> #define MOD 1000000007 using namespace std; typedef long long ll; int main() { #ifndef ONLINE_JUDGE // for getting input from input.txt freopen("input.txt", "r", stdin); // for writing output to output.txt freopen("output.txt", "w", stdout); #endif ios_base::sync_with_stdio(false);...
#include <bits/stdc++.h> #define MOD 1000000007 using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); queue<ll> numbers; for (ll i = 1; i <= 9; i++) numbers.push(i); ll k; cin >> k; while (k > 1) { // cout<<numbers.front()<<endl; ll curr =...
delete
6
13
6
6
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02720
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i < (n); i++) int main() { int K; cin >> K; vector<ll> lun(K + 3); rep1(i, 10) { lun[i] = i; } int i = 1, j = 10; while (j <= K) { int r = lun[i] % ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i < (n); i++) int main() { int K; cin >> K; vector<ll> lun(max(11, K + 3)); rep1(i, 10) { lun[i] = i; } int i = 1, j = 10; while (j <= K) { int r = ...
replace
11
12
11
12
0
p02720
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int k, i = -1; vector<long long> vec = {}; void dfs(long long x, int a) { vec.push_back(x); if (x > 10000000) return; if (x == 0) { for (int j = 1; j < 10; j++) { dfs(j, j); } } else { if (a != 0 && a != 9) { dfs(10 * x + a - 1, a - 1); ...
#include <bits/stdc++.h> using namespace std; int k, i = -1; vector<long long> vec = {}; void dfs(long long x, int a) { vec.push_back(x); if (x > 1000000000) return; if (x == 0) { for (int j = 1; j < 10; j++) { dfs(j, j); } } else { if (a != 0 && a != 9) { dfs(10 * x + a - 1, a - 1);...
replace
6
7
6
7
0
p02720
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; typedef long long ll; #define bay_bay return 0; #define fori(n) for (int i = 0; i < n; ++i) #define for1(n) for (int i = 1; i <= n; i += 3) #define all(v) ((v).begin()), ((v).end()) #define sz...
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; typedef long long ll; #define bay_bay return 0; #define fori(n) for (int i = 0; i < n; ++i) #define for1(n) for (int i = 1; i <= n; i += 3) #define all(v) ((v).begin()), ((v).end()) #define sz...
replace
48
49
48
49
0
p02720
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define forn(i, n) for (int i = 0; i < int(n); i++) #define fore(i, l, r) for (int i = int(l); i < int(r); i++) #define pb push_back #define deb(x) cout << #x << " " << x << endl; #define deb2(x, y) cout << #x << " " << x << " " << #y << " " << y << endl; #define deb3(x, y,...
#include <bits/stdc++.h> using namespace std; #define forn(i, n) for (int i = 0; i < int(n); i++) #define fore(i, l, r) for (int i = int(l); i < int(r); i++) #define pb push_back #define deb(x) cout << #x << " " << x << endl; #define deb2(x, y) cout << #x << " " << x << " " << #y << " " << y << endl; #define deb3(x, y,...
replace
83
84
83
84
0
p02720
C++
Runtime Error
#include <bits/stdc++.h> #include <cassert> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; const long long MOD = 1000000007; const long long INF = 1LL << 60; const int INT_INF = 1000000000; // int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int d...
#include <bits/stdc++.h> #include <cassert> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; const long long MOD = 1000000007; const long long INF = 1LL << 60; const int INT_INF = 1000000000; // int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int d...
replace
27
28
27
28
0
p02720
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; int main() { int n; cin >> n; long long arr[100001]; int ind1, ind2; ind1 = 0; ind2 = 1; for (int i = 1; i < 10; i++) { arr[i] = i; ind1++; } ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; int main() { int n; cin >> n; long long arr[100001]; int ind1, ind2; ind1 = 0; ind2 = 1; for (int i = 1; i < 10; i++) { arr[i] = i; ind1++; } ...
replace
36
37
36
37
-6
*** stack smashing detected ***: terminated
p02720
C++
Runtime Error
#include <deque> #include <iostream> #include <string> #include <vector> using namespace std; int main() { long long K; cin >> K; deque<long long> d; if (K <= 10) return K; // init for (int i = 1; i <= 9; ++i) { d.emplace_back(i); } long long cnt = 0; while (true) { cnt++; if (cn...
#include <deque> #include <iostream> #include <string> #include <vector> using namespace std; int main() { long long K; cin >> K; deque<long long> d; // init for (int i = 1; i <= 9; ++i) { d.emplace_back(i); } long long cnt = 0; while (true) { cnt++; if (cnt == K) break; long ...
delete
11
14
11
11
0
p02720
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; vector<long long> v; void dfs(ll x, ll num, ll st, ll cc) { if (v.size() > 100050) return; if (num == 0) num += x; else { num *= 10; num += x; } if (cc > st) return; if (cc == st) { v.push_back(num); return; }...
#include <bits/stdc++.h> using namespace std; typedef long long ll; vector<long long> v; void dfs(ll x, ll num, ll st, ll cc) { if (v.size() > 100050) return; if (num == 0) num += x; else { num *= 10; num += x; } if (cc > st) return; if (cc == st) { v.push_back(num); return; }...
replace
32
33
32
33
0
p02720
C++
Runtime Error
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = 1; i < (int)(n); i++) #define dunk(n) cout << n << endl #define all(a) (a).begin(), (a).end() typedef pair<int, int> P; typedef long long ll; vector<ll> lun; void d...
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = 1; i < (int)(n); i++) #define dunk(n) cout << n << endl #define all(a) (a).begin(), (a).end() typedef pair<int, int> P; typedef long long ll; vector<ll> lun; void d...
delete
28
29
28
28
-6
/usr/include/c++/12/debug/vector:442: In function: std::debug::vector<_Tp, _Allocator>::reference std::debug::vector<_Tp, _Allocator>::operator[](size_type) [with _Tp = long long int; _Allocator = std::allocator<long long int>; reference = long long int&; size_type = long unsigned int] Error: attemp...
p02720
C++
Runtime Error
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <string> using namespace std; typedef long long ll; const int INF = 100; typedef pair<int, int> P; const int ld = 10; int main() { int n; cin >> n; int a[ld]; fill(a, a + ld, 0); // cout<<n<<endl; int i = 0; while (i < n) {...
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <string> using namespace std; typedef long long ll; const int INF = 100; typedef pair<int, int> P; const int ld = 10; int main() { int n; cin >> n; int a[ld]; fill(a, a + ld, 0); // cout<<n<<endl; int i = 0; while (i < n) {...
replace
30
31
30
31
-6
*** stack smashing detected ***: terminated
p02720
C++
Runtime Error
#include <bits/stdc++.h> #include <unordered_map> using namespace std; typedef long long int ll; typedef long double ld; #define REP(i, n) for (ll i = 0LL; i < (ll)(n); i++) #define REPR(i, n) for (ll i = (ll)(n)-1; i >= 0; i--) #define FOR(i, n, m) for (ll i = (ll)n; i < (ll)(m); i++) #define ALL(x) (x).begin(), (x)....
#include <bits/stdc++.h> #include <unordered_map> using namespace std; typedef long long int ll; typedef long double ld; #define REP(i, n) for (ll i = 0LL; i < (ll)(n); i++) #define REPR(i, n) for (ll i = (ll)(n)-1; i >= 0; i--) #define FOR(i, n, m) for (ll i = (ll)n; i < (ll)(m); i++) #define ALL(x) (x).begin(), (x)....
insert
61
61
61
62
0
p02720
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #include <vector> using namespace std; typedef long long int ll; #define EPS (1e-9...
#include <algorithm> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #include <vector> using namespace std; typedef long long int ll; #define EPS (1e-9...
replace
43
44
43
47
0
p02721
C++
Time Limit Exceeded
// #include <bits/stdc++.h> #include <algorithm> // sort, min/max, upper/lower_bound, transform, count/copy_if #include <array> #include <bitset> #include <cassert> #include <chrono> #include <complex> #include <cstring> #include <deque> #include <forward_list> #include <functional> #include <iomanip> // setprecision ...
// #include <bits/stdc++.h> #include <algorithm> // sort, min/max, upper/lower_bound, transform, count/copy_if #include <array> #include <bitset> #include <cassert> #include <chrono> #include <complex> #include <cstring> #include <deque> #include <forward_list> #include <functional> #include <iomanip> // setprecision ...
replace
223
226
223
255
TLE
p02721
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> using namespace std; typedef long long ll; #define M 100005 int sl[M], mp[M], vs[M]; char S[M]; inline void rd(int &l) { l = 0; int f = 0; char ch = getchar(); while (ch > '9' || ch < '0') { if (ch == '-') f = 1; ch = getchar(); } while...
#include <algorithm> #include <cstdio> #include <cstring> using namespace std; typedef long long ll; #define M 200005 int sl[M], mp[M], vs[M]; char S[M]; inline void rd(int &l) { l = 0; int f = 0; char ch = getchar(); while (ch > '9' || ch < '0') { if (ch == '-') f = 1; ch = getchar(); } while...
replace
5
6
5
6
0
p02721
C++
Runtime Error
/*dismint|jjc*/ #include <bits/stdc++.h> using namespace std; #define forl(V, S, E) for (int V = S; V < E; V++) #define ford(V, S, E) for (int V = S; V >= E; V--) #define fore(E, X) for (auto &E : X) #define println(X) cout << X << endl #define printe(X) \ ...
/*dismint|jjc*/ #include <bits/stdc++.h> using namespace std; #define forl(V, S, E) for (int V = S; V < E; V++) #define ford(V, S, E) for (int V = S; V >= E; V--) #define fore(E, X) for (auto &E : X) #define println(X) cout << X << endl #define printe(X) \ ...
replace
39
40
39
40
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rrep(i, n) for (int(i) = ((n)-1); (i) >= 0; (i)--) #define itn int #define miele(v) min_element(v.begin(), v.end()) #define maele(v) max_element(v.begin(), v.end()) #define SUM(v) accumulate(...
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define rrep(i, n) for (int(i) = ((n)-1); (i) >= 0; (i)--) #define itn int #define miele(v) min_element(v.begin(), v.end()) #define maele(v) max_element(v.begin(), v.end()) #define SUM(v) accumulate(...
insert
163
163
163
165
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ld long double #define F first #define S second // #define ONLINE_JUDGE 1 using namespace std; const int mod = 1e9 + 7; const int MAX = 100001; void pr(vector<int> v) { for (int x : v) { cout << x << " "; } cout << "\n"; } void solve() { int n, k, ...
#include <bits/stdc++.h> #define ll long long #define ld long double #define F first #define S second #define ONLINE_JUDGE 1 using namespace std; const int mod = 1e9 + 7; const int MAX = 100001; void pr(vector<int> v) { for (int x : v) { cout << x << " "; } cout << "\n"; } void solve() { int n, k, c; ...
replace
7
8
7
8
0
p02721
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <vector> using namespace std; char s[100010]; int a[100010], l[100010], r[100010], b[100010]; int n, k, c; int main() { scanf("%d%d%d", &n, &k, &c); scanf("%s", s); for (int i = 0; i < n; i++) { if (s[i] == 'x') a[i + 1] = 0; else ...
#include <algorithm> #include <cstdio> #include <cstring> #include <vector> using namespace std; char s[200010]; int a[200010], l[200010], r[200010], b[200010]; int n, k, c; int main() { scanf("%d%d%d", &n, &k, &c); scanf("%s", s); for (int i = 0; i < n; i++) { if (s[i] == 'x') a[i + 1] = 0; else ...
replace
6
8
6
8
0
p02721
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; const int maxn = 1e5 + 5; bool valid[maxn]; int l_minn[maxn], r_minn[maxn]; int main() { int n, k, c; scanf("%d%d%d", &n, &k, &c); char s; scanf("%c", &s); for (int i = 1; i <= n; i++) { scanf("%c", &s); ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> using namespace std; const int maxn = 2e5 + 5; bool valid[maxn]; int l_minn[maxn], r_minn[maxn]; int main() { int n, k, c; scanf("%d%d%d", &n, &k, &c); char s; scanf("%c", &s); for (int i = 1; i <= n; i++) { scanf("%c", &s); ...
replace
5
6
5
6
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define pb push_back #define F first #define S second #define int long long #define lint long long #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define sz(x) (int)x.size() #define all(x) begi...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define pb push_back #define F first #define S second #define int long long #define lint long long #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define sz(x) (int)x.size() #define all(x) begi...
replace
58
59
58
59
0
p02721
C++
Runtime Error
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; vector<int> a(2e5, 0), b(2e5, 0); for (int i = 0, cur = 0; i < n; i++) { if (s[i] == 'o') { a[cur++] = i; i += c; } } for (int i = n - 1, cu...
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; int a[200000]; int b[200000]; for (int i = 0, cur = 0; i < n; i++) { if (s[i] == 'o') { a[cur++] = i; i += c; } } for (int i = n - 1, cur ...
replace
10
11
10
12
0
p02721
C++
Runtime Error
#include <iostream> #include <limits> #include <map> #include <set> #include <sstream> #include <vector> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<pair<int, int>> vii; typedef stringstream ss; const int mii = numeric_limits<int>::min(); const int mai ...
#include <iostream> #include <limits> #include <map> #include <set> #include <sstream> #include <vector> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<pair<int, int>> vii; typedef stringstream ss; const int mii = numeric_limits<int>::min(); const int mai ...
replace
51
52
51
52
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int inf = 1000000; int n, k, c; string s; int main() { cin >> n >> k >> c >> s; vector<int> g1, g2; { int lst = -inf; int p = 0; for (int i = 0; i < n && p < k; ++i) { if (s[i] == 'o' && i > lst + c) { g1[p++] = i; lst = i; ...
#include <bits/stdc++.h> using namespace std; const int inf = 1000000; int n, k, c; string s; int main() { cin >> n >> k >> c >> s; vector<int> g1(k), g2(k); { int lst = -inf; int p = 0; for (int i = 0; i < n && p < k; ++i) { if (s[i] == 'o' && i > lst + c) { g1[p++] = i; lst = i...
replace
7
8
7
8
-11
p02721
C++
Runtime Error
#include <cstdio> int n, k, c, f[100003][2]; char s[200003]; int main() { scanf("%d%d%d%s", &n, &k, &c, s + 1); int i, j = 0; for (i = 1; i <= n; i++) { if (s[i] == 'o' && i > j) f[i][0] = f[i - 1][0] + 1, j = i + c; else f[i][0] = f[i - 1][0]; } j = n + 1; for (i = n; i >= 1; i--) { ...
#include <cstdio> int n, k, c, f[200003][2]; char s[200003]; int main() { scanf("%d%d%d%s", &n, &k, &c, s + 1); int i, j = 0; for (i = 1; i <= n; i++) { if (s[i] == 'o' && i > j) f[i][0] = f[i - 1][0] + 1, j = i + c; else f[i][0] = f[i - 1][0]; } j = n + 1; for (i = n; i >= 1; i--) { ...
replace
1
2
1
2
0
p02721
C++
Runtime Error
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; //----------------------- Print Function ----------------------// inline void print() { cout << endl; } template <typename First, typename... Rest> void print(const First &first, const Rest &...rest) { cout << first << ' '; print(rest...); }...
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; //----------------------- Print Function ----------------------// inline void print() { cout << endl; } template <typename First, typename... Rest> void print(const First &first, const Rest &...rest) { cout << first << ' '; print(rest...); }...
replace
96
97
96
97
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; 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;...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; 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;...
insert
48
48
48
50
0
p02721
C++
Time Limit Exceeded
/* #pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") */ #pragma GCC optimize("O3") #pragma GCC target("sse4") #define NDEBUG #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstring>...
/* #pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") */ #pragma GCC optimize("O3") #pragma GCC target("sse4") #define NDEBUG #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstring>...
replace
107
108
107
108
TLE
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; signed main() { int n, k, c; bool isWorkDays[200000]; cin >> n >> k >> c; for (int i = 0; i < n; i++) { char charaWork; cin >> charaWork; isWorkDays[i] = (charaWork == 'o'); } int holiday = c; int needsWorkAfter[100000]; int needsWorkBefore[10...
#include <bits/stdc++.h> using namespace std; signed main() { int n, k, c; bool isWorkDays[200000]; cin >> n >> k >> c; for (int i = 0; i < n; i++) { char charaWork; cin >> charaWork; isWorkDays[i] = (charaWork == 'o'); } int holiday = c; int needsWorkAfter[200000]; int needsWorkBefore[20...
replace
15
17
15
17
0
p02721
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; const int MAXS = 100010; char str[MAXS]; int main() { int N; int K; int C; scanf("%d %d %d", &N...
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; const int MAXS = 300010; char str[MAXS]; int main() { int N; int K; int C; scanf("%d %d %d", &N...
replace
12
13
12
13
0
p02721
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 7; int pre[N]; int n, m, k; string s; vector<int> ans; int dp[N]; int solve(int i) { if (i >= n) return 0; if (dp[i] != -1) return dp[i]; if (s[i] == 'o') { return 1 + solve(i + k + 1); } return dp[i] = solve(i + 1); } int mai...
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 7; int pre[N]; int n, m, k; string s; vector<int> ans; int dp[N]; int solve(int i) { if (i >= n) return 0; if (dp[i] != -1) return dp[i]; if (s[i] == 'o') { return dp[i] = 1 + solve(i + k + 1); } return dp[i] = solve(i + 1); } ...
replace
19
20
19
20
TLE
p02721
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #define REL #pragma GCC optimize("Ofast") #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #inclu...
#define _CRT_SECURE_NO_WARNINGS #define REL #pragma GCC optimize("Ofast") #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #inclu...
replace
97
98
97
98
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long n, k, c; string s; long long l[100100], r[100100]; vector<int> v; int main() { cin >> n >> k >> c; cin >> s; long long sum = 0; for (int i = 0; i < s.size(); i++) if (s[i] == 'o') { sum++; v.push_back(i); i += c; } if (sum > k) ...
#include <bits/stdc++.h> using namespace std; long long n, k, c; string s; long long l[200100], r[200100]; vector<int> v; int main() { cin >> n >> k >> c; cin >> s; long long sum = 0; for (int i = 0; i < s.size(); i++) if (s[i] == 'o') { sum++; v.push_back(i); i += c; } if (sum > k) ...
replace
4
5
4
5
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // #pragma GCC optimize ("O3") // #pragma GCC target ("sse4") #define endl "\n" typedef long long ll; typedef long double ld; typedef unsigned long long ull; template <class T, class T2> inline bool chkmax(T &x, const T2 &y) { return x < y ? x = y, 1 : 0; } template <clas...
#include <bits/stdc++.h> using namespace std; // #pragma GCC optimize ("O3") // #pragma GCC target ("sse4") #define endl "\n" typedef long long ll; typedef long double ld; typedef unsigned long long ull; template <class T, class T2> inline bool chkmax(T &x, const T2 &y) { return x < y ? x = y, 1 : 0; } template <clas...
replace
24
25
24
25
0
p02721
C++
Runtime Error
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #pragma warning(disable : 4996) #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <complex> #include <cstdio> #include <cstring> #include <fu...
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #pragma warning(disable : 4996) #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <complex> #include <cstdio> #include <cstring> #include <fu...
replace
166
167
166
167
0
p02721
C++
Runtime Error
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define DEBUG(x) ...
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define DEBUG(x) ...
replace
76
77
76
77
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; int backcount = k; vector<int> v(n); for (int i = n - 1; i >= 0; i--) { if (s.at(i) == 'o') { v.at(backcount) = i; backcount--; i -= c; } if...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; int backcount = k; vector<int> v(n + 1); for (int i = n - 1; i >= 0; i--) { if (s.at(i) == 'o') { v.at(backcount) = i; backcount--; i -= c; } ...
replace
11
12
11
12
0
p02721
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define SZ(x) ((int)(x).size()) typedef long long ll; int main(void) { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int N, K, C; cin >> N >> K >> C; string s; cin >> s; vector<int> dp(N + 1); dp[N] = 0; for (int i(N - 1); i >= 0; --i) {...
#include <bits/stdc++.h> using namespace std; #define SZ(x) ((int)(x).size()) typedef long long ll; int main(void) { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int N, K, C; cin >> N >> K >> C; string s; cin >> s; vector<int> dp(N + 1); dp[N] = 0; for (int i(N - 1); i >= 0; --i) {...
replace
28
29
28
29
TLE
p02721
C++
Runtime Error
// Aleksander Łukasiewicz #include <bits/stdc++.h> using namespace std; #define x first #define y second #define pb push_back #define mp make_pair typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; const int INF = 1000000009; const int MAXN = 2 * 100 * 1000; char tab[MAXN + 3]; int ff[2 * MAX...
// Aleksander Łukasiewicz #include <bits/stdc++.h> using namespace std; #define x first #define y second #define pb push_back #define mp make_pair typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; const int INF = 1000000009; const int MAXN = 2 * 100 * 1000; char tab[MAXN + 3]; int ff[2 * MAX...
replace
32
33
32
33
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define repn(i, n) for (int i = 1; i <= n; i++) #define LL long long #define pii pair<int, int> #define fi first #define se second #define pb push_back #define mpr make_pair using namespace std; const LL MOD = 1e9 + 7; int n, t, c, pos, vis[1000...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define repn(i, n) for (int i = 1; i <= n; i++) #define LL long long #define pii pair<int, int> #define fi first #define se second #define pb push_back #define mpr make_pair using namespace std; const LL MOD = 1e9 + 7; int n, t, c, pos, vis[2000...
replace
15
16
15
16
0
p02721
Python
Runtime Error
N, K, C = map(int, input().split()) S = input() L = [] R = [] L_index = 0 L_count = 0 R_index = N - 1 R_count = K - 1 while L_index < N and L_count < K: if S[L_index] == "o": L.append(L_index) L_index += C + 1 L_count += 1 else: L_index += 1 while R_index >= 0 and R_count >= 0: ...
n, k, c = map(int, input().split()) s = input() l = [-1] * k r = [-1] * k nowl = 0 indl = 0 while nowl < n and indl < k: for i in range(nowl, n): if s[i] == "o": l[indl] = i nowl = i + c + 1 indl += 1 break nowr = n - 1 indr = k - 1 while nowr >= 0 and indr >=...
replace
0
27
0
25
0
p02721
Python
Runtime Error
#!/usr/bin/env python3 n, k, c = map(int, input().split()) s = input() if c == 0: if s.cnt("o") == k: print(*range(1, n + 1), sep="\n") exit() left = [] i = 0 while i < n: if s[i] == "o": left.append(i) i += c i += 1 right = [] i = n - 1 while i >= 0: if s[i] == "o": ...
#!/usr/bin/env python3 n, k, c = map(int, input().split()) s = input() if c == 0: if s.count("o") == k: for i in range(n): if s[i] == "o": print(i + 1) exit() left = [] i = 0 while i < n: if s[i] == "o": left.append(i) i += c i += 1 right = [] i = n...
replace
5
7
5
9
0
p02721
C++
Memory Limit Exceeded
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC omodtimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace __gnu_pbds; using namespace std; template <typename T> using or...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC omodtimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace __gnu_pbds; using namespace std; template <typename T> using or...
replace
66
67
66
67
MLE
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; const int inf = 0x3f3f3f3f; int a[maxn], b[maxn]; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); // freopen(".in","r",stdin); // freopen(".out","w",stdout); int n, k, c; string s; cin >> n >> k >> c >> s; int n...
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6 + 5; const int inf = 0x3f3f3f3f; int a[maxn], b[maxn]; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); // freopen(".in","r",stdin); // freopen(".out","w",stdout); int n, k, c; string s; cin >> n >> k >> c >> s; int n...
replace
2
3
2
3
0
p02721
C++
Runtime Error
#include <algorithm> #include <iomanip> #include <iostream> #include <random> #include <vector> #define REP(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; constexpr ll INF = 1LL << 60; ll n, k, c, l[100010], r[100010]; string s; int main() { ios::sync_with_stdio(false); cin.tie(0);...
#include <algorithm> #include <iomanip> #include <iostream> #include <random> #include <vector> #define REP(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; constexpr ll INF = 1LL << 60; ll n, k, c, l[200010], r[200010]; string s; int main() { ios::sync_with_stdio(false); cin.tie(0);...
replace
10
11
10
11
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; vector<int> a, b; for (int i = 0; i < n; i++) { if (s[i] == 'o') { a.push_back(i); i = i + c; } } for (int i = n - 1; i >= 0; i--) { if (s[i] == 'o') { b.pus...
#include <bits/stdc++.h> using namespace std; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; vector<int> a, b; for (int i = 0; i < n; i++) { if (s[i] == 'o') { a.push_back(i); i = i + c; } } for (int i = n - 1; i >= 0; i--) { if (s[i] == 'o') { b.pus...
replace
27
29
27
29
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> #define RREP(i, n) for (int i = (n)-1; i >= 0; --i) using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, K, C; string S; cin >> N >> K >> C >> S; vector<int> dp(N + 1); dp[N] = 0; RREP(i, N) { if (S[i] == 'x') { dp[i] = dp[i + 1]; ...
#include <bits/stdc++.h> #define RREP(i, n) for (int i = (n)-1; i >= 0; --i) using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, K, C; string S; cin >> N >> K >> C >> S; vector<int> dp(N + 1); dp[N] = 0; RREP(i, N) { if (S[i] == 'x') { dp[i] = dp[i + 1]; ...
replace
27
28
27
28
0
p02721
C++
Runtime Error
// shan61916 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef double dll; #define mp make_pair #define pb push_back #define ff first #define ss second #define IOS \ ios::sync_with_stdio(false...
// shan61916 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef double dll; #define mp make_pair #define pb push_back #define ff first #define ss second #define IOS \ ios::sync_with_stdio(false...
replace
25
26
25
26
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vl> vvl; typedef pair<ll, ll> pl; typedef vector<pl> vp; const ll INF = 1001001001; const ll LINF = 1001001001001001001; const ll D4[] = {0, 1, 0, -1, 0}; const ll D8[] = {0, 1, 1, 0, -1, -1, 1, -1, 0}; template <c...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vl> vvl; typedef pair<ll, ll> pl; typedef vector<pl> vp; const ll INF = 1001001001; const ll LINF = 1001001001001001001; const ll D4[] = {0, 1, 0, -1, 0}; const ll D8[] = {0, 1, 1, 0, -1, -1, 1, -1, 0}; template <c...
replace
136
137
136
137
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define mp make_pair int main() { ios_base::sync_with_stdio(0); cin.tie(nullptr); freopen("a.txt", "r", stdin); int n, k, c; string s; cin >> n >> k >> c >> s; vector<int> good; for (int i = 0; i < n; ++i...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define mp make_pair int main() { ios_base::sync_with_stdio(0); cin.tie(nullptr); // freopen("a.txt", "r", stdin); int n, k, c; string s; cin >> n >> k >> c >> s; vector<int> good; for (int i = 0; i < n; ...
replace
13
14
13
14
-11
p02721
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define zero_pad(num) setfill('0') << std::right << setw(num) using namespace std; using ll = long long; using ld = long double; using P = pair<int, int>; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; vector<vector<i...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define zero_pad(num) setfill('0') << std::right << setw(num) using namespace std; using ll = long long; using ld = long double; using P = pair<int, int>; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; vector<vector<i...
replace
22
23
22
23
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define mp make_pair #define pb push_back #define VI vector<int> #define pii pair<int, int> #define INF 0x3f3f3f3f using namespace std; const int MAXN = 1e5; char S[MAXN + 10]; int dp[2][MAXN + 10]; int n, k, x; int main() { scanf("%d %d %d", &n, &k, &x); scanf("%s", S)...
#include <bits/stdc++.h> #define ll long long #define mp make_pair #define pb push_back #define VI vector<int> #define pii pair<int, int> #define INF 0x3f3f3f3f using namespace std; const int MAXN = 2e5; char S[MAXN + 10]; int dp[2][MAXN + 10]; int n, k, x; int main() { scanf("%d %d %d", &n, &k, &x); scanf("%s", S)...
replace
8
9
8
9
0
p02721
C++
Runtime Error
#pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #include <bits/stdc++.h> using namespace std; #define len(x) (int)((x).size()) #define endl '\n' #define int long long #...
#pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #include <bits/stdc++.h> using namespace std; #define len(x) (int)((x).size()) #define endl '\n' #define int long long #...
replace
117
118
117
119
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, k, c; string s; cin >> n >> k >> c >> s; vector<int> left(k), right(k); int count = 0; for (int i = 0; i < n; i++) { if (s[i] == 'o') { left[count] = i + 1; count += 1; i += c; if (count == k) break; ...
#include <bits/stdc++.h> using namespace std; int main() { int n, k, c; string s; cin >> n >> k >> c >> s; vector<int> left(k), right(k); int count = 0; for (int i = 0; i < n; i++) { if (s[i] == 'o') { left[count] = i + 1; count += 1; i += c; if (count == k) break; ...
replace
25
26
25
26
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> // typedef //-------------------------#include <bits/stdc++.h> const double pi = 3.141592653589793238462643383279; using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template ...
#include <bits/stdc++.h> // typedef //-------------------------#include <bits/stdc++.h> const double pi = 3.141592653589793238462643383279; using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template ...
replace
238
239
238
239
0
p02721
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; #define int long long #define endl "\n" constexpr long long INF = (long long)1e18; constexpr long long MOD = 998244353; struct fast_io { fast_io() { std::cin...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; #define int long long #define endl "\n" constexpr long long INF = (long long)1e18; constexpr long long MOD = 998244353; struct fast_io { fast_io() { std::cin...
insert
56
56
56
60
0
p02721
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <utility> #include <vector> #define fir first #define sec second #define sz(s) (s).size() #define pb push_back #define get(n) scanf("%d", &n); #define gets(s) ...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <utility> #include <vector> #define fir first #define sec second #define sz(s) (s).size() #define pb push_back #define get(n) scanf("%d", &n); #define gets(s) ...
replace
166
167
166
168
0
p02721
C++
Runtime Error
/* _____________________$$o____________________o$$$$$o__ ___________________o$o_$$o____oo$$$$$$$oo______o$$$$o ______________$o________o$$$$$o___oo$$$$$$$o______$$$ ______________$$$ooo________o$$$$o______o$$$$$o_____o ____________oo_____oo_____oo___o$$$$$______$$$$$$____ _________ooooo___$$o_$___oooooo___o$$$$o__o__o$...
/* _____________________$$o____________________o$$$$$o__ ___________________o$o_$$o____oo$$$$$$$oo______o$$$$o ______________$o________o$$$$$o___oo$$$$$$$o______$$$ ______________$$$ooo________o$$$$o______o$$$$$o_____o ____________oo_____oo_____oo___o$$$$$______$$$$$$____ _________ooooo___$$o_$___oooooo___o$$$$o__o__o$...
replace
42
43
42
43
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { int n, k, c; string s; cin >> n >> k >> c >> s; vector<int> P, Q, ans; for (int i = 0; i < n; i++) { if (s[i] == 'o') { P.push_back(i + 1); i += c; } } revers...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { int n, k, c; string s; cin >> n >> k >> c >> s; vector<int> P, Q, ans; for (int i = 0; i < n; i++) { if (s[i] == 'o') { P.push_back(i + 1); i += c; } } revers...
replace
32
33
32
33
-11
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll maxs = 2e5 + 5; const ll lmaxs = 20; ll mod = 1e9 + 7; ll oo = 1e15; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll maxs = 2e5 + 5; const ll lmaxs = 20; ll mod = 1e9 + 7; ll oo = 1e15; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(...
replace
53
56
53
54
-11
p02721
C++
Runtime Error
/*Code by Codercjh*/ #include <bits/stdc++.h> #define fr(i, a, b) for (int i = (a); i <= (b); ++i) #define rf(i, a, b) for (int i = (a); i >= (b); --i) #define min(a, b) (a < b ? a : b) #define max(a, b) (a > b ? a : b) using namespace std; typedef long long ll; template <typename T> inline void read(T &x) { char c =...
/*Code by Codercjh*/ #include <bits/stdc++.h> #define fr(i, a, b) for (int i = (a); i <= (b); ++i) #define rf(i, a, b) for (int i = (a); i >= (b); --i) #define min(a, b) (a < b ? a : b) #define max(a, b) (a > b ? a : b) using namespace std; typedef long long ll; template <typename T> inline void read(T &x) { char c =...
replace
27
28
27
33
0
p02721
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; const ll MOD = 10000000...
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> typedef long long ll; using namespace std; const ll MOD = 10000000...
insert
59
59
59
62
0
p02721
C++
Runtime Error
#include <algorithm> #include <queue> #include <stdio.h> #include <vector> using namespace std; typedef long long LL; const int maxn = 100000 + 10; int L[maxn][2], R[maxn][2]; char str[maxn]; int main() { int i, j, n, K, C; scanf("%d%d%d", &n, &K, &C); scanf("%s", str + 1); for (i = 1; i <= n; i++) { if (...
#include <algorithm> #include <queue> #include <stdio.h> #include <vector> using namespace std; typedef long long LL; const int maxn = 200000 + 10; int L[maxn][2], R[maxn][2]; char str[maxn]; int main() { int i, j, n, K, C; scanf("%d%d%d", &n, &K, &C); scanf("%s", str + 1); for (i = 1; i <= n; i++) { if (...
replace
7
8
7
8
0
p02721
C++
Runtime Error
#include <cstdio> #include <iostream> #include <stack> using namespace std; typedef long long ll; ll n, k, c, lst; bool flag; string s; ll cnt; bool vis[100010]; stack<int> stk; int main() { cin >> n >> k >> c; cin >> s; lst = -1; for (int i = 0; i < (int)(s.length()); i++) { if (s[i] == 'x' || lst >= i) ...
#include <cstdio> #include <iostream> #include <stack> using namespace std; typedef long long ll; ll n, k, c, lst; bool flag; string s; ll cnt; bool vis[200010]; stack<int> stk; int main() { cin >> n >> k >> c; cin >> s; lst = -1; for (int i = 0; i < (int)(s.length()); i++) { if (s[i] == 'x' || lst >= i) ...
replace
9
10
9
10
0
p02721
C++
Runtime Error
#include <algorithm> #include <array> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; vector<int> buf; int main(int argc, char *argv[]) { int N, K, C; string s; cin >> N >> K >> C; cin >> s; buf.resize(K, -1); int num = K; int cur = N - 1; ...
#include <algorithm> #include <array> #include <iostream> #include <map> #include <queue> #include <string> #include <vector> using namespace std; vector<int> buf; int main(int argc, char *argv[]) { int N, K, C; string s; cin >> N >> K >> C; cin >> s; buf.resize(K, -1); int num = K; int cur = N - 1; ...
replace
50
51
50
51
0
p02721
C++
Time Limit Exceeded
/** * author: qodjf * created: 04.21.2020 00:39:18 */ #include <bits/stdc++.h> using namespace std; string to_string(string s) { return '"' + s + '"'; } string to_string(const char *s) { return to_string((string)s); } string to_string(bool b) { return (b ? "true" : "false"); } template <typename A, typen...
/** * author: qodjf * created: 04.21.2020 00:39:18 */ #include <bits/stdc++.h> using namespace std; string to_string(string s) { return '"' + s + '"'; } string to_string(const char *s) { return to_string((string)s); } string to_string(bool b) { return (b ? "true" : "false"); } template <typename A, typen...
insert
92
92
92
93
TLE
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; vector<int64_t> memo; int64_t greedy(const string &s, int64_t index, int64_t C) { if (index >= s.size() || memo[index] != -1) { return memo[index]; } for (int64_t i = index; i < s.size(); i++) { if (s[i] == 'o') { return memo[index] = (1 + greedy(s, i...
#include <bits/stdc++.h> using namespace std; vector<int64_t> memo; int64_t greedy(const string &s, int64_t index, int64_t C) { if (index >= s.size()) { return 0; } if (memo[index] != -1) { return memo[index]; } for (int64_t i = index; i < s.size(); i++) { if (s[i] == 'o') { return memo[i...
replace
6
7
6
10
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int INF = 100000; int main() { int N, K, C; cin >> N >> K >> C; string S; cin >> S; vector<int> G, G2; int p = -INF; for (int i = 0; i < N; i++) { if (S[i] == 'o' && i > p + C) { G.push_back(i); p = i; } if (G.size() == K) { break...
#include <bits/stdc++.h> using namespace std; int INF = 1000000; int main() { int N, K, C; cin >> N >> K >> C; string S; cin >> S; vector<int> G, G2; int p = -INF; for (int i = 0; i < N; i++) { if (S[i] == 'o' && i > p + C) { G.push_back(i); p = i; } if (G.size() == K) { brea...
replace
2
3
2
3
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int(i) = (0); (i) < (int)(n); ++(i)) using ll = long long; using namespace std; int l[101010], r[101010]; int main() { int N, K, C; cin >> N >> K >> C; string S; cin >> S; int cur = 1; for (int i = 0; i < N; ++i) { if (S[i] == 'o') ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int(i) = (0); (i) < (int)(n); ++(i)) using ll = long long; using namespace std; int l[201010], r[201010]; int main() { int N, K, C; cin >> N >> K >> C; string S; cin >> S; int cur = 1; for (int i = 0; i < N; ++i) { if (S[i] == 'o') ...
replace
6
7
6
7
0
p02721
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <utili...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <utili...
replace
126
127
126
129
0
p02721
C++
Runtime Error
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> using ll = long long int; using namespace std; int main() { // read problem ll N, K, C; stri...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <stdio.h> #include <string> #include <vector> using ll = long long int; using namespace std; int main() { // read problem ll N, K, C; stri...
insert
102
102
102
114
0
dp1: 1 1 1 1 1 2 2 2 2 3 3 dp2: 3 3 2 2 2 2 1 1 1 1 1 nvac: 6 1 2 3 6 7 8 Answer:
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, k, c; vector<int> a, b; cin >> n >> k >> c; string s; cin >> s; for (int i = 0; i < n; i++) if (s[i] == 'o') { a.push_back(i); i += c; }; for (int i = n - 1; i > 0; i--) if (s[i] == 'o') { b.push_back(i); ...
#include <bits/stdc++.h> using namespace std; int main() { int n, k, c; vector<int> a, b; cin >> n >> k >> c; string s; cin >> s; for (int i = 0; i < n; i++) if (s[i] == 'o') { a.push_back(i); i += c; }; for (int i = n - 1; i >= 0; i--) if (s[i] == 'o') { b.push_back(i); ...
replace
13
14
13
14
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define endl '\n' typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; // const int mod=1e9+7; const int mod = 998244353; const double e...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define endl '\n' typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; // const int mod=1e9+7; const int mod = 998244353; const double e...
replace
32
33
32
33
0
p02721
C++
Time Limit Exceeded
// abc161_e2.cc #include <bits/stdc++.h> using namespace std; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; vector<int> ans1, ans2; for (int i = 0; i < n; i++) { if (s[i] == 'o') { ans1.push_back(i); i += c; } } for (int i = n - 1; i >= 0; i--) { if (s[i]...
// abc161_e2.cc #include <bits/stdc++.h> using namespace std; int main() { int n, k, c; cin >> n >> k >> c; string s; cin >> s; vector<int> ans1, ans2; for (int i = 0; i < n; i++) { if (s[i] == 'o') { ans1.push_back(i); i += c; } } for (int i = n - 1; i >= 0; i--) { if (s[i]...
replace
29
30
29
30
TLE
p02721
C++
Runtime Error
// AtCoder.cpp : このファイルには 'main' // 関数が含まれています。プログラム実行の開始と終了がそこで行われます。 // // AtCoder.cpp : このファイルには 'main' // 関数が含まれています。プログラム実行の開始と終了がそこで行われます。 // #define _USE_MATH_DEFINES #include <math.h> // #include<cmath> #include <algorithm> #include <array> #include <assert.h> #include <bitset> #include <chrono> #include <c...
// AtCoder.cpp : このファイルには 'main' // 関数が含まれています。プログラム実行の開始と終了がそこで行われます。 // // AtCoder.cpp : このファイルには 'main' // 関数が含まれています。プログラム実行の開始と終了がそこで行われます。 // #define _USE_MATH_DEFINES #include <math.h> // #include<cmath> #include <algorithm> #include <array> #include <assert.h> #include <bitset> #include <chrono> #include <c...
replace
109
111
109
111
0
p02721
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 110000; char s[N]; int l[N], r[N]; int n, k, c; int main() { scanf("%d%d%d%s", &n, &k, &c, s + 1); int i = 1, kk = 1; while (kk <= k) { if (s[i] == 'o') l[kk++] = i, i += c; ++i; } i = n, kk = k; while (kk) { if (s[i] == 'o') ...
#include <bits/stdc++.h> using namespace std; const int N = 220000; char s[N]; int l[N], r[N]; int n, k, c; int main() { scanf("%d%d%d%s", &n, &k, &c, s + 1); int i = 1, kk = 1; while (kk <= k) { if (s[i] == 'o') l[kk++] = i, i += c; ++i; } i = n, kk = k; while (kk) { if (s[i] == 'o') ...
replace
2
3
2
3
0
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a, b) for (int a = 0; a < b; a++) #define Sort(a) sort(a.begin(), a.end()) #define rev(a) reverse(a.begin(), a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #defin...
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a, b) for (int a = 0; a < b; a++) #define Sort(a) sort(a.begin(), a.end()) #define rev(a) reverse(a.begin(), a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #defin...
insert
508
508
508
512
TLE
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> // typedef //-------------------------#include <bits/stdc++.h> const double pi = 3.141592653589793238462643383279; using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template ...
#include <bits/stdc++.h> // typedef //-------------------------#include <bits/stdc++.h> const double pi = 3.141592653589793238462643383279; using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template ...
replace
264
265
264
268
TLE
p02722
C++
Runtime Error
/******************************** * AUTHOR: ARNAB SEN * * NICK : arnab1729 * * INSTITUTION: IIEST, SHIBPUR * ********************************/ #include <bits/stdc++.h> using namespace std; typedef string STR; typedef long long LL; typedef long double LD; typedef unsigned long long U...
/******************************** * AUTHOR: ARNAB SEN * * NICK : arnab1729 * * INSTITUTION: IIEST, SHIBPUR * ********************************/ #include <bits/stdc++.h> using namespace std; typedef string STR; typedef long long LL; typedef long double LD; typedef unsigned long long U...
replace
144
145
144
145
0
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool check(ll n, ll k) { if (n == 1) return true; if (n < k) return false; if (n % k == 0) { return check(n / k, k); } else { return check(n % k, k); } } vector<ll> get_div(ll n) { vector<ll> res; for (ll d = 2; d * d <=...
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool check(ll n, ll k) { if (n == 1) return true; if (n < k) return false; if (n % k == 0) { return check(n / k, k); } else { return check(n % k, k); } } vector<ll> get_div(ll n) { vector<ll> res; for (ll d = 2; d * d <=...
insert
32
32
32
36
TLE
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long int; vector<ll> enumDivisor(ll x) { vector<ll> res; for (int i = 1; i * i <= x; ++i) { if (x % i) continue; res.push_back(i); if (i * i != x) res.push_back(x / i); } return res; } int main() { ios::sync_with_stdio(false...
#include <bits/stdc++.h> using namespace std; using ll = long long int; vector<ll> enumDivisor(ll x) { vector<ll> res; for (ll i = 1; i * i <= x; ++i) { if (x % i) continue; res.push_back(i); if (i * i != x) res.push_back(x / i); } return res; } int main() { ios::sync_with_stdio(false)...
replace
5
6
5
6
TLE
p02722
C++
Time Limit Exceeded
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(i) cerr << #i << "=" << i << endl;...
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(i) cerr << #i << "=" << i << endl;...
insert
189
189
189
191
TLE
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<ld, ld> pdd; typedef vector<ll> vll; typedef vector<ld> vld; typedef vector<pll> vpl; typedef vector<vll> vvll; #define ALL(a) a.begin(), a.end() #define SZ(a)...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<ld, ld> pdd; typedef vector<ll> vll; typedef vector<ld> vld; typedef vector<pll> vpl; typedef vector<vll> vvll; #define ALL(a) a.begin(), a.end() #define SZ(a)...
insert
63
63
63
65
TLE
p02722
C++
Runtime Error
// cout << "Case #" << k << ": "; #include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() typedef long long ll; #define MOD 1000000007 using namespace std; vector<ll> divisor(ll n) { vector<ll> ret; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ...
// cout << "Case #" << k << ": "; #include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() typedef long long ll; #define MOD 1000000007 using namespace std; vector<ll> divisor(ll n) { vector<ll> ret; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ...
insert
36
36
36
39
0
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define lli long long int #define REP(i, s, n) for (int i = s; i < n; i++) #define MOD 1000000007 #define NUM 2520 #define INF (1LL << 50) #define DEBUG 0 #define mp(a, b) make_pair(a, b) #define SORT(V) sort(V.begin(), V.end()) #define PI (3.141592653589794) set<lli> yak...
#include <bits/stdc++.h> using namespace std; #define lli long long int #define REP(i, s, n) for (int i = s; i < n; i++) #define MOD 1000000007 #define NUM 2520 #define INF (1LL << 50) #define DEBUG 0 #define mp(a, b) make_pair(a, b) #define SORT(V) sort(V.begin(), V.end()) #define PI (3.141592653589794) set<lli> yak...
replace
16
18
16
20
TLE
p02722
C++
Time Limit Exceeded
#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() { ll n; cin >> n; vector<ll> g; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { if (i != 1) g.push_back(i); if (n / i != i) ...
#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() { ll n; cin >> n; vector<ll> g; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { if (i != 1) g.push_back(i); if (n / i != i) ...
replace
35
36
35
36
TLE
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> constexpr T inf = numeric_limits<T>::has_infinity ? numeric_limits<T>::infinity() : numeric_limits<T>::max() / 4; #define REP(i, stop) FOR(i, 0, stop) #define FOR(i, start, stop) for (ll i...
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> constexpr T inf = numeric_limits<T>::has_infinity ? numeric_limits<T>::infinity() : numeric_limits<T>::max() / 4; #define REP(i, stop) FOR(i, 0, stop) #define FOR(i, start, stop) for (ll i...
insert
103
103
103
107
TLE
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) typedef long long ll; vector<pair<ll, ll>> factorize(ll n) { vector<pair<ll, ll>> res; for (int i = 2; i * i <= n; ++i) { if (n % i) continue; res.emplace_back(i...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) typedef long long ll; vector<pair<ll, ll>> factorize(ll n) { vector<pair<ll, ll>> res; for (ll i = 2; i * i <= n; ++i) { if (n % i) continue; res.emplace_back(i,...
replace
9
10
9
10
TLE
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) using namespace std; using ll = long long; int main() { ll n, ans = 0; cin >> n; vector<ll> num; rep(k, 2) { n -= (ll)k; num.push_back(n); for (ll i = 2; i * i <= n; i++) { if (n % i == 0) { num.push_back(i...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) using namespace std; using ll = long long; int main() { ll n, ans = 0; cin >> n; vector<ll> num; rep(k, 2) { n -= (ll)k; if (n != 1) num.push_back(n); for (ll i = 2; i * i <= n; i++) { if (n % i == 0) { ...
replace
12
13
12
14
TLE
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define repd(i, a, b) for (ll i = (a); i < (b); i++) #define repb(i, n) for (ll i = (n)-1; i >= 0; i--) #define rep(i, n) repd(i, 0, n) using namespace std; using ll = long long; using ul = unsigned long long; ll mod = 1000000007; int main() { source: ll n; cin >> n; set<ll> m; ll s...
#include <bits/stdc++.h> #define repd(i, a, b) for (ll i = (a); i < (b); i++) #define repb(i, n) for (ll i = (n)-1; i >= 0; i--) #define rep(i, n) repd(i, 0, n) using namespace std; using ll = long long; using ul = unsigned long long; ll mod = 1000000007; int main() { source: ll n; cin >> n; set<ll> m; ll s...
replace
33
34
33
38
TLE
p02722
C++
Time Limit Exceeded
/* _ _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ ...
/* _ _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ ...
replace
108
109
108
111
TLE
p02722
C++
Runtime Error
#include <algorithm> #include <cstring> #include <iostream> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string> using namespace std; typedef long long ll; typedef double db; ll mod = 1e9 + 7; ll a[500][2]; int main() { ll n; int count = 0; cin >> n; ll s = 0; if (n ==...
#include <algorithm> #include <cstring> #include <iostream> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <string> using namespace std; typedef long long ll; typedef double db; ll mod = 1e9 + 7; ll a[10000][2]; int main() { ll n; int count = 0; cin >> n; ll s = 0; if (n ...
replace
16
17
16
17
0
p02722
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG // これつけるとA[N]でもいいらしい // for文のマクロ #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define big 1000000007 #define all(a) sort((a).begin(), (a).end()) // ソートのマクロ #define Re(a) reverse((a).begin(), (a).end()) #define YN(a) ...
#include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG // これつけるとA[N]でもいいらしい // for文のマクロ #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define big 1000000007 #define all(a) sort((a).begin(), (a).end()) // ソートのマクロ #define Re(a) reverse((a).begin(), (a).end()) #define YN(a) ...
replace
20
21
20
23
TLE