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
p02702
C++
Runtime Error
#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; typedef pair<int, int> pii; int main() { string s; cin >> s; int n = s.size(); vector<ll> vec(n); vector<ll> ls(2020, 0); vec[n - 1] = s[n - 1...
#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; typedef pair<int, int> pii; int main() { string s; cin >> s; int n = s.size(); vector<ll> vec(n); vector<ll> ls(2020, 0); vec[n - 1] = s[n - 1...
replace
14
15
14
15
0
p02702
C++
Runtime Error
// #pragma once #include <algorithm> #include <bitset> #include <cctype> #include <cstdlib> // srand,rand #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stdio.h> #include <std...
// #pragma once #include <algorithm> #include <bitset> #include <cctype> #include <cstdlib> // srand,rand #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stdio.h> #include <std...
insert
623
623
623
628
0
p02702
C++
Memory Limit Exceeded
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string.h> #include <string> #define N 2019 typedef long long LL; using namespace std; char s[305000]; short dp[305000][N + 1]; int main() { memset(dp, 0LL, sizeof(dp)); scanf("%s", s + 1); int ls = strlen(s + 1); int a; LL...
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> #include <string.h> #include <string> #define N 2019 typedef long long LL; using namespace std; char s[200005]; short dp[200005][N + 1]; int main() { memset(dp, 0LL, sizeof(dp)); scanf("%s", s + 1); int ls = strlen(s + 1); int a; LL...
replace
9
11
9
11
MLE
p02702
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a) for (int i = 0; i < (a); i++) const ll MOD = 1000000007; // const ll MOD=998244353; int cnt[2020]; int main() { string S; cin >> S; cnt[0] = 1; ll sum = 0, pre = 0, x = 1; for (int i = S.length() - 1; i >= 0; i--) { in...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a) for (int i = 0; i < (a); i++) const ll MOD = 1000000007; // const ll MOD=998244353; int cnt[2020]; int main() { string S; cin >> S; cnt[0] = 1; ll sum = 0, pre = 0, x = 1; for (int i = S.length() - 1; i >= 0; i--) { in...
replace
19
20
19
20
0
p02702
C++
Runtime Error
// header {{{ // header {{{ using namespace std; #include <bits/stdc++.h> #define CPP_STR(x) CPP_STR_I(x) #define CPP_CAT(x, y) CPP_CAT_I(x, y) #define CPP_STR_I(args...) #args #define CPP_CAT_I(x, y) x##y #define ASSERT(expr...) assert((expr)) using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = ...
// header {{{ // header {{{ using namespace std; #include <bits/stdc++.h> #define CPP_STR(x) CPP_STR_I(x) #define CPP_CAT(x, y) CPP_CAT_I(x, y) #define CPP_STR_I(args...) #args #define CPP_CAT_I(x, y) x##y #define ASSERT(expr...) assert((expr)) using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = ...
replace
139
140
139
140
0
p02702
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const int m = 2019; int main() { string s; cin >> s; int n = s.size(); reverse(s.begin(), s.end()); int x = 1; int tot = 0; vector<int> count(m); ll ans = 0; for (int i = 0; i < n; i++) { count[tot]++; tot += (s[i] - '0') * ...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int m = 2019; int main() { string s; cin >> s; int n = s.size(); reverse(s.begin(), s.end()); int x = 1; int tot = 0; vector<int> count(m); ll ans = 0; for (int i = 0; i < n; i++) { count[tot]++; tot += (s[i] - '0') * ...
insert
18
18
18
19
-11
p02702
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int cnt[2020]; int num[100001]; int main(void) { string s; cin >> s; int tmp = 0; int mul = 1; cnt[0]++; int size = s.size(); for (int i = 0; i < size; i++) { tmp += (s[size - i - 1] - '0') * mul % 2019; tmp %= 2019; mul *= 10; mul %= 2019; ...
#include <bits/stdc++.h> using namespace std; int cnt[2020]; int num[200001]; int main(void) { string s; cin >> s; int tmp = 0; int mul = 1; cnt[0]++; int size = s.size(); for (int i = 0; i < size; i++) { tmp += (s[size - i - 1] - '0') * mul % 2019; tmp %= 2019; mul *= 10; mul %= 2019; ...
replace
4
5
4
5
0
p02702
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2e4 + 9; int main() { char s[maxn]; scanf("%s", s + 1); int len = strlen(s + 1); ll d[maxn] = {0}, b[maxn] = {0}; ll ans = 0; for (int i = 1; i <= len; i++) { int num = s[i] - '0'; d[num]++; for (int j = 0; j < ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2e5 + 9; int main() { char s[maxn]; scanf("%s", s + 1); int len = strlen(s + 1); ll d[maxn] = {0}, b[maxn] = {0}; ll ans = 0; for (int i = 1; i <= len; i++) { int num = s[i] - '0'; d[num]++; for (int j = 0; j < ...
replace
3
4
3
4
0
p02702
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef unsigned long long int uli; typedef long double Lf; typedef pair<int, int> pii; typedef vector<int> vi; #define fastIO \ std::ios::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef unsigned long long int uli; typedef long double Lf; typedef pair<int, int> pii; typedef vector<int> vi; #define fastIO \ std::ios::sync_with_stdio(false); ...
replace
11
12
11
12
0
p02702
C++
Runtime Error
#include <stdio.h> char s[200200]; long long p[2019], q[2019], a; int main() { scanf("%s", s); for (int i = 0; s[i]; i++) { for (int j = 0; j < 2019; j++) p[j] = q[j], q[j] = 0; p[0]++; for (int i = 0; i < 2019; i++) q[(i * 10 + s[i] - '0') % 2019] += p[i]; a += q[0]; } printf("%ll...
#include <stdio.h> char s[200200]; long long p[2019], q[2019], a; int main() { scanf("%s", s); for (int i = 0; s[i]; i++) { for (int j = 0; j < 2019; j++) p[j] = q[j], q[j] = 0; p[0]++; for (int j = 0; j < 2019; j++) q[(j * 10 + s[i] - '0') % 2019] += p[j]; a += q[0]; } printf("%ll...
replace
11
13
11
13
0
p02702
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() string char_to_string(char val) { return string(1, val); } int char_to_int(char val) { return val - '0'; } int main() { string S; cin >> S; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() string char_to_string(char val) { return string(1, val); } int char_to_int(char val) { return val - '0'; } int main() { string S; cin >> S; ...
replace
13
26
13
26
TLE
p02702
C++
Runtime Error
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const ll INF = 1001001001; const ll LINF = 1001001001001001001; void prvec(vector<ll> vec) { // for debug ll n = vec.size(); cout << "------------------...
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const ll INF = 1001001001; const ll LINF = 1001001001001001001; void prvec(vector<ll> vec) { // for debug ll n = vec.size(); cout << "------------------...
replace
30
31
30
31
-11
p02702
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define REP(i, a, n) for (int i = (a); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define FOR(it, c) \ for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it) #define ALLOF(c) (c).begin(), (c)....
#include <bits/stdc++.h> using namespace std; #define REP(i, a, n) for (int i = (a); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define FOR(it, c) \ for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it) #define ALLOF(c) (c).begin(), (c)....
replace
10
11
10
11
MLE
p02702
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <vector> // #include <stdio.h> // #include <stack> // #include <queue> // #include <cstdio> #include <cmath> #include <fstream> #include <iterator> #include <map> // #include <list> #include <iomanip> // #include <stdlib.h> // #inclu...
#include <algorithm> #include <iostream> #include <numeric> #include <string> #include <vector> // #include <stdio.h> // #include <stack> // #include <queue> // #include <cstdio> #include <cmath> #include <fstream> #include <iterator> #include <map> // #include <list> #include <iomanip> // #include <stdlib.h> // #inclu...
replace
189
217
189
209
TLE
p02702
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int64_t N = S.size(); int64_t ans = 0, l = 0, r = 3; for (int i = 0; i < N - 4; i++) { int64_t a = stoi(S.substr(i, 5)); int64_t r = a % 2019; if (r == 0) ans++; for (int j = i + 5; j < N; j++) { int64_...
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int64_t N = S.size(); reverse(S.begin(), S.end()); vector<int64_t> Count(2019, 0); Count[0]++; int64_t num = 1, cur = 0, ans = 0; for (int i = 1; i <= N; i++) { int sint = S[i - 1] - '0'; cur = (cur + sint * num) % 2...
replace
7
20
7
20
TLE
p02702
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #incl...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #incl...
insert
49
49
49
50
0
p02702
C++
Time Limit Exceeded
#include <bits/stdc++.h> // #include <atcoder/all> using namespace std; // using namespace atcoder; typedef long long ll; /* clang-format off */ #define MOD 2019 #define INF 1000000000000000000ll #define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(a) (a).begin(), (a).end() //#define __DEBUG__ ...
#include <bits/stdc++.h> // #include <atcoder/all> using namespace std; // using namespace atcoder; typedef long long ll; /* clang-format off */ #define MOD 2019 #define INF 1000000000000000000ll #define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(a) (a).begin(), (a).end() //#define __DEBUG__ ...
replace
36
37
36
37
TLE
p02702
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (long long i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define pq priority_queue using vi = vector<int>; // intの1次元の型に vi という別名をつける using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける using vvvi = vector<vvi>; using ll = long long; // long lo...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (long long i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define pq priority_queue using vi = vector<int>; // intの1次元の型に vi という別名をつける using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける using vvvi = vector<vvi>; using ll = long long; // long lo...
replace
453
455
453
462
TLE
p02702
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; long long n, len, dp[2][200002]; string s; int main() { ios_base::sync_with_stdio(0); cin.tie(0); // freopen("test.inp","r",stdin); // freopen("test.out","w",stdout); cin >> s; len = s.length(); long long res = 0; dp[0][(s[0] - '0') % 2019] = 1; for (int i...
#include <bits/stdc++.h> using namespace std; long long n, len, dp[2][2020]; string s; int main() { ios_base::sync_with_stdio(0); cin.tie(0); // freopen("test.inp","r",stdin); // freopen("test.out","w",stdout); cin >> s; len = s.length(); long long res = 0; dp[0][(s[0] - '0') % 2019] = 1; for (int i =...
replace
2
3
2
3
TLE
p02702
C++
Runtime Error
#include <stdio.h> char s[20010]; int c[2020], inv = 202; int main() { int ans = 0, tt = 1, cur = 0; scanf("%s", s); c[0] = 1; for (int i = 0; s[i]; i++) { int x = s[i] - '0'; cur = (cur * 10 + x) % 2019; tt = (tt * inv) % 2019; ans += c[(cur * tt) % 2019]; c[(cur * tt) % 2019]++; } prin...
#include <stdio.h> char s[200010]; int c[2020], inv = 202; int main() { int ans = 0, tt = 1, cur = 0; scanf("%s", s); c[0] = 1; for (int i = 0; s[i]; i++) { int x = s[i] - '0'; cur = (cur * 10 + x) % 2019; tt = (tt * inv) % 2019; ans += c[(cur * tt) % 2019]; c[(cur * tt) % 2019]++; } pri...
replace
1
2
1
2
0
p02702
C++
Time Limit Exceeded
#include <bits/stdc++.h> // #define fi first // #define se second #define rep(i, n) for (ll i = 0; i < (n); i++) #define ALL(v) (v).begin(), (v).end() #define FORR(i, a, b) for (int i = (b)-1; i >= (a); --i) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } tem...
#include <bits/stdc++.h> // #define fi first // #define se second #define rep(i, n) for (ll i = 0; i < (n); i++) #define ALL(v) (v).begin(), (v).end() #define FORR(i, a, b) for (int i = (b)-1; i >= (a); --i) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } tem...
replace
193
202
193
198
TLE
p02702
C++
Runtime Error
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> /*                     ...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <vector> /*                     ...
replace
96
97
96
97
-11
p02702
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; #pragma region Macros #define FOR(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++) #define rep(i, n) FOR(i, 0, n) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; } template <class T> bo...
#include <bits/stdc++.h> using namespace std; using ll = long long; #pragma region Macros #define FOR(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++) #define rep(i, n) FOR(i, 0, n) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; } template <class T> bo...
replace
116
118
116
119
MLE
p02702
C++
Runtime Error
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; const ll LINF = 1LL << 60; const int INF = 1 << 29; const int MOD = 2019; ll modpow(int a, int n) { ll res = 1; while (n > 0) { ...
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; const ll LINF = 1LL << 60; const int INF = 1 << 29; const int MOD = 2019; ll modpow(int a, int n) { ll res = 1; while (n > 0) { ...
replace
20
21
20
21
0
p02702
C++
Runtime Error
#include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { string s; cin >> s; vector<ll> x(2019, 0); x[0] += 1; ll k = 0; ll p = 1; for (int i = 1; i <= s.size(); i++) { k += ((ll)(s[s.size() - i] - '0')) * p % 2019; k %= 2019; x[k % 2019...
#include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { string s; cin >> s; vector<ll> x(2019, 0); x[0] += 1; ll k = 0; ll p = 1; for (int i = 1; i <= s.size(); i++) { k += ((ll)(s[s.size() - i] - '0')) * p % 2019; k %= 2019; x[k % 2019...
insert
19
19
19
20
0
p02702
C++
Runtime Error
#include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; int main() { string s; cin >> s; int n = s.size(), a = 0, b = 1, r[2019]; rep(i, 2019) r[i] = 0; rep(i, n) { a = (a + (s[n - 1 - i] - '0') * b) % 2019; b = (b * 10) % 2019; r[a]+...
#include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; int main() { string s; cin >> s; int n = s.size(), a = 0, b = 1, r[2019]; rep(i, 2019) r[i] = 0; rep(i, n) { a = (a + (s[n - 1 - i] - '0') * b) % 2019; b = (b * 10) % 2019; r[a]+...
replace
18
22
18
20
0
p02702
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; const int MOD = 2019; ll nums[MOD + 5]; int main() { string s; cin >> s; int n = s.size(); nums[0] = 1; ll num = 0, t = 1; for (int i = n - 1; i >= 0; i--, t *= 10) { num = (num + (s[i] - '0') * t) % MOD; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; const int MOD = 2019; ll nums[MOD + 5]; int main() { string s; cin >> s; int n = s.size(); nums[0] = 1; ll num = 0, t = 1; for (int i = n - 1; i >= 0; i--, t *= 10) { t %= MOD; num = (num + (s[i] - '0') ...
insert
16
16
16
17
0
p02702
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin >> s; ll n = s.size(); ll p[2019] = {}; ll t = 0; ll d = 1; ll ans = 0; for (ll i = n - 1; i >= 0; i--) { p[t]++; t += ((s[i] - '0') * d + t) % 2019; d = (d * 10) % 2019; ans += p[t]; } co...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin >> s; ll n = s.size(); ll p[2019] = {}; ll t = 0; ll d = 1; ll ans = 0; for (ll i = n - 1; i >= 0; i--) { p[t]++; t = ((s[i] - '0') * d + t) % 2019; d = (d * 10) % 2019; ans += p[t]; } cou...
replace
14
15
14
15
-11
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; struct Edge { Edge(int64_t t, int64_t A, int64_t B) : to(t), cost_coin(A), cost_time(B) {} int64_t to, cost_coin, cost_time; }; int main() { int64_t N, M, S; cin >> N >> M >> S; vector<int64_t> U(M), V(M), A(M), B(M); vector<vector<Edge>> edges(N); for (int6...
#include <bits/stdc++.h> using namespace std; struct Edge { Edge(int64_t t, int64_t A, int64_t B) : to(t), cost_coin(A), cost_time(B) {} int64_t to, cost_coin, cost_time; }; int main() { int64_t N, M, S; cin >> N >> M >> S; vector<int64_t> U(M), V(M), A(M), B(M); vector<vector<Edge>> edges(N); for (int6...
replace
26
27
26
27
TLE
p02703
C++
Runtime Error
#include <iostream> #include <queue> #include <vector> using namespace std; #define INF 1e+15 #define MAX_V 1000000 struct edge { long long to; long long cost; }; // <最短距離, 頂点の番号> using P = pair<long long, long long>; long long V; vector<edge> G[MAX_V]; long long d[MAX_V]; void dijkstra(long long s) { priori...
#include <iostream> #include <queue> #include <vector> using namespace std; #define INF 1e+15 #define MAX_V 1000000 struct edge { long long to; long long cost; }; // <最短距離, 頂点の番号> using P = pair<long long, long long>; long long V; vector<edge> G[MAX_V]; long long d[MAX_V]; void dijkstra(long long s) { priori...
insert
76
76
76
79
0
sh: 1: pause: not found
p02703
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define maxn 55 #define limit 2500 using namespace std; struct edge { int v, a, b; }; vector<edge> G[maxn]; int value[maxn], cost[maxn]; struct state { int u, num; ll tim; bool operator<(const state &a) const { return tim > a.tim; } }; ll dis[maxn][maxn * maxn]; voi...
#include <bits/stdc++.h> #define ll long long #define maxn 55 #define limit 2500 using namespace std; struct edge { int v, a, b; }; vector<edge> G[maxn]; int value[maxn], cost[maxn]; struct state { int u, num; ll tim; bool operator<(const state &a) const { return tim > a.tim; } }; ll dis[maxn][maxn * maxn]; voi...
replace
44
45
44
45
0
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rp(i, n) for (ll i = 0; i < n; i++) #define mp make_pair #define mt make_tuple using namespace std; using ll = long long; using P = pair<ll, ll>; using G = vector<vector<int>>; using PP = pair<ll, pair<ll, ll>>; using tlll = tuple<ll, ll, ll>; const ll INF = 1ll << 50; ll n, m, s; ll ma...
#include <bits/stdc++.h> #define rp(i, n) for (ll i = 0; i < n; i++) #define mp make_pair #define mt make_tuple using namespace std; using ll = long long; using P = pair<ll, ll>; using G = vector<vector<int>>; using PP = pair<ll, pair<ll, ll>>; using tlll = tuple<ll, ll, ll>; const ll INF = 1ll << 50; ll n, m, s; ll ma...
replace
55
58
55
61
TLE
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define fi first #define se second #define mp make_pair using namespace std; const int N = 55; const int NM = 5e3 + 10; int n, m, S; int c[N], d[N]; int a[N][N], b[N][N]; long long f[N][NM], res[N]; vector<int> adj[N]; bool minimize(long long &x, const long long &y) { if (x > y) x = y...
#include <bits/stdc++.h> #define fi first #define se second #define mp make_pair using namespace std; const int N = 55; const int NM = 5e3 + 10; int n, m, S; int c[N], d[N]; int a[N][N], b[N][N]; long long f[N][NM], res[N]; vector<int> adj[N]; bool minimize(long long &x, const long long &y) { if (x > y) x = y...
insert
50
50
50
52
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; constexpr int MOD = 1000000007; constexpr int INF = numeric_limits<int>::max() / 5; typedef pair<int, int> P; // 辺に重みをつける場合 struct Edge { int to; int cost; int time; Edge(int t, int c, int r...
#include <bits/stdc++.h> #define int long long #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; constexpr int MOD = 1000000007; constexpr int INF = numeric_limits<int>::max() / 5; typedef pair<int, int> P; // 辺に重みをつける場合 struct Edge { int to; int cost; int time; Edge(int t, int c, int r...
replace
79
80
79
80
0
p02703
C++
Runtime Error
/* I am the fire that burns your skin Soy el fuego que arde tu piel I am the water that kills your thirst Soy el agua que mata tu sed The castle, the tower, I am El castillo, la torre, yo soy The sword that keeps the flow La espada que guarda el caudal You the air that I breathe Tú el aire que respiro yo And the m...
/* I am the fire that burns your skin Soy el fuego que arde tu piel I am the water that kills your thirst Soy el agua que mata tu sed The castle, the tower, I am El castillo, la torre, yo soy The sword that keeps the flow La espada que guarda el caudal You the air that I breathe Tú el aire que respiro yo And the m...
insert
112
112
112
113
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02703
C++
Runtime Error
#include <bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9 + 7; using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < int(n); i++) #define REPD(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (int i = a; i < int(b); i++) #define FORD(i, a, b) for (int i = b - 1; i >...
#include <bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9 + 7; using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < int(n); i++) #define REPD(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (int i = a; i < int(b); i++) #define FORD(i, a, b) for (int i = b - 1; i >...
insert
35
35
35
36
0
p02703
C++
Runtime Error
#include <queue> #include <stdio.h> #include <vector> struct str { int x0; int cost; int time; }; std::vector<str> V[60]; struct str2 { int x0; int coin; long long int dist; }; bool operator<(str2 a, str2 b) { return a.dist > b.dist; } std::priority_queue<str2> Q; std::pair<int, int> x[60]; long long int ch...
#include <queue> #include <stdio.h> #include <vector> struct str { int x0; int cost; int time; }; std::vector<str> V[60]; struct str2 { int x0; int coin; long long int dist; }; bool operator<(str2 a, str2 b) { return a.dist > b.dist; } std::priority_queue<str2> Q; std::pair<int, int> x[60]; long long int ch...
replace
51
52
51
53
-11
p02703
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <complex> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <regex> #include <set> #include <stack> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(...
#include <algorithm> #include <cassert> #include <cmath> #include <complex> #include <cstring> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <regex> #include <set> #include <stack> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(...
replace
140
141
140
141
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <class W> struct edge { int from, to; W a, b; edge(int from, int to, W a, W b) : from(from), to(to), a(a), b(b) {} }; template <class W> using node = vector<edge<W>>; template <class W> using graph = vector<node<W>>; template <class W> void addedge(graph<W> ...
#include <bits/stdc++.h> using namespace std; template <class W> struct edge { int from, to; W a, b; edge(int from, int to, W a, W b) : from(from), to(to), a(a), b(b) {} }; template <class W> using node = vector<edge<W>>; template <class W> using graph = vector<node<W>>; template <class W> void addedge(graph<W> ...
replace
36
37
36
37
0
p02703
C++
Time Limit Exceeded
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define INF 1000000000000000000 using ll = long long; using P = pair<ll, int>; int N; #define index(a, b) ((a)*50 * N + (b)) struct node { vector<int> to; vector<int> cost; ll min_cost; vector<int> path; node() { min_cost = INF; } }; void d...
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define INF 1000000000000000000 using ll = long long; using P = pair<ll, int>; int N; #define index(a, b) ((a)*50 * N + (b)) struct node { vector<int> to; vector<int> cost; ll min_cost; vector<int> path; node() { min_cost = INF; } }; voi...
replace
0
1
0
1
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) FOR(i, 0, n) #define pb emplace_back typedef long long ll; typedef pair<int, int> pint; typedef pair<ll, ll> pll; vector<pll> g[51]; ll dist[51][5001]; const ll INF = 1000100010001000100; int n, m, s; c...
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) FOR(i, 0, n) #define pb emplace_back typedef long long ll; typedef pair<int, int> pint; typedef pair<ll, ll> pll; vector<pll> g[51]; ll dist[51][5001]; const ll INF = 1000100010001000100; int n, m, s; c...
replace
15
16
15
16
0
p02703
C++
Runtime Error
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <vector> using namespace std; #pragma GCC optimize("Ofast") #pragma GCC optimize("fast-math") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,ab...
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <vector> using namespace std; #pragma GCC optimize("Ofast") #pragma GCC optimize("fast-math") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,ab...
insert
53
53
53
54
0
p02703
C++
Runtime Error
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> #define MOD 1000000007 #...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> #define MOD 1000000007 #...
insert
133
133
133
134
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02703
C++
Time Limit Exceeded
#pragma GCC optimize("-O3") #include <bits/stdc++.h> using namespace std; using i64 = long long; #define endl "\n" struct Edge { i64 to, silver, time; }; struct Ex { i64 silver, time; }; vector<Edge> edge[50]; Ex ex[50]; i64 far[50][2501]; int main() { i64 N, M, S; cin >> N >> M >> S; for (i64 i = 0; i < ...
#pragma GCC optimize("-O3") #include <bits/stdc++.h> using namespace std; using i64 = long long; #define endl "\n" struct Edge { i64 to, silver, time; }; struct Ex { i64 silver, time; }; vector<Edge> edge[50]; Ex ex[50]; i64 far[50][2501]; int main() { i64 N, M, S; cin >> N >> M >> S; for (i64 i = 0; i < ...
insert
37
37
37
38
TLE
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int maxS = 5000; ll d[51][maxS]; bool used[51][maxS]; struct Edge { int to, cost, time; }; vector<Edge> g[51]; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n, m, s; cin >> n >> m >>...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int maxS = 2600; ll d[51][maxS]; bool used[51][maxS]; struct Edge { int to, cost, time; }; vector<Edge> g[51]; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n, m, s; cin >> n >> m >>...
replace
7
8
7
8
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define INF 1001000100010001000 #define MOD 1000000007 #define EPS 1e-10 #define int long long #define rep(i, N) for (int i = 0; i < N; i++) #define Rep(i, N) for (int i = 1; i < N; i++) #define For(i, a, b) for (int i = (a); i < (b); i++) #define pb push_back #define eb ...
#include <bits/stdc++.h> using namespace std; #define INF 1001000100010001000 #define MOD 1000000007 #define EPS 1e-10 #define int long long #define rep(i, N) for (int i = 0; i < N; i++) #define Rep(i, N) for (int i = 1; i < N; i++) #define For(i, a, b) for (int i = (a); i < (b); i++) #define pb push_back #define eb ...
insert
113
113
113
115
0
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int n, m, s, d[505], sum; int v[505], a[505], nxt[505], head[505]; long long dis[55][500005], ans[55], b[505], c[505]; bool vis[55][500005]; void spfa() { queue<pair<int, int>> q; q.push(make_pair(1, s)); while (!q.empty()) { int u = q.front().first, x = q.front...
#include <bits/stdc++.h> using namespace std; int n, m, s, d[505], sum; int v[505], a[505], nxt[505], head[505]; long long dis[55][500005], ans[55], b[505], c[505]; bool vis[55][500005]; void spfa() { queue<pair<int, int>> q; q.push(make_pair(1, s)); while (!q.empty()) { int u = q.front().first, x = q.front...
replace
56
57
56
57
TLE
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0; i < ((ll)(n)); i++) #define reg(i, a, b) for (ll i = ((ll)(a)); i <= ((ll)(b)); i++) #define irep(i, n) for (ll i = ((ll)(n)-1); i >= 0; i--) #define ireg(i, a, b) for (ll i = ((ll)(b)); i >= ((ll)(a)); i--) template <c...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0; i < ((ll)(n)); i++) #define reg(i, a, b) for (ll i = ((ll)(a)); i <= ((ll)(b)); i++) #define irep(i, n) for (ll i = ((ll)(n)-1); i >= 0; i--) #define ireg(i, a, b) for (ll i = ((ll)(b)); i >= ((ll)(a)); i--) template <c...
replace
38
39
38
41
TLE
p02703
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <numeric> #include <queue> #include <string> #include <unordered_map> #include <vector> #define myfor(i, N) for (i = 0; i < N; i++) #define myforFL(i, f, l) for (i = f; i < l; i++) #define MAXSILVER 50 * 49 #define ...
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <numeric> #include <queue> #include <string> #include <unordered_map> #include <vector> #define myfor(i, N) for (i = 0; i < N; i++) #define myforFL(i, f, l) for (i = f; i < l; i++) #define MAXSILVER 50 * 49 #define ...
insert
36
36
36
37
0
p02703
C++
Runtime Error
/*author : Yashvardhan Thursday, April 30, 2020 12:12 AM */ #include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll #define pb push_back #define vi vector<int> #define pi pair<int, int> #define vpi vector<pi> #define ff first #define ss second #define mp make_pair #define endl '\n' #define...
/*author : Yashvardhan Thursday, April 30, 2020 12:12 AM */ #include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll #define pb push_back #define vi vector<int> #define pi pair<int, int> #define vpi vector<pi> #define ff first #define ss second #define mp make_pair #define endl '\n' #define...
replace
196
197
196
197
0
107187
p02703
C++
Runtime Error
#ifdef __LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; template <typename T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <typename T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } #define...
#ifdef __LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; template <typename T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <typename T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } #define...
insert
99
99
99
101
0
p02703
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() using ll = long long; using P = pair<int, int>; constexpr int INF = 1e9; constexpr long long LINF = 1e18; constexpr long long MOD = 1e9 + 7; #define MAX 4000 signed main() { int n, m, ...
#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() using ll = long long; using P = pair<int, int>; constexpr int INF = 1e9; constexpr long long LINF = 1e18; constexpr long long MOD = 1e9 + 7; #define MAX 2500 signed main() { int n, m, ...
replace
10
11
10
11
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int64_t V, E, s, A = 0; cin >> V >> E >> s; vector<vector<tuple<int64_t, int64_t, int64_t>>> G(V); for (int i = 0; i < E; i++) { int64_t a, b, c; int64_t d; cin >> a >> b >> c >> d; a--, b--; G.at(a).push_back(make_tuple(b, c, d)); ...
#include <bits/stdc++.h> using namespace std; int main() { int64_t V, E, s, A = 0; cin >> V >> E >> s; vector<vector<tuple<int64_t, int64_t, int64_t>>> G(V); for (int i = 0; i < E; i++) { int64_t a, b, c; int64_t d; cin >> a >> b >> c >> d; a--, b--; G.at(a).push_back(make_tuple(b, c, d)); ...
insert
24
24
24
27
0
p02703
C++
Runtime Error
// #include <tourist> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; const int INF = 1e9; const ll LINF = ll(1e18); const int MOD = 1000000007; const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0}; const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0...
// #include <tourist> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; const int INF = 1e9; const ll LINF = ll(1e18); const int MOD = 1000000007; const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0}; const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0...
insert
113
113
113
114
0
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define INF_LL 1000000000000000LL #define INF 200000000 #define MOD 1000000007 #define ll long long #define all(x) x.begin(), x.end() #define REP(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) REP(i, 0, n) // typedef float double; // typedef priority_queue prique; t...
#include <bits/stdc++.h> using namespace std; #define INF_LL 1000000000000000LL #define INF 200000000 #define MOD 1000000007 #define ll long long #define all(x) x.begin(), x.end() #define REP(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) REP(i, 0, n) // typedef float double; // typedef priority_queue prique; t...
replace
51
52
51
52
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef pair<LL, int> PLI; const int MN = 50; const int MM = 100; const int MA = 51; const int MC = 2 * MN * MA; const int MV = MN * MC + 5; const LL INF = 0x3f3f3f3f3f3f3f3f; // sp at most go through less tahn 2n node 2n-1...
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef pair<LL, int> PLI; const int MN = 51; const int MM = 101; const int MA = 51; const int MC = 2 * MN * MA; const int MV = MN * MC + 5; const LL INF = 0x3f3f3f3f3f3f3f3f; // sp at most go through less tahn 2n node 2n-1...
replace
6
8
6
8
0
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define RREP(i, m, n) for (int i = (int)(m); i >= (int)(n); i--) #define rrep(i, n) RREP(i, (n)-1, 0) #define all(v) v.begin(), v.end() ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define RREP(i, m, n) for (int i = (int)(m); i >= (int)(n); i--) #define rrep(i, n) RREP(i, (n)-1, 0) #define all(v) v.begin(), v.end() ...
replace
63
64
63
64
TLE
p02703
C++
Runtime Error
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; long long d[50][2501]; long long C[50]; long long D[50]; vector<pair<pair<long lon...
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; long long d[50][5001]; long long C[50]; long long D[50]; vector<pair<pair<long lon...
replace
14
15
14
15
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define int long long #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); using namespace std; const int N = 55; const int MAX_S = 2501; vector<tu...
#include <bits/stdc++.h> #define ll long long #define int long long #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); using namespace std; const int N = 55; const int MAX_S = 4000; vector<tu...
replace
9
10
9
10
0
p02703
C++
Runtime Error
typedef long long ll; #include <bits/stdc++.h> using namespace std; struct point { ll p; // point ll s; // silver bool operator<(const point rhs) const { if (p != rhs.p) { return p < rhs.p; } else { return s < rhs.s; } } }; int main() { ll n, m, s; std::cin >> n >> m >> s; vec...
typedef long long ll; #include <bits/stdc++.h> using namespace std; struct point { ll p; // point ll s; // silver bool operator<(const point rhs) const { if (p != rhs.p) { return p < rhs.p; } else { return s < rhs.s; } } }; int main() { ll n, m, s; std::cin >> n >> m >> s; vec...
replace
32
33
32
33
-11
p02703
C++
Runtime Error
#pragma region template #include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using vll = vector<ll>; using vvll = vector<vll>; using vvvll = vector<vvll>; using vld = vector<l...
#pragma region template #include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using vll = vector<ll>; using vvll = vector<vll>; using vvvll = vector<vvll>; using vld = vector<l...
replace
162
163
162
191
11
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define watch(x) cerr << (#x) << ": " << (x) << endl #define int long long const int N = 51; int n, m, s, c[N], d[N]; struct edge { int to, a, b; edge(int _t, int _a, int _b) { to = _t; a = _a; b = _b; } }; vector<edge> graph[N]; int seen[N][2501]; int ...
#include <bits/stdc++.h> using namespace std; #define watch(x) cerr << (#x) << ": " << (x) << endl #define int long long const int N = 51; int n, m, s, c[N], d[N]; struct edge { int to, a, b; edge(int _t, int _a, int _b) { to = _t; a = _a; b = _b; } }; vector<edge> graph[N]; int seen[N][2501]; int ...
replace
63
64
63
68
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main() { ll N, M, S; cin >> N >> M >> S; int amax = 2501; if (S >= amax) S = amax; vector<vector<tuple<ll, int, int>>> G(N); REP(i, M) { int u, v, a, b; cin >> u >> v >> a >> ...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main() { ll N, M, S; cin >> N >> M >> S; int amax = 2501; if (S >= amax) S = amax; vector<vector<tuple<ll, int, int>>> G(N); REP(i, M) { int u, v, a, b; cin >> u >> v >> a >> ...
replace
24
25
24
25
-6
corrupted size vs. prev_size
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, pair<ll, ll>>; #define rep1(i, n) for (int i = 1; i <= n; i++) #define rep0(i, n) for (int i = 0; i < n; i++) #define zarray(x, n) \ x[n + 1]; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, pair<ll, ll>>; #define rep1(i, n) for (int i = 1; i <= n; i++) #define rep0(i, n) for (int i = 0; i < n; i++) #define zarray(x, n) \ x[n + 1]; ...
replace
15
16
15
16
0
p02703
C++
Runtime Error
//{{{ #include <bits/stdc++.h> using namespace std; #define putchar(x) cout << (x) #define repeat(x) \ int _ = 0; \ _ < (x); ...
//{{{ #include <bits/stdc++.h> using namespace std; #define putchar(x) cout << (x) #define repeat(x) \ int _ = 0; \ _ < (x); ...
insert
215
215
215
217
0
p02703
C++
Time Limit Exceeded
// #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...
// #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...
replace
34
35
34
35
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define pb push_back #define ins insert #define er erase typedef pair<int, int> ii; typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; const int oo = 1e18 + 7, mod = 1e9 + 7; int n, m, s, c[55], d[55], dp[55][5...
#include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define pb push_back #define ins insert #define er erase typedef pair<int, int> ii; typedef pair<int, ii> iii; typedef pair<ii, ii> iiii; const int oo = 1e18 + 7, mod = 1e9 + 7; int n, m, s, c[55], d[55], dp[55][5...
insert
56
56
56
57
0
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long int; int main(void) { cout << fixed << setprecision(16); cin.tie(0); ios::sync_with_stdio(false); ll n, m, s; cin >> n >> m >> s; vector<ll> res(n, 1e15); vector<vector<tuple<ll, ll, ll>>> G(n); while (m--) { ll u, v, a, b; ...
#include <bits/stdc++.h> using namespace std; using ll = long long int; int main(void) { cout << fixed << setprecision(16); cin.tie(0); ios::sync_with_stdio(false); ll n, m, s; cin >> n >> m >> s; vector<ll> res(n, 1e15); vector<vector<tuple<ll, ll, ll>>> G(n); while (m--) { ll u, v, a, b; ...
replace
64
65
64
65
TLE
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define P pair<int, int> #define fi first #define se second #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; } t...
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define P pair<int, int> #define fi first #define se second #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; } t...
delete
20
70
20
20
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; const ll VMAX = 50; const ll SMAX = VMAX * 50; const ll INF = 1LL << 60; struct Edge { ll to, a, b; Edge(ll to, ll a, ll b) : to(to), a(a), b(b) {} }; struct Node { ll v; // ノード ll t, s; // ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; const ll VMAX = 50; const ll SMAX = VMAX * 50; const ll INF = 1LL << 60; struct Edge { ll to, a, b; Edge(ll to, ll a, ll b) : to(to), a(a), b(b) {} }; struct Node { ll v; // ノード ll t, s; // ...
replace
70
71
70
71
0
p02703
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() using ll = long long; using P = pair<int, int>; constexpr int INF = 1e9; constexpr long long LINF = 1e18; constexpr long long MOD = 1e9 + 7; #define MAX 2500 signed main() { int n, m, ...
#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() using ll = long long; using P = pair<int, int>; constexpr int INF = 1e9; constexpr long long LINF = 1e18; constexpr long long MOD = 1e9 + 7; #define MAX 2500 signed main() { int n, m, ...
replace
15
16
15
16
TLE
p02703
C++
Runtime Error
/* author: madhav_1999 aka orthodoxparadox 26 April 2020 at 5:53 PM */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define dbl long double #define int ll #defin...
/* author: madhav_1999 aka orthodoxparadox 26 April 2020 at 5:53 PM */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define dbl long double #define int ll #defin...
replace
142
145
142
147
0
p02703
C++
Time Limit Exceeded
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define ALL(v) v.begin(), v.end() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define DUMP(i, v) \ for (ll i = 0; i < v.size(); i++) ...
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define ALL(v) v.begin(), v.end() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define DUMP(i, v) \ for (ll i = 0; i < v.size(); i++) ...
replace
134
135
134
135
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep2(i, m, n) for (int i = int(m); i < int(n); ++i) #define drep2(i, m, n) for (int i = int(m - 1); i >= int(n); --i) #define rep(i, n) rep2(i, 0, n) #define drep(i, n) drep2(i, n, 0) #define all(a) a.begin(), a.end() using ll = long long; using ld = long double; us...
#include <bits/stdc++.h> using namespace std; #define rep2(i, m, n) for (int i = int(m); i < int(n); ++i) #define drep2(i, m, n) for (int i = int(m - 1); i >= int(n); --i) #define rep(i, n) rep2(i, 0, n) #define drep(i, n) drep2(i, n, 0) #define all(a) a.begin(), a.end() using ll = long long; using ld = long double; us...
replace
116
117
116
117
-11
p02703
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; #define ll long long #define db double #define clr(a, b) memset(a, b, sizeof(a)) const int maxn = 60; const int tot = 2600; const ll inf = 1e18; int n,...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; #define ll long long #define db double #define clr(a, b) memset(a, b, sizeof(a)) const int maxn = 60; const int tot = 2600; const ll inf = 1e18; int n,...
replace
39
40
39
40
0
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> // using namespace std; #pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define rep(i, j, n) for (ll i = (ll)(j); i < (ll)(n); i++) #define REP(i, j, n) for (ll i = (ll)(j); i...
#include <bits/stdc++.h> // using namespace std; #pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define rep(i, j, n) for (ll i = (ll)(j); i < (ll)(n); i++) #define REP(i, j, n) for (ll i = (ll)(j); i...
replace
189
190
189
190
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif #define int long long template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); } template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(a, make_vec...
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif #define int long long template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); } template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(a, make_vec...
insert
50
50
50
51
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); ll N; cin >> N; ll M; cin >> M; ll S; cin >> S; vector<ll> C(N), D(N); vector<pair<ll, pair<ll, ll>>> G[N]; // to, coin, time for (ll i = 0; i < M; i++) { ll u, v, a, b...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); ll N; cin >> N; ll M; cin >> M; ll S; cin >> S; vector<ll> C(N), D(N); vector<pair<ll, pair<ll, ll>>> G[N]; // to, coin, time for (ll i = 0; i < M; i++) { ll u, v, a, b...
insert
29
29
29
30
TLE
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(false); \ cin.tie(0); #define FOR(i, s, n) for (int i = (s); i < (n); i++) #define REP(i, n) FOR(i, 0, n) #define RREP(i...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(false); \ cin.tie(0); #define FOR(i, s, n) for (int i = (s); i < (n); i++) #define REP(i, n) FOR(i, 0, n) #define RREP(i...
replace
78
82
78
82
TLE
p02703
C++
Runtime Error
#include <iostream> #include <queue> #include <vector> using namespace std; const long long INF = 1e18; struct Edge { int to; long long cost; }; struct Dijkstra { using P = pair<long long, int>; int V; int s; const vector<vector<Edge>> &g; vector<long long> dist; vector<int> previous; Dijkstra(cons...
#include <iostream> #include <queue> #include <vector> using namespace std; const long long INF = 1e18; struct Edge { int to; long long cost; }; struct Dijkstra { using P = pair<long long, int>; int V; int s; const vector<vector<Edge>> &g; vector<long long> dist; vector<int> previous; Dijkstra(cons...
replace
71
72
71
72
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll maxs = 1e5 + 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 = 1e5 + 5; const ll lmaxs = 20; ll mod = 1e9 + 7; ll oo = 1e15; #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(...
replace
33
34
33
34
0
p02703
C++
Runtime Error
/*Author - Shubham Gupta (@shubham107)*/ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<int> vi; typedef vector<vl> vvl; typedef vector<vi> vvi; typedef pair<ll, ll> pll; typedef pair<int, int> pii; #define int ll #define forn(i, n) for (int i = 0; i < n; i++)...
/*Author - Shubham Gupta (@shubham107)*/ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<int> vi; typedef vector<vl> vvl; typedef vector<vi> vvi; typedef pair<ll, ll> pll; typedef pair<int, int> pii; #define int ll #define forn(i, n) for (int i = 0; i < n; i++)...
replace
86
87
86
88
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> const long long INF = 1LL << 60; const long long MOD = 1000000007; const double PI = acos(-1.0); #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n - 1); i >= 0; --i) #define perm(c) ...
#include <bits/stdc++.h> const long long INF = 1LL << 60; const long long MOD = 1000000007; const double PI = acos(-1.0); #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); ++i) #define rrep(i, n) for (ll i = (n - 1); i >= 0; --i) #define perm(c) ...
insert
189
189
189
191
0
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() #defin...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() #defin...
replace
98
99
98
99
TLE
p02703
C++
Runtime Error
#include <bits/stdc++.h> #define endl "\n" using namespace std; typedef long long int ll; typedef vector<ll> vl; typedef pair<ll, ll> PP; #define rep(i, n) for (ll i = 0; i < ll(n); i++) #define all(v) v.begin(), v.end() #define ITR(v, i) for (auto ite = v.begin(); ite != v.end(); ite++) const ll INF = 999999999999999;...
#include <bits/stdc++.h> #define endl "\n" using namespace std; typedef long long int ll; typedef vector<ll> vl; typedef pair<ll, ll> PP; #define rep(i, n) for (ll i = 0; i < ll(n); i++) #define all(v) v.begin(), v.end() #define ITR(v, i) for (auto ite = v.begin(); ite != v.end(); ite++) const ll INF = 999999999999999;...
replace
55
56
55
56
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; int n, m, s; typedef pair<ll, ll> P; using edge = pair<ll, P>; const ll INF = 1e18, MAX_COST = 2500; signed main() { ll n, m, s; cin >> n >> m >> s; s = min(s, MAX_COST); vector<vector<edge>> G(n); for (int i = 0; i < m; i++) { ll u, v, ...
#include <bits/stdc++.h> using namespace std; using ll = long long; int n, m, s; typedef pair<ll, ll> P; using edge = pair<ll, P>; const ll INF = 1e18, MAX_COST = 2500; signed main() { ll n, m, s; cin >> n >> m >> s; s = min(s, MAX_COST); vector<vector<edge>> G(n); for (int i = 0; i < m; i++) { ll u, v, ...
replace
44
45
44
46
-11
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long inline void read(int &x) { char ch = getchar(); x = 0; while (!isdigit(ch)) ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - 48, ch = getchar(); } const int N = 55, M = 210; int n, m, s, c[N], d[N], f[N][N * N]; int cnt, h[N], to[M...
#include <bits/stdc++.h> using namespace std; #define int long long inline void read(int &x) { char ch = getchar(); x = 0; while (!isdigit(ch)) ch = getchar(); while (isdigit(ch)) x = x * 10 + ch - 48, ch = getchar(); } const int N = 55, M = 210; int n, m, s, c[N], d[N], f[N][N * N]; int cnt, h[N], to[M...
replace
13
14
13
14
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl '\n' #define all(x) (x).begin(), (x).end() const int INF = 1e9 + 5; const int N = 200000 + 5; const ll oo = 1e18 + 5; const ll mod = 998244353; vector<pair<int, int>> v[55]; ll dp[55][2505]; struct node { ll val; int id, sum; node(...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl '\n' #define all(x) (x).begin(), (x).end() const int INF = 1e9 + 5; const int N = 200000 + 5; const ll oo = 1e18 + 5; const ll mod = 998244353; vector<pair<int, int>> v[55]; ll dp[55][2505]; struct node { ll val; int id, sum; node(...
replace
30
31
30
31
0
p02703
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; const ll mod = 1000000007; const double eps = 1e-8; #ifdef DEBUG #include "inc/debug.hpp" #else #define debug(...) 42 #endif const int MAX_COIN = 62501; const int MAX_V = 50 * 62501; const ll INF = 1e1...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; const ll mod = 1000000007; const double eps = 1e-8; #ifdef DEBUG #include "inc/debug.hpp" #else #define debug(...) 42 #endif const int MAX_COIN = 2501; const int MAX_V = 50 * 2501; const ll INF = 1e17;...
replace
14
16
14
16
TLE
p02703
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; const int Max_A = 5010; const int Max_N = 55; const LL INF = 1e18; struct node { int silver, num; LL now_time; node(int s, int v, LL t) : silver(s), num(v), now_time(t) {} bool operator>(co...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using LL = long long; const int Max_A = 5010; const int Max_N = 55; const LL INF = 1e18; struct node { int silver, num; LL now_time; node(int s, int v, LL t) : silver(s), num(v), now_time(t) {} bool operator>(co...
replace
40
42
40
46
TLE
p02703
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007ll #define mod1 998244353ll #define endl '\n' #define inf ((ll)1e18 + 1) #include <chrono> using namespace chrono; mt19937_64 rng(high_resolution_clock::now().time_since_epoch().count()); #include <ext/pb_ds/assoc_container.hpp...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007ll #define mod1 998244353ll #define endl '\n' #define inf ((ll)1e18 + 1) #include <chrono> using namespace chrono; mt19937_64 rng(high_resolution_clock::now().time_since_epoch().count()); #include <ext/pb_ds/assoc_container.hpp...
replace
35
36
35
36
TLE
p02703
C++
Time Limit Exceeded
#include <climits> #include <iostream> #include <queue> #include <set> using namespace std; typedef long long ll; int main() { ll n, m, s; pair<ll, ll> node[51][51]; ll min_length[51][51]; pair<ll, ll> city[51]; cin >> n >> m >> s; pair<ll, ll> zero = make_pair(0, 0); for (ll i = 1; i <= n; i++) { ...
#include <climits> #include <iostream> #include <queue> #include <set> using namespace std; typedef long long ll; int main() { ll n, m, s; pair<ll, ll> node[51][51]; ll min_length[51][51]; pair<ll, ll> city[51]; cin >> n >> m >> s; pair<ll, ll> zero = make_pair(0, 0); for (ll i = 1; i <= n; i++) { ...
insert
66
66
66
69
TLE
p02703
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <unordered_set> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; // const ll mod = ...
#include <algorithm> #include <bitset> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <unordered_set> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; // const ll mod = ...
replace
162
163
162
163
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using LL = long long; struct Vertex { int id; LL coin, time; }; struct Edge { int from, to; LL coin, time; }; using Graph = vector<vector<Edge>>; int main() { int N, M; LL S; cin >> N >> M >> S; Graph G(N); for (auto i = 0; i < M; ++i) { int U, V; ...
#include <bits/stdc++.h> using namespace std; using LL = long long; struct Vertex { int id; LL coin, time; }; struct Edge { int from, to; LL coin, time; }; using Graph = vector<vector<Edge>>; int main() { int N, M; LL S; cin >> N >> M >> S; Graph G(N); for (auto i = 0; i < M; ++i) { int U, V; ...
replace
46
47
46
47
0
p02703
Python
Time Limit Exceeded
import heapq N, M, S = map(int, input().split()) uvab = [list(map(int, input().split())) for _ in range(M)] cd = [list(map(int, input().split())) for _ in range(N)] for i in range(M): uvab[i][0] -= 1 uvab[i][1] -= 1 railways = [[] for _ in range(N)] max_a = 0 for u, v, a, b in uvab: railways[u].append((...
import heapq N, M, S = map(int, input().split()) uvab = [list(map(int, input().split())) for _ in range(M)] cd = [list(map(int, input().split())) for _ in range(N)] for i in range(M): uvab[i][0] -= 1 uvab[i][1] -= 1 railways = [[] for _ in range(N)] max_a = 0 for u, v, a, b in uvab: railways[u].append((...
replace
37
38
37
38
TLE
p02703
Python
Time Limit Exceeded
import heapq import os from collections import defaultdict import sys if os.getenv("LOCAL"): sys.stdin = open("_in.txt", "r") sys.setrecursionlimit(10**9) INF = float("inf") IINF = 10**18 MOD = 10**9 + 7 # MOD = 998244353 N, M, S = list(map(int, sys.stdin.buffer.readline().split())) UVAB = [list(map(int, sys.s...
import heapq import os from collections import defaultdict import sys if os.getenv("LOCAL"): sys.stdin = open("_in.txt", "r") sys.setrecursionlimit(10**9) INF = float("inf") IINF = 10**18 MOD = 10**9 + 7 # MOD = 998244353 N, M, S = list(map(int, sys.stdin.buffer.readline().split())) UVAB = [list(map(int, sys.s...
replace
50
54
50
54
TLE
p02703
C++
Runtime Error
#include <algorithm> #include <bitset> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <unordered_map> #include <unordered_set> #include <ve...
#include <algorithm> #include <bitset> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string.h> #include <string> #include <unordered_map> #include <unordered_set> #include <ve...
insert
45
45
45
46
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; struct Edge { long to, c, t; }; const long inf = 1e18; const long mx = 5000; long n, m, s; vector<Edge> g[50]; long ca[50]; long ti[50]; vector<long> sub() { using PP = pair<long, long>; using TT = pair<long, PP>; priority_queue<TT, vector<TT>, greater<TT>> q; ...
#include <bits/stdc++.h> using namespace std; struct Edge { long to, c, t; }; const long inf = 1e18; const long mx = 5000; long n, m, s; vector<Edge> g[50]; long ca[50]; long ti[50]; vector<long> sub() { using PP = pair<long, long>; using TT = pair<long, PP>; priority_queue<TT, vector<TT>, greater<TT>> q; ...
replace
39
40
39
40
0
p02703
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) #define REP(i, n) rep(i, 0, n) #define int long long using namespace std; typedef pair<int, int> P; const int mod = 1000000007; const int INF = 1e18; int n, m, s; struct S { int from, coin, cost; bool operator>(const S &s) const { return co...
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) #define REP(i, n) rep(i, 0, n) #define int long long using namespace std; typedef pair<int, int> P; const int mod = 1000000007; const int INF = 1e18; int n, m, s; struct S { int from, coin, cost; bool operator>(const S &s) const { return co...
insert
44
44
44
46
0
p02703
C++
Time Limit Exceeded
#pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; const int N = 205; typedef long long ll; struct Edge { int to, next, c; ll w; } e[N << 1]; struct node { int pos, res; ll len; bool operator<(const node &x) const { return x.len < len; } }; priority_queue<node> q; int n, m, s, cnt, first[...
#pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; const int N = 205; typedef long long ll; struct Edge { int to, next, c; ll w; } e[N << 1]; struct node { int pos, res; ll len; bool operator<(const node &x) const { return x.len < len; } }; priority_queue<node> q; int n, m, s, cnt, first[...
replace
75
76
75
76
TLE