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
p02618
C++
Runtime Error
#include <bits/stdc++.h> #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") using namespace std; using ll = long long; using ld = long double; #define repd(i, a, b) for (int i = a; i < int(b); i++) #define rep(i, n) repd(i, 0, n) #define VARNAME(v) #v using P = pair<int, int>; i...
#include <bits/stdc++.h> #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") using namespace std; using ll = long long; using ld = long double; #define repd(i, a, b) for (int i = a; i < int(b); i++) #define rep(i, n) repd(i, 0, n) #define VARNAME(v) #v using P = pair<int, int>; i...
replace
56
57
56
57
0
p02618
C++
Runtime Error
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx2") #define io_init \ cin.tie(0); \ ios::sync_with_stdio(0); ...
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx2") #define io_init \ cin.tie(0); \ ios::sync_with_stdio(0); ...
replace
44
45
44
45
TLE
p02618
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
20
22
20
22
TLE
p02618
C++
Runtime Error
#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
71
72
71
72
-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)
p02618
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; using P = pair<int, int>; using pll = pair<long long, long long>; constexpr int INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 1000000007; constexpr double PI = 3.1415926535897932384...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; using pll = pair<long long, long long>; constexpr int INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 1000000007; constexpr double PI = 3.1415926535897932384...
replace
11
12
11
12
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
replace
78
79
78
79
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #defin...
replace
92
95
92
95
TLE
p02618
C++
Runtime Error
#ifdef LOCAL #define _GLIBCXX_DEBUG #define __clock__ #else #pragma GCC optimize("Ofast") #endif #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using VI = vector<ll>; using VV = vector<VI>; using VS = vector<string>; using PII = pair<ll, ll>; // tourist set template <typena...
#ifdef LOCAL #define _GLIBCXX_DEBUG #define __clock__ #else #pragma GCC optimize("Ofast") #endif #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using VI = vector<ll>; using VV = vector<VI>; using VS = vector<string>; using PII = pair<ll, ll>; // tourist set template <typena...
replace
214
215
214
215
0
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define EPS (1e-10) #define equals(a, b) (fabs((a) - (b)) < EPS) #define pb push_back #define rep(i, n) for (int i = 0; i < (n); i++) #define INF (1 << 29) using namespace std; typedef long long ll; const int nc = 26; int D; ll c[40], t[400]; ll s[400][40]; ll scoring() { vector<int> last...
#include <bits/stdc++.h> #define EPS (1e-10) #define equals(a, b) (fabs((a) - (b)) < EPS) #define pb push_back #define rep(i, n) for (int i = 0; i < (n); i++) #define INF (1 << 29) using namespace std; typedef long long ll; const int nc = 26; int D; ll c[40], t[400]; ll s[400][40]; ll scoring() { vector<int> last...
replace
67
68
67
68
TLE
p02618
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++) #define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--) const int dx[4] = {1, 0, -1, 0...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++) #define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--) const int dx[4] = {1, 0, -1, 0...
replace
42
43
42
43
-6
free(): invalid pointer
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <utility> using namespace std; #define REP(i, n) for (int i = 0; i < (n); i++) const int INF = 1e9; using Pii = pair<int, int>; const int con_type = 26; int D = 365; int C[con_type]; int S[365][con_type]; vector<int> ans; int last[con_type]; struct State { int cost; vector<int>...
#include <bits/stdc++.h> #include <utility> using namespace std; #define REP(i, n) for (int i = 0; i < (n); i++) const int INF = 1e9; using Pii = pair<int, int>; const int con_type = 26; int D = 365; int C[con_type]; int S[365][con_type]; vector<int> ans; int last[con_type]; struct State { int cost; vector<int>...
replace
65
66
65
66
TLE
p02618
C++
Time Limit Exceeded
#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() / 2; typedef pair<int, int> P; using Graph = vector<vector<int>>; template <class T> inline bool chmax(T &a, T b) { if...
#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() / 2; typedef pair<int, int> P; using Graph = vector<vector<int>>; template <class T> inline bool chmax(T &a, T b) { if...
replace
108
109
108
109
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> // ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); // clock_t start=clock();clock_t // end=clock();cout<<(double)(end-start)/CLOCKS_PER_SEC<<endl; using namespace std; typedef long long ll; typedef unsigned long long ull; typedef unsigned int ui; typedef pair<int, int> pii; typedef pair<pii...
#include <bits/stdc++.h> // ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); // clock_t start=clock();clock_t // end=clock();cout<<(double)(end-start)/CLOCKS_PER_SEC<<endl; using namespace std; typedef long long ll; typedef unsigned long long ull; typedef unsigned int ui; typedef pair<int, int> pii; typedef pair<pii...
replace
139
140
139
140
TLE
p02618
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
replace
142
144
142
144
-8
p02618
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <string> #include <vector> using namespace std; typedef long long ll; ty...
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <string> #include <vector> using namespace std; typedef long long ll; ty...
replace
51
53
51
53
0
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> P; typedef vector<ll> VI; typedef vector<VI> VVI; const ll MOD = 1000000007; const ll INF = 4611686018427387903; #define REP(i, n) for (int i = 0; i < n; i++) #define ALL(v) v.begin(), v.end() const int w = 18; const int k = 3...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> P; typedef vector<ll> VI; typedef vector<VI> VVI; const ll MOD = 1000000007; const ll INF = 4611686018427387903; #define REP(i, n) for (int i = 0; i < n; i++) #define ALL(v) v.begin(), v.end() const int w = 13; const int k = 3...
replace
11
13
11
13
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (ll(i) = (0); (i) < (n); ++i) #define REV(i, n) for (ll(i)...
#include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (ll(i) = (0); (i) < (n); ++i) #define REV(i, n) for (ll(i)...
replace
73
74
73
74
TLE
p02618
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
replace
149
151
149
151
-8
p02618
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
replace
149
151
149
151
-8
p02618
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
replace
149
151
149
151
-8
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() #define m0(x) memset(x, -1, sizeof(x)) const int INF = 1e9 + 1; const ll MOD = 1e9 + 7; const double PI = 3.141592653589793; const int ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() #define m0(x) memset(x, -1, sizeof(x)) const int INF = 1e9 + 1; const ll MOD = 1e9 + 7; const double PI = 3.141592653589793; const int ...
replace
74
75
74
75
TLE
p02618
C++
Time Limit Exceeded
#include "bits/stdc++.h" // #include <intrin.h> //AtCoder (gcc) // 上ではこれがあると動かない。__popcnt用のincludeファイル。 using namespace std; typedef long long ll; typedef long double ld; #define int long long #define rep(i, n) for (long long i = 0; i < (n); i++) #define sqrt(d) pow((long double)(d), 0.50) #define PII pair<int, int>...
#include "bits/stdc++.h" // #include <intrin.h> //AtCoder (gcc) // 上ではこれがあると動かない。__popcnt用のincludeファイル。 using namespace std; typedef long long ll; typedef long double ld; #define int long long #define rep(i, n) for (long long i = 0; i < (n); i++) #define sqrt(d) pow((long double)(d), 0.50) #define PII pair<int, int>...
replace
841
842
841
842
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <iostream> #include <set> #include <vector> using namespace std; int xor64(void) { static unsigned long long x = 88172645463325252ULL; x ^= x << 13; x ^= x >> 7; x ^= x << 17; return int(x & 0x7fffffff); } int D; vector<int> C; vector<vector<int>> S; struct ...
#include <algorithm> #include <cassert> #include <iostream> #include <set> #include <vector> using namespace std; int xor64(void) { static unsigned long long x = 88172645463325252ULL; x ^= x << 13; x ^= x >> 7; x ^= x << 17; return int(x & 0x7fffffff); } int D; vector<int> C; vector<vector<int>> S; struct ...
replace
109
110
109
110
TLE
p02618
Python
Runtime Error
import numpy as np D = int(input()) Cs = list(map(int, input().split())) Ss = [] for d in range(D): s = list(map(int, input().split())) Ss.append(s) Ss = np.array(Ss) solution = np.argmax(Ss, axis=1) days_till_next = np.ones_like(Ss) * (D - 1) - np.arange(D).reshape((D, 1)) def update_days_till_next(d): ...
import numpy as np D = int(input()) Cs = list(map(int, input().split())) Ss = [] for d in range(D): s = list(map(int, input().split())) Ss.append(s) Ss = np.array(Ss) solution = np.argmax(Ss, axis=1) # # days_till_next = np.ones_like(Ss) * (D - 1) - np.arange(D).reshape((D, 1)) # # # def update_days_till_nex...
replace
12
39
12
39
TLE
p02618
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
replace
142
143
142
143
-8
p02618
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
replace
142
144
142
144
-8
p02618
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
replace
142
144
142
144
-8
p02618
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
replace
142
144
142
144
-8
p02618
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
#define _CRT_SECURE_NO_WARNINGS #pragma GCC target("avx") #pragma GCC optimize("O3") #include <algorithm> #include <bitset> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <...
replace
142
144
142
144
-8
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> mp; ll inf = 1e9; #define N 26 #define iteration 100000 ll d, ansv, nowv; vector<ll> c(N), ans, now; vector<vector<ll>> s; vector<ll> last(N, 0); ll cost(vector<ll> &tmp) { ll sum = 0; for (ll i = 0; i < N; i++) last[i...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> mp; ll inf = 1e9; #define N 26 #define iteration 5000 ll d, ansv, nowv; vector<ll> c(N), ans, now; vector<vector<ll>> s; vector<ll> last(N, 0); ll cost(vector<ll> &tmp) { ll sum = 0; for (ll i = 0; i < N; i++) last[i] ...
replace
6
7
6
7
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (long long i = 0; i < (n); i++) template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; ret...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (long long i = 0; i < (n); i++) template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; ret...
replace
64
65
64
65
TLE
p02618
Python
Time Limit Exceeded
import sys import numpy as np from numba import njit @njit("(i8[:],)", cache=True) def solve(inp): def bitree_sum(bit, t, i): s = 0 while i > 0: s += bit[t, i] i ^= i & -i return s def bitree_add(bit, n, t, i, x): while i <= n: bit[t, i] +=...
import sys import numpy as np from numba import njit @njit("(i8[:],)", cache=True) def solve(inp): def bitree_sum(bit, t, i): s = 0 while i > 0: s += bit[t, i] i ^= i & -i return s def bitree_add(bit, n, t, i, x): while i <= n: bit[t, i] +=...
replace
142
143
142
143
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int D; cin >> D; vector<int> c(26); for (int &i : c) cin >> i; vector<vector<int>> s(D, vector<int>(26)); for (vector<int> &v : s) for (int &i : v) cin >> i; vector<int> t(D); vector<int> A(26, 0); int mz...
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int D; cin >> D; vector<int> c(26); for (int &i : c) cin >> i; vector<vector<int>> s(D, vector<int>(26)); for (vector<int> &v : s) for (int &i : v) cin >> i; vector<int> t(D); vector<int> A(26, 0); int mz...
replace
31
32
31
32
TLE
p02618
C++
Time Limit Exceeded
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #in...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #in...
replace
78
79
78
79
TLE
p02618
C++
Time Limit Exceeded
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #in...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #in...
replace
77
79
77
79
TLE
p02618
C++
Time Limit Exceeded
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #in...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #in...
replace
77
78
77
78
TLE
p02618
C++
Runtime Error
/* ЗАПУСКАЕМ ░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░ ▄███▀░◐░░░▌░░░░░░░ ░░░░▌░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▌░░░░░▐▄▄░░░░░ ░░░░▌░░░░▄▀▒▒▀▀▀▀▄ ░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄ ░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄ ░░░░▀▄░░░░▀▄...
/* ЗАПУСКАЕМ ░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░ ▄███▀░◐░░░▌░░░░░░░ ░░░░▌░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▐░░░░░▐░░░░░░░ ░░░░▌░░░░░▐▄▄░░░░░ ░░░░▌░░░░▄▀▒▒▀▀▀▀▄ ░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄ ░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄ ░░░░▀▄░░░░▀▄...
replace
166
167
166
167
0
p02618
C++
Time Limit Exceeded
// #include <bits/stdc++.h> #include <algorithm> #include <chrono> #include <iostream> #include <vector> using namespace std; const int typeNum = 26; void solve(long long D, std::vector<long long> c, std::vector<std::vector<long long>> s) { std::chrono::system_clock::time_point start, end; // 型は auto で可 ...
// #include <bits/stdc++.h> #include <algorithm> #include <chrono> #include <iostream> #include <vector> using namespace std; const int typeNum = 26; void solve(long long D, std::vector<long long> c, std::vector<std::vector<long long>> s) { std::chrono::system_clock::time_point start, end; // 型は auto で可 ...
replace
43
44
43
44
TLE
p02618
C++
Runtime Error
#include <climits> #include <cstdio> #include <iostream> #include <vector> using namespace std; vector<int> cs; vector<vector<int>> sm; int total_satisfaction(vector<int> &ts, int d) { vector<int> ls; for (int i = 0; i < 26; i++) ls.push_back(0); int s = 0; for (int i = 0; i < d; i++) { int t = ts[i]...
#include <climits> #include <cstdio> #include <iostream> #include <vector> using namespace std; vector<int> cs; vector<vector<int>> sm; int total_satisfaction(vector<int> &ts, int d) { vector<int> ls; for (int i = 0; i < 26; i++) ls.push_back(0); int s = 0; for (int i = 0; i < d; i++) { int t = ts[i]...
replace
55
56
55
56
0
p02618
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <vector> #define rep(X, N) for (ll X = 0LL; X < (N); X++) #define ALL(V) (V).begin(), (V).end() #define endl "\n" using namespace std; typedef long long ll; const double PI = 3.1415926535897932384626; const ll MODN = 1000000007; con...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <vector> #define rep(X, N) for (ll X = 0LL; X < (N); X++) #define ALL(V) (V).begin(), (V).end() #define endl "\n" using namespace std; typedef long long ll; const double PI = 3.1415926535897932384626; const ll MODN = 1000000007; con...
replace
65
66
65
66
-11
start score:
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; static const int D = 365; static const int ntype = 26; class Contest { public: Contest() { last = 0; } int s[D + 1]; int c; int last; }; Contest contest[27]; void Input() { int d; cin >> d; for (int i = ...
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; static const int D = 365; static const int ntype = 26; class Contest { public: Contest() { last = 0; } int s[D + 1]; int c; int last; }; Contest contest[27]; void Input() { int d; cin >> d; for (int i = ...
replace
151
152
151
152
TLE
p02618
C++
Time Limit Exceeded
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #in...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <functional> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <bitset> #include <deque> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #in...
replace
100
101
100
101
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; static const int D = 365; static const int ntype = 26; class Contest { public: Contest() { last = 0; } int s[D + 1]; int c; int last; }; Contest contest[27]; void Input() { int d; cin >> d; for (int i = ...
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; static const int D = 365; static const int ntype = 26; class Contest { public: Contest() { last = 0; } int s[D + 1]; int c; int last; }; Contest contest[27]; void Input() { int d; cin >> d; for (int i = ...
replace
176
177
176
177
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seed = 6; static const int D = 365; static const int ntype = 26; static const int population_size = 100; int gene[population_size][D + 1]; int next_gene[population_size][D + 1]; static in...
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seed = 6; static const int D = 365; static const int ntype = 26; static const int population_size = 100; int gene[population_size][D + 1]; int next_gene[population_size][D + 1]; static in...
replace
236
241
236
237
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seed = 6; static const int D = 365; static const int ntype = 26; static int ans[D + 1]; static int max_score = -INF; static int t = 1e6; class Contest { public: Contest() { last = 0; } ...
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seed = 6; static const int D = 365; static const int ntype = 26; static int ans[D + 1]; static int max_score = -INF; static int t = 1e4; class Contest { public: Contest() { last = 0; } ...
replace
12
13
12
13
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seed = 6; static const int D = 365; static const int ntype = 26; static int ans[D + 1]; static int max_score = -INF; static int t = 130000; class Contest { public: Contest() { last = 0;...
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seed = 6; static const int D = 365; static const int ntype = 26; static int ans[D + 1]; static int max_score = -INF; static int t = 110000; class Contest { public: Contest() { last = 0;...
replace
12
13
12
13
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seed = 20; static const int D = 365; static const int ntype = 26; static int ans[D + 1]; static int max_score = -INF; static int t = 130000; class Contest { public: Contest() { last = 0...
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seed = 20; static const int D = 365; static const int ntype = 26; static int ans[D + 1]; static int max_score = -INF; static int t = 130000; class Contest { public: Contest() { last = 0...
replace
129
130
129
130
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < n; i++) #define repl(i, l, r) for (ll i = (l); i < (r); i++) #define per(i, n) for (ll i = n - 1; i >= 0; i--) #define perl(i, r, l) for (ll i = r - 1; i >= l; i--) #define fi first #define se second #define pb push_back #define ins inse...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < n; i++) #define repl(i, l, r) for (ll i = (l); i < (r); i++) #define per(i, n) for (ll i = n - 1; i >= 0; i--) #define perl(i, r, l) for (ll i = r - 1; i >= l; i--) #define fi first #define se second #define pb push_back #define ins inse...
replace
87
88
87
88
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <random> #include <time.h> #include <vector> using namespace std; const int MAX_D = 365; const int C_SIZE = 26; typedef vector<int> State; typedef pair<int, State> CostState; map<int, int> BIT_TABLE; string createBits(int num) { string ret; for (i...
#include <algorithm> #include <iostream> #include <map> #include <random> #include <time.h> #include <vector> using namespace std; const int MAX_D = 365; const int C_SIZE = 26; typedef vector<int> State; typedef pair<int, State> CostState; map<int, int> BIT_TABLE; string createBits(int num) { string ret; for (i...
replace
152
153
152
154
TLE
p02618
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int(i) = 0; (i) < (n); ++(i)) #define REPR(i, n) for (int(i) = (n); (i) >= 0; --(i)) #define FOR(i, n, m) for (int(i) = (n); (i) < (m); ++(i)) // constexpr int INF = 1e9; constexpr ll INF = 1LL << 61; constexpr ll mod = 1e9 + 7...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i, n) for (int(i) = 0; (i) < (n); ++(i)) #define REPR(i, n) for (int(i) = (n); (i) >= 0; --(i)) #define FOR(i, n, m) for (int(i) = (n); (i) < (m); ++(i)) // constexpr int INF = 1e9; constexpr ll INF = 1LL << 61; constexpr ll mod = 1e9 + 7...
replace
165
166
165
167
-6
free(): invalid pointer
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } std::mt19937 mt{std::random_device{}()}; int randint(int lower, int upper) { std::uniform_int_distribution<int> dist(lower, upper); ...
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } std::mt19937 mt{std::random_device{}()}; int randint(int lower, int upper) { std::uniform_int_distribution<int> dist(lower, upper); ...
replace
61
62
61
63
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seeds = 630; static const int D = 365; static const int ntype = 26; static const int population_size = 50; int gene[population_size][D + 1]; int next_gene[population_size][D + 1]; static ...
#include <algorithm> #include <cstdlib> #include <iostream> #include <vector> using namespace std; #define INF 1e9 static const int seeds = 630; static const int D = 365; static const int ntype = 26; static const int population_size = 50; int gene[population_size][D + 1]; int next_gene[population_size][D + 1]; static ...
replace
220
221
220
221
TLE
p02618
C++
Time Limit Exceeded
#include <cstdlib> #include <iostream> using namespace std; #define N 10000 #define C 150 #define CHANGE_RATE 0.5 int main() { int d = 0; int c[26]; int s[365][26]; int t_c[C][365]; int last[26] = {0}; int score_c[C] = {0}; int score = 0; int max_c = 0; cin >> d; for (int i = 0; i < 26; i++) { ...
#include <cstdlib> #include <iostream> using namespace std; #define N 5000 #define C 15 #define CHANGE_RATE 0.1 int main() { int d = 0; int c[26]; int s[365][26]; int t_c[C][365]; int last[26] = {0}; int score_c[C] = {0}; int score = 0; int max_c = 0; cin >> d; for (int i = 0; i < 26; i++) { ...
replace
4
7
4
7
TLE
p02618
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
52
53
52
53
0
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <random> #include <set> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) #define rep1(i, n) for (int i = 1; i <= n; ++i) using namespace std; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } templ...
#include <algorithm> #include <iostream> #include <random> #include <set> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) #define rep1(i, n) for (int i = 1; i <= n; ++i) using namespace std; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } templ...
replace
154
155
154
155
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> const long Day_num = 365; const long type_num = 26; class Scoring { public: Scoring(const long arg_days, const std::vector<long> &arg_costs, const std::vector<std::vector<long>> &arg_incentives); std::vector<long> score(const std::vector<long> &arg_types); private: long days;...
#include <bits/stdc++.h> const long Day_num = 365; const long type_num = 26; class Scoring { public: Scoring(const long arg_days, const std::vector<long> &arg_costs, const std::vector<std::vector<long>> &arg_incentives); std::vector<long> score(const std::vector<long> &arg_types); private: long days;...
replace
66
68
66
68
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <time.h> #include ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <time.h> #include ...
replace
103
104
103
104
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #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 constexpr int INF = 1000000000; int Random(int mi, int ma) { random_device rnd; mt19937 mt(rnd()); // 32bit ...
#include <bits/stdc++.h> using namespace std; #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 constexpr int INF = 1000000000; int Random(int mi, int ma) { random_device rnd; mt19937 mt(rnd()); // 32bit ...
replace
74
75
74
75
TLE
p02618
C++
Time Limit Exceeded
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; int D; vector<int> c(26); vector<vector<int>> s; int scoring(const vector<int> &t) { int v = 0; vector<int> last(26, -1); rep(i, ...
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; int D; vector<int> c(26); vector<vector<int>> s; int scoring(const vector<int> &t) { int v = 0; vector<int> last(26, -1); rep(i, ...
replace
54
55
54
55
TLE
p02618
C++
Runtime Error
#include <bits/stdc++.h> #define rng(i, a, b) for (int i = int(a); i < int(b); i++) #define rep(i, b) rng(i, 0, b) #define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--) #define per(i, b) gnr(i, 0, b) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int d; cin >> d; c...
#include <bits/stdc++.h> #define rng(i, a, b) for (int i = int(a); i < int(b); i++) #define rep(i, b) rng(i, 0, b) #define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--) #define per(i, b) gnr(i, 0, b) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int d; cin >> d; c...
replace
22
24
22
24
0
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define reps(i, s, n) for (int i = s; i < n; i++) #define rep(i, n) reps(i, 0, n) #define Rreps(i, n, e) for (int i = n - 1; i >= e; --i) #define Rrep(i, n) Rreps(i, n, 0) #define ALL(a) a.begin(), a.end() #define fi first #define se second typedef long long ll; typedef vec...
#include <bits/stdc++.h> using namespace std; #define reps(i, s, n) for (int i = s; i < n; i++) #define rep(i, n) reps(i, 0, n) #define Rreps(i, n, e) for (int i = n - 1; i >= e; --i) #define Rrep(i, n) Rreps(i, n, 0) #define ALL(a) a.begin(), a.end() #define fi first #define se second typedef long long ll; typedef vec...
replace
81
82
81
82
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using namespace chrono; int main() { auto start = steady_clock::now(); random_device rnd; int D; vector<int> cs(26); cin >> D; for (auto &&c : cs) { cin >> c; } vector<vector<int>> sss(D, vector<int>(26)); for (auto &&ss : sss) { for (auto &&s :...
#include <bits/stdc++.h> using namespace std; using namespace chrono; int main() { auto start = steady_clock::now(); random_device rnd; int D; vector<int> cs(26); cin >> D; for (auto &&c : cs) { cin >> c; } vector<vector<int>> sss(D, vector<int>(26)); for (auto &&ss : sss) { for (auto &&s :...
replace
61
62
61
62
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { chrono::system_clock::time_point start; start = chrono::system_clock::now(); ios::sync_with_stdio(false); cin.tie(0); const int INF = 1000000000; int d; cin >> d; vector<int> c(26); vector<vector<int>> s(d, vector<in...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { chrono::system_clock::time_point start; start = chrono::system_clock::now(); ios::sync_with_stdio(false); cin.tie(0); const int INF = 1000000000; int d; cin >> d; vector<int> c(26); vector<vector<int>> s(d, vector<in...
replace
45
48
45
48
TLE
p02618
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long D = 365, type = 26, inf = 1001001001; vector<long long> C(type); vector<vector<long long>> S(D, vector<long long>(type)); struct STR { long long score; vector<long long> ans; vector<long long> last; }; bool operator<(const STR &left, const STR &right) { ...
#include <bits/stdc++.h> using namespace std; long long D = 365, type = 26, inf = 1001001001; vector<long long> C(type); vector<vector<long long>> S(D, vector<long long>(type)); struct STR { long long score; vector<long long> ans; vector<long long> last; }; bool operator<(const STR &left, const STR &right) { ...
replace
67
68
67
68
-11
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <set> #include <vector> using namespace std; typedef long long ll; typedef long double ldb; const int MAXM = 4e2 + 5; const int MAXN = 26 + 5; const int MAXT = 2e7 + 5; const int inf = 0x3f3f3f3f; const ll linf = 0x3f...
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <set> #include <vector> using namespace std; typedef long long ll; typedef long double ldb; const int MAXM = 4e2 + 5; const int MAXN = 26 + 5; const int MAXT = 2e7 + 5; const int inf = 0x3f3f3f3f; const ll linf = 0x3f...
replace
118
119
118
119
TLE
p02618
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); #define pb push_back using VI = vector<int>; using ll = long long; const ll inf = 0x3f3f3f3f3f3f3f3f; const int MXT = 26; const int MXD = 365; int D; int C[MXT + 10], S[MXD + 10][MXT + 10]; VI best; l...
#include <bits/stdc++.h> using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); #define pb push_back using VI = vector<int>; using ll = long long; const ll inf = 0x3f3f3f3f3f3f3f3f; const int MXT = 26; const int MXD = 365; int D; int C[MXT + 10], S[MXD + 10][MXT + 10]; VI best; l...
insert
177
177
177
179
-11
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define PI 3.14159265358979323846 #define int long long constexpr long long INF = numeric_limits<long long>::max() / 2; constexpr int MOD = 1000000007; using Graph = vector<vector<int>>; #include <random> signed main() ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define PI 3.14159265358979323846 #define int long long constexpr long long INF = numeric_limits<long long>::max() / 2; constexpr int MOD = 1000000007; using Graph = vector<vector<int>>; #include <random> signed main() ...
replace
69
70
69
70
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define PI 3.14159265358979323846 #define int long long constexpr long long INF = numeric_limits<long long>::max() / 2; constexpr int MOD = 1000000007; using Graph = vector<vector<int>>; #include <random> signed main() ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define PI 3.14159265358979323846 #define int long long constexpr long long INF = numeric_limits<long long>::max() / 2; constexpr int MOD = 1000000007; using Graph = vector<vector<int>>; #include <random> signed main() ...
replace
65
66
65
66
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <queue> #include <stack> #include <utility> #include <vector> #define REP(i, n) for (int i = 0; i < n; i++) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(a) (a).begin(), (a).end() #define INF 1000000000 #define BEAM 250 using namespace std; class stat...
#include <algorithm> #include <iostream> #include <queue> #include <stack> #include <utility> #include <vector> #define REP(i, n) for (int i = 0; i < n; i++) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(a) (a).begin(), (a).end() #define INF 1000000000 #define BEAM 100 using namespace std; class stat...
replace
12
13
12
13
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <set> #include <stdlib.h> using namespace std; int d, c[29], s[409][29], p[409], cp[29], rs; set<int> st[29]; int cc() { for (int i = 0; i < 26; i++) cp[i] = 0; int ans = 0; for (int i = 1; i <= d; i++) { for (int j = 0; j < 26; j++) { ...
#include <algorithm> #include <cmath> #include <iostream> #include <set> #include <stdlib.h> using namespace std; int d, c[29], s[409][29], p[409], cp[29], rs; set<int> st[29]; int cc() { for (int i = 0; i < 26; i++) cp[i] = 0; int ans = 0; for (int i = 1; i <= d; i++) { for (int j = 0; j < 26; j++) { ...
delete
88
90
88
88
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <set> #include <stdlib.h> using namespace std; int d, c[29], s[409][29], p[409], cp[29], rs; set<int> st[29]; int cc() { for (int i = 0; i < 26; i++) cp[i] = 0; int ans = 0; for (int i = 1; i <= d; i++) { for (int j = 0; j < 26; j++) { ...
#include <algorithm> #include <cmath> #include <iostream> #include <set> #include <stdlib.h> using namespace std; int d, c[29], s[409][29], p[409], cp[29], rs; set<int> st[29]; int cc() { for (int i = 0; i < 26; i++) cp[i] = 0; int ans = 0; for (int i = 1; i <= d; i++) { for (int j = 0; j < 26; j++) { ...
replace
74
76
74
76
TLE
p02618
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const char nl = '\n'; void solve() { int d; cin >> d; vector<int> c; for (int i = 0; i < 26; ++i) { int val; cin >> val; c.push_back(val); } for (int i = 0; i < d; ++i) { map<int, int, greater<int>>...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const char nl = '\n'; void solve() { int d; cin >> d; vector<int> c; for (int i = 0; i < 26; ++i) { int val; cin >> val; c.push_back(val); } for (int i = 0; i < d; ++i) { map<int, int, greater<int>>...
replace
21
22
21
22
0
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <chrono> #define rep(i, n) for (int i = 0; i < n; i++) #define INF 1000000007 using namespace std; int main() { chrono::system_clock::time_point start, end; start = chrono::system_clock::now(); long d; cin >> d; long n = 26, csum = 0, ccost = 0; vector<long> c(n), last(n);...
#include <bits/stdc++.h> #include <chrono> #define rep(i, n) for (int i = 0; i < n; i++) #define INF 1000000007 using namespace std; int main() { chrono::system_clock::time_point start, end; start = chrono::system_clock::now(); long d; cin >> d; long n = 26, csum = 0, ccost = 0; vector<long> c(n), last(n);...
replace
75
76
75
76
TLE
p02618
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int d; vector<int> c; vector<vector<int>> s; int satisfaction(const vector<int> &t) { vector<int> last(26, -1); int ans = 0; for (int i = 0; i < (int)t.size(); i++) { ans += s[i][t[i]]; last[t[i]] = i; for (int j = 0; j < 26; j++) { ans -= c[j] * (...
#include <bits/stdc++.h> using namespace std; int d; vector<int> c; vector<vector<int>> s; int satisfaction(const vector<int> &t) { vector<int> last(26, -1); int ans = 0; for (int i = 0; i < (int)t.size(); i++) { ans += s[i][t[i]]; last[t[i]] = i; for (int j = 0; j < 26; j++) { ans -= c[j] * (...
replace
42
43
42
43
0
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include...
replace
117
118
117
118
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; constexpr ll LLINF{1001002003004005006}; // ll = 9*LLINF constexpr int INTINF{1000000000}; // int = 2*INTINF #define rep(i, n)...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; constexpr ll LLINF{1001002003004005006}; // ll = 9*LLINF constexpr int INTINF{1000000000}; // int = 2*INTINF #define rep(i, n)...
replace
26
27
26
27
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0, i##_len = int(n); i < i##_len; ++i) #define rep(i, a, b) for (int i = int(a); i < int(b); ++i) #define All(x) (x).begin(), (x).end() #define rAll(x) (x).rbegin(), (x).rend() using namespace std; using ll = long long; int main() { // 方針 // 毎日満足度は低下し続ける //...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0, i##_len = int(n); i < i##_len; ++i) #define rep(i, a, b) for (int i = int(a); i < int(b); ++i) #define All(x) (x).begin(), (x).end() #define rAll(x) (x).rbegin(), (x).rend() using namespace std; using ll = long long; int main() { // 方針 // 毎日満足度は低下し続ける //...
replace
25
27
25
28
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define ll long long #define ln cout << endl #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() #define iter(c) ...
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define R cin >> #define ll long long #define ln cout << endl #define in(a) insert(a) #define pb(a) push_back(a) #define pd(a) printf("%.10f\n", a) #define mem(a) memset(a, 0, sizeof(a)) #define all(c) (c).begin(), (c).end() #define iter(c) ...
replace
91
92
91
92
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <iostream> #include <set> #include <vector> uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); int D; std::cin >> D; int c[26]; fo...
#include <algorithm> #include <array> #include <iostream> #include <set> #include <vector> uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); int D; std::cin >> D; int c[26]; fo...
replace
110
111
110
111
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() { auto e_cl = std::c...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() { auto e_cl = std::c...
replace
87
88
87
88
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
replace
49
50
49
50
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
replace
48
49
48
49
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
replace
98
99
98
99
TLE
p02618
C++
Time Limit Exceeded
// パチンコ #include <bits/stdc++.h> using namespace std; typedef long long ll; int N = 26; int D; vector<int> c(N + 1); vector<vector<int>> s; vector<int> t; ll now_score = 0; ll greedy() { vector<int> last(N + 1, 0); ll greedy_score = 0; for (int d = 1; d <= D; d++) { ll max_score = -1e9; vector<int> m...
// パチンコ #include <bits/stdc++.h> using namespace std; typedef long long ll; int N = 26; int D; vector<int> c(N + 1); vector<vector<int>> s; vector<int> t; ll now_score = 0; ll greedy() { vector<int> last(N + 1, 0); ll greedy_score = 0; for (int d = 1; d <= D; d++) { ll max_score = -1e9; vector<int> m...
replace
122
123
122
123
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
replace
48
49
48
49
TLE
p02618
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int d; cin >> d; vector<int> c(26, 0); vector<vector<int>> s(d, vector<int>(26, 0)); vector<int> last(26, 0); vector<int> ans(d, 0); for (int i = 0; i < 26; i++) { cin >> c[i]; } for (int i = 0; i < d; i++) { for (int j = 0; j < ...
#include <bits/stdc++.h> using namespace std; int main() { int d; cin >> d; vector<int> c(26, 0); vector<vector<int>> s(d, vector<int>(26, 0)); vector<int> last(26, 0); vector<int> ans(d, 0); for (int i = 0; i < 26; i++) { cin >> c[i]; } for (int i = 0; i < d; i++) { for (int j = 0; j < ...
replace
27
31
27
31
0
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
replace
48
49
48
49
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
replace
48
49
48
49
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
replace
48
49
48
49
TLE
p02618
C++
Memory Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
replace
48
49
48
49
MLE
p02618
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #define dump(...) \ DUMPOUT << " "; \ DUMPOUT << #__VA_ARGS__ << " :[" << __LINE__ << ":" << __FUNCTION__ << "]" \ << std::endl; ...
#include "bits/stdc++.h" using namespace std; #define dump(...) \ DUMPOUT << " "; \ DUMPOUT << #__VA_ARGS__ << " :[" << __LINE__ << ":" << __FUNCTION__ << "]" \ << std::endl; ...
delete
57
59
57
57
-6
63b95b62-ccf4-4b8b-a8af-be3d1890d98e.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02618/C++/s891565793.cpp:20: long long int eval(std::vector<int>, std::vector<int>, std::vector<std::vector<int> >): Assertion `1 <= out[d] and out[d] <= 26' failed.
p02618
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #define dump(...) \ DUMPOUT << " "; \ DUMPOUT << #__VA_ARGS__ << " :[" << __LINE__ << ":" << __FUNCTION__ << "]" \ << std::endl; ...
#include "bits/stdc++.h" using namespace std; #define dump(...) \ DUMPOUT << " "; \ DUMPOUT << #__VA_ARGS__ << " :[" << __LINE__ << ":" << __FUNCTION__ << "]" \ << std::endl; ...
insert
51
51
51
52
-6
40c47792-2cc6-45c0-8cd5-147bce8e6fbc.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02618/C++/s208201289.cpp:70: int main(int, const char**): Assertion `out.size() == D' failed.
p02618
C++
Runtime Error
#include <algorithm> #include <chrono> #include <iostream> #include <set> #include <vector> using namespace std; typedef long long Int; #define KIND 26 // #define KIND 2 Int D; Int c[KIND]; Int s[400][KIND]; Int last[KIND]; vector<Int> best_t; std::chrono::time_point<std::chrono::steady_clock> start; double dice() ...
#include <algorithm> #include <chrono> #include <iostream> #include <set> #include <vector> using namespace std; typedef long long Int; #define KIND 26 // #define KIND 2 Int D; Int c[KIND]; Int s[400][KIND]; Int last[KIND]; vector<Int> best_t; std::chrono::time_point<std::chrono::steady_clock> start; double dice() ...
replace
114
115
114
115
-11
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int D; cin >> D; vector<int> c(26); for (int &i : c) cin >> i; vector<vector<int>> s(D, vector<int>(26)); for (vector<int> &v : s) for (int &i : v) cin >> i; vector<int> t(D); vector<int> A(26, 0); int mz...
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int D; cin >> D; vector<int> c(26); for (int &i : c) cin >> i; vector<vector<int>> s(D, vector<int>(26)); for (vector<int> &v : s) for (int &i : v) cin >> i; vector<int> t(D); vector<int> A(26, 0); int mz...
replace
31
32
31
32
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int D; cin >> D; vector<int> c(26); for (int &i : c) cin >> i; vector<vector<int>> s(D, vector<int>(26)); for (vector<int> &v : s) for (int &i : v) cin >> i; vector<int> t(D); vector<int> A(26, 0); int mz...
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int D; cin >> D; vector<int> c(26); for (int &i : c) cin >> i; vector<vector<int>> s(D, vector<int>(26)); for (vector<int> &v : s) for (int &i : v) cin >> i; vector<int> t(D); vector<int> A(26, 0); int mz...
replace
31
32
31
32
TLE
p02618
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
#include <algorithm> #include <array> #include <chrono> #include <iostream> #include <set> #include <vector> int const INF = 1e9; uint64_t xor64(void) { static uint64_t x = 88172645463325252ULL; x = x ^ (x << 7); return x = x ^ (x >> 9); } auto b_cl = std::chrono::system_clock::now(); inline double get_time() ...
replace
48
49
48
49
TLE
p02618
C++
Runtime Error
#include <bits/stdc++.h> #include <chrono> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) typedef int64_t Int; typedef pair<Int, Int> P; const Int Q = 26; Int D; vector<Int> C(Q); vector<vector<Int>> S(400, vector<Int>(Q)); Int range(I...
#include <bits/stdc++.h> #include <chrono> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) typedef int64_t Int; typedef pair<Int, Int> P; const Int Q = 26; Int D; vector<Int> C(Q); vector<vector<Int>> S(400, vector<Int>(Q)); Int range(I...
replace
138
139
138
139
-11
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) typedef int64_t Int; typedef pair<Int, Int> P; Int D; vector<Int> C(26); vector<vector<Int>> S(365, vector<Int>(26)); // 最終的な満足度を返す関数 Int score(vector<int> schedule...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) typedef int64_t Int; typedef pair<Int, Int> P; Int D; vector<Int> C(26); vector<vector<Int>> S(365, vector<Int>(26)); // 最終的な満足度を返す関数 Int score(vector<int> schedule...
replace
47
48
47
48
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //--------...
#include <bits/stdc++.h> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //--------...
replace
180
181
180
181
TLE
p02618
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define Int int64_t using namespace std; int D; vector<int> c(30, 0); vector<vector<int>> s(400, vector<int>(30, 0)); struct schedule { int score = 0; vector<int> contest; vector<int> last; schedule() { last.assign(30, 0); }; bool operator<(const schedule &s) const { return score...
#include <bits/stdc++.h> #define Int int64_t using namespace std; int D; vector<int> c(30, 0); vector<vector<int>> s(400, vector<int>(30, 0)); struct schedule { int score = 0; vector<int> contest; vector<int> last; schedule() { last.assign(30, 0); }; bool operator<(const schedule &s) const { return score...
replace
45
46
45
46
TLE