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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02868 | C++ | Runtime Error | #include <cassert>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long ll;
template <typename T> using vec = vector<T>;
template <typename T> using vvec = vector<vec<T>>;
int main() {
int N, M;
cin >> N >> M;
vec<ll> L(M), R(M), C(M);
vvec<int> lid(N + 1), rid(N + 1);
... | #include <cassert>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long ll;
template <typename T> using vec = vector<T>;
template <typename T> using vvec = vector<vec<T>>;
int main() {
int N, M;
cin >> N >> M;
vec<ll> L(M), R(M), C(M);
vvec<int> lid(N + 1), rid(N + 1);
... | replace | 21 | 22 | 21 | 22 | 0 | |
p02868 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<long long>> in(n, vector<long long>(0)),
out(n, vector<long long>(0));
vector<long long> c(m);
for (int i = 0; i < m; i++) {
int l, r;
cin >> l >>... | #include <algorithm>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<long long>> in(n, vector<long long>(0)),
out(n, vector<long long>(0));
vector<long long> c(m);
for (int i = 0; i < m; i++) {
int l, r;
cin >> l >>... | replace | 24 | 25 | 24 | 25 | 0 | |
p02868 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % 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 c... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;
ll gcd(ll a, ll b) {
if (b == 0)
return a;
return gcd(b, a % 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 c... | replace | 66 | 67 | 66 | 67 | TLE | |
p02868 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define REP2(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define REPD(i, n) for (int ... | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define REP2(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define REPD(i, n) for (int ... | replace | 23 | 24 | 23 | 24 | TLE | |
p02868 | C++ | Time Limit Exceeded | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <utility>
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define P pair<int, int>
#define PLI pair<ll, ... | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <utility>
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define P pair<int, int>
#define PLI pair<ll, ... | replace | 57 | 58 | 57 | 58 | TLE | |
p02868 | C++ | Runtime Error | #include "./bits/stdc++.h"
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define linf 122337203685477000
using namespace std;
typedef long long ll;
/*
vector.push_back()
vector<int> hoge(3,-1); {-1,-1,-1}
vector<vector<int>> hogehoge(2,vector<int>(2,-1)); {{-1,-1},{-1,-... | #include "./bits/stdc++.h"
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define linf 122337203685477000
using namespace std;
typedef long long ll;
/*
vector.push_back()
vector<int> hoge(3,-1); {-1,-1,-1}
vector<vector<int>> hogehoge(2,vector<int>(2,-1)); {{-1,-1},{-1,-... | delete | 64 | 65 | 64 | 64 | 0 | |
p02868 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define int long long
#define endl "\n"
const long long INF = (long long)1e18;
const long long MOD = 1'000'000'007;
string yn(bool f) { return f ? "Yes" : "No"; }
st... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define int long long
#define endl "\n"
const long long INF = (long long)1e18;
const long long MOD = 1'000'000'007;
string yn(bool f) { return f ? "Yes" : "No"; }
st... | replace | 59 | 60 | 59 | 65 | 0 | |
p02868 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, b) for (ll i = ll(a); i < ll(b); i++)
#define rer(i, a, b) for (ll i = ll(a) - 1; i >= ll(b); i--)
#define sz(v) (int)(v).size()
#define pb push_back
#define sc second
#define fr first
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define l... | #include <bits/stdc++.h>
#define rep(i, a, b) for (ll i = ll(a); i < ll(b); i++)
#define rer(i, a, b) for (ll i = ll(a) - 1; i >= ll(b); i--)
#define sz(v) (int)(v).size()
#define pb push_back
#define sc second
#define fr first
#define sor(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define l... | replace | 18 | 19 | 18 | 19 | 0 | |
p02868 | C++ | Time Limit Exceeded | #include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <ios>
#include <iostream>
#includ... | #include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <ios>
#include <iostream>
#includ... | delete | 106 | 107 | 106 | 106 | TLE | |
p02868 | C++ | Time Limit Exceeded | // Copyright 2019 yaito3014
#include "bits/stdc++.h"
using namespace std;
using namespace literals;
struct Edge {
int to, cost;
Edge() = default;
Edge(int t, int c) : to(t), cost(c) {}
};
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<vector<Edge>> G(N);
... | // Copyright 2019 yaito3014
#include "bits/stdc++.h"
using namespace std;
using namespace literals;
struct Edge {
int to, cost;
Edge() = default;
Edge(int t, int c) : to(t), cost(c) {}
};
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<vector<Edge>> G(N);
... | replace | 27 | 28 | 27 | 28 | TLE | |
p02868 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long double ld;
typedef long long ll;
using namespace std;
const ll inf = 1e18;
struct Segment {
int l;
int r;
int c;
bool operator<(const Segment &rhs) { return l < rhs.l; }
};
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
freopen("input.t... | #include <bits/stdc++.h>
typedef long double ld;
typedef long long ll;
using namespace std;
const ll inf = 1e18;
struct Segment {
int l;
int r;
int c;
bool operator<(const Segment &rhs) { return l < rhs.l; }
};
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
// freopen("i... | replace | 18 | 19 | 18 | 19 | -6 | terminate called after throwing an instance of 'std::length_error'
what(): cannot create std::vector larger than max_size()
|
p02868 | C++ | Runtime Error | /// kAAzuki Hoshino
/*
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ex... | /// kAAzuki Hoshino
/*
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ex... | replace | 47 | 48 | 47 | 48 | 0 | |
p02868 | C++ | Time Limit Exceeded | #ifdef LOCAL
#define _GLIBCXX_DEBUG
#define __clock__
#else
#pragma GCC optimize("Ofast")
// #define NDEBUG
#endif
#define __precision__ 10
#define iostream_untie true
#define debug_stream std::cerr
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <complex>
#include <cstring>
#inclu... | #ifdef LOCAL
#define _GLIBCXX_DEBUG
#define __clock__
#else
#pragma GCC optimize("Ofast")
// #define NDEBUG
#endif
#define __precision__ 10
#define iostream_untie true
#define debug_stream std::cerr
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <complex>
#include <cstring>
#inclu... | replace | 311 | 313 | 311 | 313 | TLE | |
p02868 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
#define int long long
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define all(c) begin(c), end(c)
const int INF =
sizeof(int) == sizeof(lo... | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
#define int long long
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define all(c) begin(c), end(c)
const int INF =
sizeof(int) == sizeof(lo... | replace | 135 | 138 | 135 | 140 | TLE | |
p02868 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_r(i, n) for (int i = n - 1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = 0, ... | #include <bits/stdc++.h>
#include <iostream>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_r(i, n) for (int i = n - 1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = 0, ... | replace | 86 | 89 | 86 | 89 | 0 | |
p02868 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int MAX_N = 100005;
const ll INF = 1e15;
struct edge {
int to, cost;
};
vector<edge> G[MAX_N];
ll d[MAX_N];
void init() {
rep(i, MAX_N) { d[i] = INF; }
}
int main() {... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MAX_N = 100005;
const ll INF = 1e15;
struct edge {
int to, cost;
};
vector<edge> G[MAX_N];
ll d[MAX_N];
void init() {
rep(i, MAX_N) { d[i] = INF; }
}
int main() {
... | replace | 4 | 5 | 4 | 5 | TLE | |
p02868 | C++ | Time Limit Exceeded | #include <algorithm>
#include <complex>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i... | replace | 61 | 62 | 61 | 62 | TLE | |
p02868 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define p_ary(ary, a, b) \
do { \
cout << "["; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define p_ary(ary, a, b) \
do { \
cout << "["; ... | replace | 4 | 5 | 4 | 5 | TLE | |
p02868 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) (v).begin(), (v).end()
#define chmin(x, y) x = min(x, y)
typedef pair<int, int> P;
typedef long long ll;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const ll MOD = 1e9 + 7;
int main() {
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) (v).begin(), (v).end()
#define chmin(x, y) x = min(x, y)
typedef pair<int, int> P;
typedef long long ll;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const ll MOD = 1e9 + 7;
int main() {
... | replace | 33 | 35 | 33 | 38 | TLE | |
p02868 | C++ | Time Limit Exceeded | #include "stdio.h"
#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#inc... | #include "stdio.h"
#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#inc... | replace | 85 | 87 | 85 | 89 | TLE | |
p02868 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18 + 7;
class CompareDist {
public:
bool operator()(pair<int, int> n1, pair<int, int> n2) {
return n1.second < n2.second;
}
};
class Dijkstra { // O((N+M)logN)
private:
static const int INF = 1e9 + 7;
vector<vector<pair<long long, int>>... | #include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18 + 7;
class CompareDist {
public:
bool operator()(pair<int, int> n1, pair<int, int> n2) {
return n1.second > n2.second;
}
};
class Dijkstra { // O((N+M)logN)
private:
static const int INF = 1e9 + 7;
vector<vector<pair<long long, int>>... | replace | 7 | 8 | 7 | 8 | TLE | |
p02868 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
struct edge {
int to;
long long cost;
};
const long long INF = 1ll << 60;
const int MAX_V = 100000;
int V;
vector<edge> G[MAX_V + 1];
long long d[MAX_V + 1];
void dijkstra(int s) {
priority_queue<P, vector<P>, greater<P>> que;
fill(d, d... | #include <bits/stdc++.h>
using namespace std;
using P = pair<long long, int>;
struct edge {
int to;
long long cost;
};
const long long INF = 1ll << 60;
const int MAX_V = 100000;
int V;
vector<edge> G[MAX_V + 1];
long long d[MAX_V + 1];
void dijkstra(int s) {
priority_queue<P, vector<P>, greater<P>> que;
fil... | replace | 3 | 4 | 3 | 4 | TLE | |
p02868 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdint>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <regex>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdint>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <regex>
#include... | replace | 427 | 428 | 427 | 428 | -6 | malloc(): corrupted top size
|
p02868 | C++ | Time Limit Exceeded | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (in i = 0; i < (in)(n); i++)
#define REP(i, a, b) for (in i = (in)(a); i < (in)(b); i++)
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define yes cout ... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (in i = 0; i < (in)(n); i++)
#define REP(i, a, b) for (in i = (in)(a); i < (in)(b); i++)
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define yes cout ... | replace | 39 | 40 | 39 | 40 | TLE | |
p02869 | C++ | Time Limit Exceeded | // https://atcoder.jp/contests/nikkei2019-2-qual/tasks/nikkei2019_2_qual_e
#define CIN_ONLY
#define DECIMAL_DIGITS 10
#define STATIC_MOD 1e9 + 7
#ifdef BTK
/*<head>*/
#include "Template.hpp"
/*</head>*/
#else
/*<body>*/
/* #region auto includes */
/* #region stl */
/*<stl>*/
#include <bits/stdc++.h>
#include <sys/type... | // https://atcoder.jp/contests/nikkei2019-2-qual/tasks/nikkei2019_2_qual_e
#define CIN_ONLY
#define DECIMAL_DIGITS 10
#define STATIC_MOD 1e9 + 7
#ifdef BTK
/*<head>*/
#include "Template.hpp"
/*</head>*/
#else
/*<body>*/
/* #region auto includes */
/* #region stl */
/*<stl>*/
#include <bits/stdc++.h>
#include <sys/type... | replace | 496 | 497 | 496 | 497 | TLE | |
p02869 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0, i##_max = (N); i < i##_max; ++i)
#define repp(i, l, r) for (int i = (l), i##_max = (r); i < i##_max; ++i)
#define per(i, N) for (int i = (N)-1; i >= 0; --i)
#define perr(i, l, r) for (int i = r - 1, i##_min(l); i >= i##_min; --i)
#define al... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0, i##_max = (N); i < i##_max; ++i)
#define repp(i, l, r) for (int i = (l), i##_max = (r); i < i##_max; ++i)
#define per(i, N) for (int i = (N)-1; i >= 0; --i)
#define perr(i, l, r) for (int i = r - 1, i##_min(l); i >= i##_min; --i)
#define al... | replace | 50 | 51 | 50 | 51 | 0 | |
p02869 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namesp... | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namesp... | insert | 185 | 185 | 185 | 187 | 0 | |
p02869 | C++ | Runtime Error | #pragma GCC optimize("O3")
#pragma GCC target("avx")
#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++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n... | #pragma GCC optimize("O3")
#pragma GCC target("avx")
#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++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n... | replace | 19 | 20 | 19 | 20 | 0 | |
p02869 | C++ | Runtime Error | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | replace | 34 | 35 | 34 | 35 | 0 | |
p02869 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define watch(x) cout << (#x) << "=" << (x) << '\n'
#define mset(d, val) memset(d, val, sizeof(d))
#define setp(x) cout << fixed << setprecision(x)
#define forn(i, a, ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define watch(x) cout << (#x) << "=" << (x) << '\n'
#define mset(d, val) memset(d, val, sizeof(d))
#define setp(x) cout << fixed << setprecision(x)
#define forn(i, a, ... | replace | 28 | 29 | 28 | 29 | 0 | |
p02869 | C++ | Runtime Error | #include <cstdio>
#define Maxn 100000
int k, n;
int ans[Maxn + 5][3];
int main() {
scanf("%d%d", &k, &n);
if (n < 2 * k - 1) {
puts("-1");
return 0;
}
int len = 0;
for (int i = 0; i < n / 2; i++) {
ans[++len][0] = k + n / 2 - 1 - i;
ans[len][1] = k + n + i * 2 + 1;
ans[len][2] = k + n * 2 ... | #include <cstdio>
#define Maxn 100000
int k, n;
int ans[Maxn + 5][3];
int main() {
scanf("%d%d", &n, &k);
if (n < 2 * k - 1) {
puts("-1");
return 0;
}
int len = 0;
for (int i = 0; i < n / 2; i++) {
ans[++len][0] = k + n / 2 - 1 - i;
ans[len][1] = k + n + i * 2 + 1;
ans[len][2] = k + n * 2 ... | replace | 5 | 6 | 5 | 6 | 0 | |
p02869 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <class T> inline T updmax(T &a, T b) { return a = max(a, b); }
template <class T> inline T updmin(T &a, T b) { return a = min(a, b); }
class Solution {
public:
void solve() {
long long n, k;
cin >> n >> k;
if (2 * k - 1 > n) {
cout << "-1\n";... | #include <bits/stdc++.h>
using namespace std;
template <class T> inline T updmax(T &a, T b) { return a = max(a, b); }
template <class T> inline T updmin(T &a, T b) { return a = min(a, b); }
class Solution {
public:
void solve() {
long long n, k;
cin >> n >> k;
if (2 * k - 1 > n) {
cout << "-1\n";... | replace | 19 | 33 | 19 | 29 | -11 | |
p02869 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
// #define ll __int128
#define int ll
// #define int ll
// #define char ll
#define double ld
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<vvc> vvvc;
typedef pair<... | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
// #define ll __int128
#define int ll
// #define int ll
// #define char ll
#define double ld
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<vvc> vvvc;
typedef pair<... | replace | 149 | 151 | 149 | 151 | 0 | |
p02869 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
const int maxn = 1e5 + 10;
int read() {
int x = 0, f = 1;
char c = getchar();
while (!isdigit(c)) {
if (c == '-... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
const int maxn = 1e6 + 10;
int read() {
int x = 0, f = 1;
char c = getchar();
while (!isdigit(c)) {
if (c == '-... | replace | 11 | 12 | 11 | 12 | 0 | |
p02869 | C++ | Runtime Error | #include "bits/stdc++.h"
#include <random>
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.e... | #include "bits/stdc++.h"
#include <random>
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.e... | replace | 55 | 59 | 55 | 65 | 0 | |
p02870 | C++ | Memory Limit Exceeded | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (int)(b); i++)
#define pb push_back
#define ALL(x) (x).begin(), (x).end()
#define st first
#define nd second
using namespace std;
const int maxN = 1 << 13;
const int mod = 998244353;
template <class T1, class T2> inline voi... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (int)(b); i++)
#define pb push_back
#define ALL(x) (x).begin(), (x).end()
#define st first
#define nd second
using namespace std;
const int maxN = 1 << 11;
const int mod = 998244353;
template <class T1, class T2> inline voi... | replace | 9 | 10 | 9 | 10 | MLE | |
p02873 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
using namespace std;
int main() {
int a[100000], min;
char s[100000];
long int sum;
scanf("%s", s);
a[0] = 0;
for (int i = 0; s[i] != '\0'; i++) {
if (s[i] == '<')
a[i + 1] = a[i] + 1;
else
a[i + 1] = a[i]... | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
using namespace std;
int main() {
int a[500000], min;
char s[500000];
long int sum;
scanf("%s", s);
a[0] = 0;
for (int i = 0; s[i] != '\0'; i++) {
if (s[i] == '<')
a[i + 1] = a[i] + 1;
else
a[i + 1] = a[i]... | replace | 8 | 10 | 8 | 10 | 0 | |
p02873 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define nmax 500005
#define oo 1000000007
#define reset(x, y) memset(x, y, sizeof(x))
#define s second
#define f first
#define PB(x) push_back(x)
#define Task ""
#define For(i, x, y) for (int i = x; i <= y; i++)
#define Fod(i, x, y) for (int i = x; i >= y; i--)
#define FOR(i, x) for (int i : x)... | #include <bits/stdc++.h>
#define nmax 500005
#define oo 1000000007
#define reset(x, y) memset(x, y, sizeof(x))
#define s second
#define f first
#define PB(x) push_back(x)
#define Task ""
#define For(i, x, y) for (int i = x; i <= y; i++)
#define Fod(i, x, y) for (int i = x; i >= y; i--)
#define FOR(i, x) for (int i : x)... | replace | 34 | 36 | 34 | 42 | TLE | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int a[maxn];
long long get(int x) { return 1ll * (x - 1) * x / 2; }
int main() {
freopen("inp.txt", "r", stdin);
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int n = s.length();
long long res = 0;
for (int i = ... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int a[maxn];
long long get(int x) { return 1ll * (x - 1) * x / 2; }
int main() {
// freopen("inp.txt", "r", stdin);
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int n = s.length();
long long res = 0;
for (int i... | replace | 10 | 11 | 10 | 11 | 0 | |
p02873 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#... | replace | 45 | 46 | 45 | 46 | 0 | |
p02873 | C++ | Runtime Error | ///------------------ ONESHOTAC -------------------
#include <bits/stdc++.h>
#define FOR(i, j, k) for (int i = j; i <= k; i++)
#define FORD(i, j, k) for (int i = j; i >= k; i--)
#define mp make_pair
// #define f first
// #define s second
// #define int long long
using namespace std;
const int MOD = 1e9 + 7;
const int... | ///------------------ ONESHOTAC -------------------
#include <bits/stdc++.h>
#define FOR(i, j, k) for (int i = j; i <= k; i++)
#define FORD(i, j, k) for (int i = j; i >= k; i--)
#define mp make_pair
// #define f first
// #define s second
// #define int long long
using namespace std;
const int MOD = 1e9 + 7;
const int... | replace | 11 | 12 | 11 | 12 | 0 | |
p02873 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
#define pb push_back
#define eb emplace_back
#define ins insert
#define ph push
#define f first
#... | #include "bits/stdc++.h"
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
#define pb push_back
#define eb emplace_back
#define ins insert
#define ph push
#define f first
#... | replace | 64 | 68 | 64 | 68 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
char S[1000000];
cin >> S;
vector<int> vec;
for (int i = 0; S[i] != '\0';) {
if (S[i] == '<') {
int n = 0;
// vec.push_back(n);
while (S[i] == '<') {
n++;
vec.push_back(n);
i++;
}
} else {
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
char S[1000000];
cin >> S;
vector<int> vec;
for (int i = 0; S[i] != '\0';) {
if (S[i] == '<') {
int n = 0;
// vec.push_back(n);
while (S[i] == '<') {
n++;
vec.push_back(n);
i++;
}
} else {
... | replace | 26 | 28 | 26 | 32 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
// use gp_hash_table<int,int,custom_hash> m;
// in place of map
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define repa(i, a, n) for (int i = a; i < n; ++i)
#define repr(i, n) for (int i = n - 1; i >= 0... | #include <bits/stdc++.h>
// use gp_hash_table<int,int,custom_hash> m;
// in place of map
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define repa(i, a, n) for (int i = a; i < n; ++i)
#define repr(i, n) for (int i = n - 1; i >= 0... | replace | 57 | 61 | 57 | 61 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn = 2e5 + 10;
char c[maxn];
int len, head[maxn], num;
struct Le {
int nt, to;
} edge[maxn << 1];
bool vis[maxn];
int M[maxn];
void dfs(int u, int dis) {
M[u] = max(M[u], dis);
for (int i = head[u]; i; i = edge[i].nt) {
int v = edg... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn = 5e5 + 10;
char c[maxn];
int len, head[maxn], num;
struct Le {
int nt, to;
} edge[maxn << 1];
bool vis[maxn];
int M[maxn];
void dfs(int u, int dis) {
M[u] = max(M[u], dis);
for (int i = head[u]; i; i = edge[i].nt) {
int v = edg... | replace | 3 | 4 | 3 | 4 | 0 | |
p02873 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define rep(i, x) for (int i = 0; i < x; i++)
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
type... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define rep(i, x) for (int i = 0; i < x; i++)
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
type... | insert | 60 | 60 | 60 | 66 | 0 | |
p02873 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
typedef l... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
typedef l... | insert | 99 | 99 | 99 | 101 | TLE | |
p02873 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
ll NumCount(ll Count0, ll Count1, string S,... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
ll NumCount(ll Count0, ll Count1, string &S... | replace | 16 | 17 | 16 | 17 | TLE | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
#define FORD(i, b, a) for (int i = b; i >= a; --i)
#define sz(v) ((int)v.size())
#define all(v) v.begin(), v.end()
#define uni(v) v.erase(unique(all(v)), v.end())
using namespace std;
const int m... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
#define FORD(i, b, a) for (int i = b; i >= a; --i)
#define sz(v) ((int)v.size())
#define all(v) v.begin(), v.end()
#define uni(v) v.erase(unique(all(v)), v.end())
using namespace std;
const int m... | replace | 12 | 13 | 12 | 13 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
typedef long long ll;
typedef pair<int64_t, int64_t> pll;
int dx[] = {1, -1, 0, 0, 1, -1, 1, -1};
int dy[] = {0, 0, 1, -1, 1, -1, -1, 1};
#define INF (2147483647)
#define mod (1000000007)
#define limit (7368791)
#define rep(i, a, b) for (int... | #include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
typedef long long ll;
typedef pair<int64_t, int64_t> pll;
int dx[] = {1, -1, 0, 0, 1, -1, 1, -1};
int dy[] = {0, 0, 1, -1, 1, -1, -1, 1};
#define INF (2147483647)
#define mod (1000000007)
#define limit (7368791)
#define rep(i, a, b) for (int... | replace | 44 | 47 | 44 | 48 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <numeric>
using ll = long long;
using namespace std;
ll mod = 1e9;
int main() {
string s;
cin >> s;
int N = s.size();
vector<pair<int, ll>> ans;
ll cnt(1);
for (int i(0); i < N - 1; i++) {
if (s[i] != s[i + 1]) {
if (s[i] == '<') {
ans.push_back({cnt, (ll... | #include <bits/stdc++.h>
#include <numeric>
using ll = long long;
using namespace std;
ll mod = 1e9;
int main() {
string s;
cin >> s;
int N = s.size();
vector<pair<int, ll>> ans;
ll cnt(1);
for (int i(0); i < N - 1; i++) {
if (s[i] != s[i + 1]) {
if (s[i] == '<') {
ans.push_back({cnt, (ll... | replace | 36 | 39 | 36 | 43 | 0 | |
p02873 | C++ | Runtime Error | /*input
<>>><<><<<<<>>><
*/
#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 tree<long long, null_type, less_equal<long long>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
#pra... | /*input
<>>><<><<<<<>>><
*/
#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 tree<long long, null_type, less_equal<long long>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
#pra... | replace | 25 | 26 | 25 | 26 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define cinsc \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(0);
#define all(con... | #include <bits/stdc++.h>
using namespace std;
#define cinsc \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(0);
#define all(con... | delete | 61 | 62 | 61 | 61 | 0 | |
p02873 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define all(v) (v).begin(), (v).end()
#define io ios::sync_with_stdio(0)
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define rson rt << 1 | 1, mid + 1, r
#define lson rt << 1, l, mid
#define lll __int128
#define pii pair<int, int>
#define fi first
#define se second
#d... | #include "bits/stdc++.h"
using namespace std;
#define all(v) (v).begin(), (v).end()
#define io ios::sync_with_stdio(0)
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define rson rt << 1 | 1, mid + 1, r
#define lson rt << 1, l, mid
#define lll __int128
#define pii pair<int, int>
#define fi first
#define se second
#d... | replace | 23 | 24 | 23 | 24 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<long long> VLL;
typedef vector<pair<int, int>> VP;
#define INF (int)(1e9)
#define MAXX 1.1529215e+18
#define inf 999999
#define EPS (1e-7)
#define MOD (1e9 + 7)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<long long> VLL;
typedef vector<pair<int, int>> VP;
#define INF (int)(1e9)
#define MAXX 1.1529215e+18
#define inf 999999
#define EPS (1e-7)
#define MOD (1e9 + 7)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for ... | insert | 40 | 40 | 40 | 45 | 0 | |
p02873 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define db long double
#define x first
#define y second
#define mp make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
using namespace std;
bool good(int index, vector<int> ans, string s) {
int n = ans.size();
if (ans[index] != -1)
return false;
if ... | #include <bits/stdc++.h>
#define ll long long
#define db long double
#define x first
#define y second
#define mp make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
using namespace std;
bool good(int index, vector<int> &ans, string &s) {
int n = ans.size();
if (ans[index] != -1)
return false;
i... | replace | 11 | 12 | 11 | 12 | TLE | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 100005;
inline int gi() {
char c = getchar();
while (c < '0' || c > '9')
c = getchar();
int sum = 0;
while ('0' <= c && c <= '9')
sum = sum * 10 + c - 48, c = getchar();
return sum;
}
char s[maxn];
int n, a[maxn], ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 500005;
inline int gi() {
char c = getchar();
while (c < '0' || c > '9')
c = getchar();
int sum = 0;
while ('0' <= c && c <= '9')
sum = sum * 10 + c - 48, c = getchar();
return sum;
}
char s[maxn];
int n, a[maxn], ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02873 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <list>
#include <string>
using namespace std;
int main() {
string str;
cin >> str;
list<int> l(1), r(1);
int cnt = 0;
for (auto &&i : str) {
if (i == '<') {
cnt++;
} else {
if (l.size())
cnt = 0;
}
l.push_back(cnt);
}
... | #include <algorithm>
#include <iostream>
#include <list>
#include <string>
using namespace std;
int main() {
string str;
cin >> str;
list<int> l(1), r(1);
int cnt = 0;
for (auto &&i : str) {
if (i == '<') {
cnt++;
} else {
cnt = 0;
}
l.push_back(cnt);
}
reverse(begin(str), en... | replace | 16 | 18 | 16 | 17 | TLE | |
p02873 | C++ | Runtime Error | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;
typedef pair<int, pi> pii;
typedef vector<int> vi;
typedef vector<ld... | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;
typedef pair<int, pi> pii;
typedef vector<int> vi;
typedef vector<ld... | replace | 170 | 171 | 170 | 171 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int maxn = 200010;
int n;
vector<int> adj[maxn];
int dp[maxn];
int dfs(int u) {
if (dp[u] != -1) {
return dp[u];
}
dp[u] = 0;
for (int v : adj[u]) {
dp[u] = max(dp[u], dfs(v) + 1);
}
return dp[u]... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int maxn = 500010;
int n;
vector<int> adj[maxn];
int dp[maxn];
int dfs(int u) {
if (dp[u] != -1) {
return dp[u];
}
dp[u] = 0;
for (int v : adj[u]) {
dp[u] = max(dp[u], dfs(v) + 1);
}
return dp[u]... | replace | 5 | 6 | 5 | 6 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int max_n = 100005;
char s[max_n];
int l[max_n], r[max_n];
int main() {
scanf(" %s", s + 1);
int n = strlen(s + 1) + 1;
for (int i = 2; i <= n; i++) {
if (s[i - 1] == '<')
l[i] = l[i - 1] + 1;
}
for (int i = n - 1; i >= 1; i--... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int max_n = 500005;
char s[max_n];
int l[max_n], r[max_n];
int main() {
scanf(" %s", s + 1);
int n = strlen(s + 1) + 1;
for (int i = 2; i <= n; i++) {
if (s[i - 1] == '<')
l[i] = l[i - 1] + 1;
}
for (int i = n - 1; i >= 1; i--... | replace | 3 | 4 | 3 | 4 | 0 | |
p02873 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
#define FOR(i, N) for (int i = 0; i < (int)N; i++)
#define... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
#define FOR(i, N) for (int i = 0; i < (int)N; i++)
#define... | replace | 72 | 73 | 72 | 73 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ll long long int
const int INF = 2147483647;
const ll MOD = 1000000007;
using namespace std;
int main() {
vector<ll> a;
string s;
cin >> s;
int n = s.length();
char init = s[0], la... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ll long long int
const int INF = 2147483647;
const ll MOD = 1000000007;
using namespace std;
int main() {
vector<ll> a;
string s;
cin >> s;
int n = s.length();
char init = s[0], la... | insert | 30 | 30 | 30 | 34 | 0 | |
p02873 | C++ | Runtime Error | #include <deque>
#include <stdio.h>
#include <utility>
using namespace std;
using ll = long long;
ll max(ll x, ll y) {
if (x < y) {
return y;
} else {
return x;
}
}
int main(void) {
ll ans = 0LL;
deque<pair<char, ll>> v = {make_pair(getchar(), 1LL)};
int d;
while ((d = getchar()) != EOF) {
... | #include <deque>
#include <stdio.h>
#include <utility>
using namespace std;
using ll = long long;
ll max(ll x, ll y) {
if (x < y) {
return y;
} else {
return x;
}
}
int main(void) {
ll ans = 0LL;
deque<pair<char, ll>> v = {make_pair(getchar(), 1LL)};
int d;
while ((d = getchar()) != EOF) {
... | insert | 20 | 20 | 20 | 23 | -11 | |
p02873 | C++ | Runtime Error | /// not today
#include <bits/stdc++.h>
using namespace std;
#define SZ(x) (int)(x).size()
#define pb push_back
#define ll long long
#define xmax(x, y) (x) = max((x), (y))
#define xmin(x, y) (x) = min((x), (y))
#define F first
#define S second
#define pii pair<int, int>
#define pll pair<long long, long long>
#define i... | /// not today
#include <bits/stdc++.h>
using namespace std;
#define SZ(x) (int)(x).size()
#define pb push_back
#define ll long long
#define xmax(x, y) (x) = max((x), (y))
#define xmin(x, y) (x) = min((x), (y))
#define F first
#define S second
#define pii pair<int, int>
#define pll pair<long long, long long>
#define i... | replace | 18 | 19 | 18 | 19 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
#define x first
#define y second
#define mp make_pair
#define pb push_back
template <typename TYPE> inline void chkmax(TYPE &x, TYPE y) {
x < y ? x = y : 0;
}
template <typename TYPE> inline... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
#define x first
#define y second
#define mp make_pair
#define pb push_back
template <typename TYPE> inline void chkmax(TYPE &x, TYPE y) {
x < y ? x = y : 0;
}
template <typename TYPE> inline... | replace | 26 | 27 | 26 | 27 | 0 | |
p02873 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = (ll)(1e9 + 7);
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll b) {
a = (a < MOD) ? a : (a - MOD);
b = (b < MOD) ? b : (b - M... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int INF = (1 << 30);
const ll INFLL = (1ll << 60);
const ll MOD = (ll)(1e9 + 7);
#define l_ength size
void mul_mod(ll &a, ll b) {
a *= b;
a %= MOD;
}
void add_mod(ll &a, ll b) {
a = (a < MOD) ? a : (a - MOD);
b = (b < MOD) ? b : (b - M... | replace | 21 | 22 | 21 | 22 | 0 | |
p02873 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
vector<int64_t> A(S.size() + 1, 0);
for (int i = 1; i <= S.size(); i++) {
if (S.at(i - 1) == '<') {
A.at(i) = A.at(i - 1) + 1;
} else {
int64_t cnt = 0;
for (int j = i - 1; j < S.size(); j++) {
if (... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
vector<int64_t> A(S.size() + 1, 0);
for (int i = 1; i <= S.size(); i++) {
if (S.at(i - 1) == '<') {
A.at(i) = A.at(i - 1) + 1;
} else {
int64_t cnt = 0;
for (int j = i - 1; j < S.size(); j++) {
if (... | insert | 24 | 24 | 24 | 25 | TLE | |
p02873 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define MOD 1000000007
#define f(i, n) for (int i = 0; i < (int)(n); i++)
#define N 200010
int main(... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define MOD 1000000007
#define f(i, n) for (int i = 0; i < (int)(n); i++)
#define N 500010
int main(... | replace | 14 | 15 | 14 | 15 | 0 | |
p02873 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.length();
int i;
int chk = 0;
long ans = 0;
int a[n + 1];
for (i = 0; i < n + 1; i++) {
a[i] = 0;
}
while (chk == 0) {
chk = 1;
for (i = 0; i < n; i++) {
if (s[i] == '<') {
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.length();
int i;
int chk = 0;
long ans = 0;
int a[n + 1];
for (i = 0; i < n + 1; i++) {
a[i] = 0;
}
while (chk == 0) {
chk = 1;
for (i = 0; i < n; i++) {
if (s[i] == '<') {
... | insert | 30 | 30 | 30 | 43 | TLE | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 300100;
char str[maxn];
int l[maxn], r[maxn];
int Max(int x, int y) { return x > y ? x : y; }
int main() {
// freopen("A.in","r",stdin);
scanf("%s", str + 1);
int n = strlen(str + 1);
for (int i = 1; i <= n; i++) {
if (str[i] == '<')
l[i] ... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 500100;
char str[maxn];
int l[maxn], r[maxn];
int Max(int x, int y) { return x > y ? x : y; }
int main() {
// freopen("A.in","r",stdin);
scanf("%s", str + 1);
int n = strlen(str + 1);
for (int i = 1; i <= n; i++) {
if (str[i] == '<')
l[i] ... | replace | 2 | 3 | 2 | 3 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pii pair<int, int>
#define mp make_pair
#define fi first
#define se second
#define eb emplace_back
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 233;
char s[maxn];
ll ans = 0;
int main() {
scanf("%s", s);
int n = strle... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pii pair<int, int>
#define mp make_pair
#define fi first
#define se second
#define eb emplace_back
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e6 + 233;
char s[maxn];
ll ans = 0;
int main() {
scanf("%s", s);
int n = strle... | replace | 10 | 11 | 10 | 11 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int maxn = 100000;
char s[maxn + 5];
int n;
int a[maxn + 5], v[maxn + 5];
signed main() {
scanf("%s", s + 1);
n = strlen(s + 1);
s[0] = '>';
s[n + 1] = '<';
for (int i = 1; i <= n + 1; i++) {
if (s[i - 1] == '>' && s[i] == '<')
... | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int maxn = 500000;
char s[maxn + 5];
int n;
int a[maxn + 5], v[maxn + 5];
signed main() {
scanf("%s", s + 1);
n = strlen(s + 1);
s[0] = '>';
s[n + 1] = '<';
for (int i = 1; i <= n + 1; i++) {
if (s[i - 1] == '>' && s[i] == '<')
... | replace | 3 | 4 | 3 | 4 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 100100;
int N;
string s;
int A[MAXN];
int blo[MAXN];
int res[MAXN];
int main() {
ios_base::sync_with_stdio(0);
cin >> s;
N = s.length();
blo[N] = 0;
for (int i = N - 1; i >= 0; i--) {
if (s[i] == '<') {
blo[i] ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 500100;
int N;
string s;
int A[MAXN];
int blo[MAXN];
int res[MAXN];
int main() {
ios_base::sync_with_stdio(0);
cin >> s;
N = s.length();
blo[N] = 0;
for (int i = N - 1; i >= 0; i--) {
if (s[i] == '<') {
blo[i] ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long int ll;
typedef pair<int, int> P;
string s;
ll l[101010], r[101010];
int main() {
cin >> s;
int n = s.size();
l[0] = 0;
r[n] = 0;
rep(i, n) {
if (s[i] == '<') {
l[i + 1] = l[i] + 1L... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long int ll;
typedef pair<int, int> P;
string s;
ll l[505050], r[505050];
int main() {
cin >> s;
int n = s.size();
l[0] = 0;
r[n] = 0;
rep(i, n) {
if (s[i] == '<') {
l[i + 1] = l[i] + 1L... | replace | 7 | 8 | 7 | 8 | 0 | |
p02873 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
string s;
cin >> s;
ll n = s.length();
ll st = -1, en = -1;
for (ll i = 0; i < n; i++) {
if (s[i] == '<') {
st = i;
break;
}
}
for (ll i = n - 1; i >= 0; i--) {
if (s[i] == '>') {
en = i;
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
string s;
cin >> s;
ll n = s.length();
ll st = -1, en = -1;
for (ll i = 0; i < n; i++) {
if (s[i] == '<') {
st = i;
break;
}
}
for (ll i = n - 1; i >= 0; i--) {
if (s[i] == '>') {
en = i;
... | insert | 22 | 22 | 22 | 29 | TLE | |
p02873 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
using ll = long long;
// Solve when the interval [a, b] contains no ><
// -> It has form <<<<<<>>>>>>>
ll solve(string str, int a, int b) {
int x = 0;
int y = 0;
for (int i = a; i <= b; ++i) {
if (str[i] == '<')
++x;
else
++y;
}
/... | #include <iostream>
#include <vector>
using namespace std;
using ll = long long;
// Solve when the interval [a, b] contains no ><
// -> It has form <<<<<<>>>>>>>
ll solve(const string &str, int a, int b) {
int x = 0;
int y = 0;
for (int i = a; i <= b; ++i) {
if (str[i] == '<')
++x;
else
++y;
... | replace | 7 | 8 | 7 | 8 | TLE | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define sb __builtin_popcount
#define MOD (ll)1000000007
int rate[100000 + 10];
long long values[100000 + 10];
int32_t main() {
long long ans = 0, tmp = 0;
string s;
cin >> s;
int n = s.size() + 1;
vector<int> rate;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define sb __builtin_popcount
#define MOD (ll)1000000007
long long values[600000];
int32_t main() {
long long ans = 0, tmp = 0;
string s;
cin >> s;
int n = s.size() + 1;
vector<int> rate;
rate.push_back(0);
for (in... | replace | 7 | 9 | 7 | 8 | 0 | |
p02873 | C++ | Time Limit Exceeded | // Author : Ritik Patel
// Institution: Pandit Deendayal Petroleum University
#include <bits/stdc++.h>
using namespace std;
#define ub upper_bound // first element > val(itr)
#define lb lower_bound // first element >= val(itr)
#define pb push_back
#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
... | // Author : Ritik Patel
// Institution: Pandit Deendayal Petroleum University
#include <bits/stdc++.h>
using namespace std;
#define ub upper_bound // first element > val(itr)
#define lb lower_bound // first element >= val(itr)
#define pb push_back
#define sz(a) int((a).size())
#define all(c) (c).begin(), (c).end()
... | insert | 157 | 157 | 157 | 158 | TLE | |
p02873 | C++ | Runtime Error | #pragma GCC target("avx2")
#pragma GCC optimize("O3")
// # include <x86intrin.h>
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_t... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define _USE_MATH_DEFINES_
#define ll lon... | delete | 0 | 4 | 0 | 0 | 0 | |
p02873 | C++ | Runtime Error | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int long long
using namespace std;
vector<vector<int>> adj;
int dp[100005];
int vis[100005];
int ans = 0;
int dfs(int ver) {
vis[ver... | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int long long
using namespace std;
vector<vector<int>> adj;
int dp[500005];
int vis[500005];
int ans = 0;
int dfs(int ver) {
vis[ver... | replace | 8 | 10 | 8 | 10 | 0 | Time: 0.000066
|
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define maxn 200005
#define ll long long
#define mod 1000000007
typedef pair<int, int> P;
int n;
char s[maxn];
vector<int> v[maxn];
bool used[maxn];
ll d[maxn];
void dfs(int now) {
if (used[now])
return;
used[now] = 1;
d[now] = 0;
if (v[now].empty())
retu... | #include <bits/stdc++.h>
using namespace std;
#define maxn 500005
#define ll long long
#define mod 1000000007
typedef pair<int, int> P;
int n;
char s[maxn];
vector<int> v[maxn];
bool used[maxn];
ll d[maxn];
void dfs(int now) {
if (used[now])
return;
used[now] = 1;
d[now] = 0;
if (v[now].empty())
retu... | replace | 2 | 3 | 2 | 3 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define fileio ... | #include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define fileio ... | replace | 30 | 31 | 30 | 31 | 0 | |
p02873 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define ll long long
#define rep(i, n) for (int ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define ll long long
#define rep(i, n) for (int ... | replace | 24 | 26 | 24 | 26 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
const ll inf = 3e18;
const char sp = ' ';
int N, A[100000];
ll res;
string S;
int main() {
cin >> S;
N = S.size() + 1;
for (int i = 0; i < N - 1; i++) {
if (S[i] == '<') {
A[i + 1] = A[i] + 1;
}
}
fo... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
const ll inf = 3e18;
const char sp = ' ';
int N, A[500000];
ll res;
string S;
int main() {
cin >> S;
N = S.size() + 1;
for (int i = 0; i < N - 1; i++) {
if (S[i] == '<') {
A[i + 1] = A[i] + 1;
}
}
fo... | replace | 7 | 8 | 7 | 8 | 0 | |
p02873 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
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;
}
#define rep(i, n) for (int i = 0; i... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
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;
}
#define rep(i, n) for (int i = 0; i... | replace | 25 | 26 | 25 | 26 | 0 | |
p02873 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef pair<int, int> P;
typedef long long ll;
vector<int> dp(100100, -1);
string s;
int n;
int rec(int node) {
if (dp[node] >= 0) {
return dp[node];
} else {
int res = 0;
if (node > 0 && node <= n && s[n... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef pair<int, int> P;
typedef long long ll;
vector<int> dp(500100, -1);
string s;
int n;
int rec(int node) {
if (dp[node] >= 0) {
return dp[node];
} else {
int res = 0;
if (node > 0 && node <= n && s[n... | replace | 5 | 6 | 5 | 6 | 0 | |
p02873 | C++ | Runtime Error |
#include <bits/stdc++.h>
#define deb(x) cerr << (#x) << " is " << (x) << "\n"
#define ll long long int
#define ld long double
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
ll powmod(ll a, ll b) {
ll res = 1ll;
while (b) {
if (b % 2 == 1)
res = (res * a) % MOD;
a = (a * a) % MOD;
... |
#include <bits/stdc++.h>
#define deb(x) cerr << (#x) << " is " << (x) << "\n"
#define ll long long int
#define ld long double
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
ll powmod(ll a, ll b) {
ll res = 1ll;
while (b) {
if (b % 2 == 1)
res = (res * a) % MOD;
a = (a * a) % MOD;
... | delete | 21 | 25 | 21 | 21 | 0 | |
p02873 | C++ | Runtime Error | /*
<>>><<><<<< < > > > <
012345678910 11 12 13 14 15
0<1>2>3>4<5<6>7<8<9<10<11<12>13>14>15<16
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string S;
cin >> S;
vector<ll> num(S.size(), 10);
if (S[0] == '<') {
num[0] = 0;
}
if (S[S.size() - 1] == '>') {
nu... | /*
<>>><<><<<< < > > > <
012345678910 11 12 13 14 15
0<1>2>3>4<5<6>7<8<9<10<11<12>13>14>15<16
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string S;
cin >> S;
vector<int> num(S.size());
if (S[0] == '<') {
num[0] = 0;
}
if (S[S.size() - 1] == '>') {
num[S... | replace | 12 | 13 | 12 | 13 | -6 | Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
|
p02874 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define End exit(0)
#define LL long long
#define mp make_pair
#define SZ(x) ((int)x.size())
#define GO cerr << "GO" << endl
#define DE(x) cout << #x << " = " << x << endl
#define DEBUG(...) fprintf(std... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define End exit(0)
#define LL long long
#define mp make_pair
#define SZ(x) ((int)x.size())
#define GO cerr << "GO" << endl
#define DE(x) cout << #x << " = " << x << endl
#define DEBUG(...) fprintf(std... | delete | 91 | 95 | 91 | 91 | TLE | |
p02874 | Python | Runtime Error | #!/usr/bin/env python3
n = int(input())
p = sorted(list(map(int, input().split())) for _ in range(n))
lmax = n - 1
rmin = 0
for i in range(n):
if p[i][1] <= p[rmin][1]:
rmin = i
ans = 0
# same(lmax, rmin)
dmax = 0
for i in range(n):
if i == lmax or i == rmin:
continue
if p[i][1] - p[i][0]... | #!/usr/bin/env python3
n = int(input())
p = sorted(list(map(int, input().split())) for _ in range(n))
lmax = n - 1
rmin = 0
for i in range(n):
if p[i][1] <= p[rmin][1]:
rmin = i
ans = 0
# same(lmax, rmin)
dmax = 0
for i in range(n):
if i == lmax or i == rmin:
continue
if p[i][1] - p[i][0]... | replace | 19 | 21 | 19 | 21 | 0 | |
p02874 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define P pair<int, int>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define pb push_back
template <class T> void chmax(T &a, T b) {
if (a < b)
a = b;
}
template <class T> void chmin(T &a, ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define P pair<int, int>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define pb push_back
template <class T> void chmax(T &a, T b) {
if (a < b)
a = b;
}
template <class T> void chmin(T &a, ... | replace | 126 | 127 | 126 | 132 | 0 | |
p02874 | C++ | Time Limit Exceeded | typedef long long ll;
typedef long double ld;
#include <bits/stdc++.h>
using namespace std;
struct aa {
ll l, r;
};
int main() {
ll n;
std::cin >> n;
vector<aa> a(n);
ll maxl = -1;
ll minr = 1e18;
ll maxli;
ll minri;
ll ans = 0;
for (int i = 0; i < n; i++) {
std::cin >> a[i].l >> a[i].r;
... | typedef long long ll;
typedef long double ld;
#include <bits/stdc++.h>
using namespace std;
struct aa {
ll l, r;
};
int main() {
ll n;
std::cin >> n;
vector<aa> a(n);
ll maxl = -1;
ll minr = 1e18;
ll maxli;
ll minri;
ll ans = 0;
for (int i = 0; i < n; i++) {
std::cin >> a[i].l >> a[i].r;
... | replace | 43 | 46 | 43 | 44 | TLE | |
p02874 | C++ | Runtime Error | #if __has_include("../library/Basic/Debug.hpp")
#include "../library/Basic/Debug.hpp"
#else
/* ----- Header Files ----- */
// IO
#include <cstdio>
#include <iomanip>
#include <ios>
#include <iostream>
// algorithm
#include <algorithm>
#include <cmath>
#include <numeric>
// container
#include <array>
#include <bits... | #if __has_include("../library/Basic/Debug.hpp")
#include "../library/Basic/Debug.hpp"
#else
/* ----- Header Files ----- */
// IO
#include <cstdio>
#include <iomanip>
#include <ios>
#include <iostream>
// algorithm
#include <algorithm>
#include <cmath>
#include <numeric>
// container
#include <array>
#include <bits... | replace | 116 | 117 | 116 | 117 | 0 | |
p02874 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll, ll> P;
typedef vector<P> vpl;
#... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll, ll> P;
typedef vector<P> vpl;
#... | replace | 79 | 81 | 79 | 81 | -6 | free(): double free detected in tcache 2
|
p02874 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long... | replace | 322 | 323 | 322 | 323 | 0 | |
p02874 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MOD = 1000000007;
signed main() {
int n;
cin >> n;
pair<int, int> p[n], q[n];
int l, r;
pair<int, pair<int, int>> t[n];
for (int i = 0; i < n; i++) {
cin >> l >> r;
p[i] = make_pair(r, l);
q[i] = make_pair(l, r);
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MOD = 1000000007;
signed main() {
int n;
cin >> n;
pair<int, int> p[n], q[n];
int l, r;
pair<int, pair<int, int>> t[n];
for (int i = 0; i < n; i++) {
cin >> l >> r;
p[i] = make_pair(r, l);
q[i] = make_pair(l, r);
... | replace | 42 | 43 | 42 | 46 | 0 | 4
5
5
|
p02874 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
const long long MOD = 1000000007LL;
const string alpha = "abcdefghijklmnopqrstuvwxyz";
struct... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
const long long MOD = 1000000007LL;
const string alpha = "abcdefghijklmnopqrstuvwxyz";
struct... | replace | 16 | 17 | 16 | 17 | 0 | |
p02874 | C++ | Time Limit Exceeded | #define y1 askjdkasldjlkasd
#include <bits/stdc++.h>
#undef y1
using namespace std;
#define pb push_back
#define mp make_pair
#define fi(a, b) for (int i = a; i <= b; i++)
#define fj(a, b) for (int j = a; j <= b; j++)
#define fo(a, b) for (int o = a; o <= b; o++)
#define fdi(a, b) for (int i = a; i >= b; i--)
#define... | #define y1 askjdkasldjlkasd
#include <bits/stdc++.h>
#undef y1
using namespace std;
#define pb push_back
#define mp make_pair
#define fi(a, b) for (int i = a; i <= b; i++)
#define fj(a, b) for (int j = a; j <= b; j++)
#define fo(a, b) for (int o = a; o <= b; o++)
#define fdi(a, b) for (int i = a; i >= b; i--)
#define... | replace | 131 | 132 | 131 | 132 | TLE | |
p02875 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
const int MOD = 998244353;
long long modPow(long long a, long long p) {
if (p == 0)
return 1;
auto res = modPow(a, p / 2);
res = (res * res) % MOD;
if (p % 2)
res = (res * a) % MOD;
return res;
}
long long calcInv(long long a) { return mod... | #include <iostream>
#include <vector>
using namespace std;
const int MOD = 998244353;
long long modPow(long long a, long long p) {
if (p == 0)
return 1;
auto res = modPow(a, p / 2);
res = (res * res) % MOD;
if (p % 2)
res = (res * a) % MOD;
return res;
}
long long calcInv(long long a) { return mod... | replace | 20 | 21 | 20 | 21 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.