buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
D,*CS = map(int, open(0).read().split())
C = CS[:26]
S = [CS[26*i:26*(i+1)] for i in range(1, D+1)]
def imax(xs):
m = -1
i = 0
for j, x in enumerate(xs):
if x > m:
i = j
m = x
return i
for d in range(D):
i = imax(S[d])
print(i)
| D,*CS = map(int, open(0).read().split())
C = CS[:26]
S = [CS[26*i:26*(i+1)] for i in range(1, D+1)]
def imax(xs):
m = -1
i = 0
for j, x in enumerate(xs):
if x > m:
i = j
m = x
return i
for d in range(D):
i = imax(S[d])
print(i + 1)
| [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 115 |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1000000007;
#define vec vector<int>
#define vecll vector<ll>
#define vecd vector<double>
#define vecst vector<string>
#define vecb vector<bool>
#define vec2(var, n, m) vector<vector<int>> var(n, vector<int>(m, 0))
#define vecll2(var, n, m) ve... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1000000007;
#define vec vector<int>
#define vecll vector<ll>
#define vecd vector<double>
#define vecst vector<string>
#define vecb vector<bool>
#define vec2(var, n, m) vector<vector<int>> var(n, vector<int>(m, 0))
#define vecll2(var, n, m) ve... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 421 |
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define REP(i, s, n) for (lli i = s; i < n; i++)
#define NUM 2520
#define INF (1LL << 50)
#define DEBUG 0
#define mp(a, b) make_pair(a, b)
#define SORT(V) sort(V.begin(), V.end())
#define PI (3.141592653589794)
#define TO_STRING(VariableName) #Var... | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define REP(i, s, n) for (lli i = s; i < n; i++)
#define NUM 2520
#define INF (1LL << 50)
#define DEBUG 0
#define mp(a, b) make_pair(a, b)
#define SORT(V) sort(V.begin(), V.end())
#define PI (3.141592653589794)
#define TO_STRING(VariableName) #Var... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 750 |
import sys
import copy
import time
import random
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
D = None
C = None
S = None
def cnt_score(t):
global D, C, S
score = 0
cnt = [-1] * 26
for i in range(D):
score += S[i][t[i] - 1]
minusscore = 0
cnt[t[i] - 1] = i
... | import sys
import copy
import time
import random
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
D = None
C = None
S = None
def cnt_score(t):
global D, C, S
score = 0
cnt = [-1] * 26
for i in range(D):
score += S[i][t[i] - 1]
minusscore = 0
cnt[t[i] - 1] = i
... | [["-", 3, 4, 0, 657, 31, 652, 63, 319, 500, 22], ["+", 3, 4, 0, 657, 31, 652, 63, 319, 500, 22], ["-", 31, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 31, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", ... | 5 | 396 |
d = int(input())
c = list(map(int,input().split()))
cmax = max(c)
for al in range(26):
if c[al] == cmax:
maxc = al
up = []
for _ in range(d):
up.append(list(map(int,input().split())))
ans = [[-1] for _ in range(26)]
for i in range(d):
ans[maxc].append(i)
task = [maxc for i in range(d)]
#print(task)
#ans[0].ap... | d = int(input())
c = list(map(int,input().split()))
cmax = max(c)
for al in range(26):
if c[al] == cmax:
maxc = al
up = []
for _ in range(d):
up.append(list(map(int,input().split())))
ans = [[-1] for _ in range(26)]
for i in range(d):
ans[maxc].append(i)
task = [maxc for i in range(d)]
#print(task)
#ans[0].ap... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 528 |
#include <bits/stdc++.h>
int main() {
int D;
std::cin >> D;
std::vector<int> C(26);
for (int i = 0; i < 26; i++) {
std::cin >> C[i];
}
std::vector<std::vector<int>> S(D, std::vector<int>(26));
std::vector<int> best_index(D, 0);
for (int i = 0; i < D; i++) {
int max = 0;
for (int j = 0; j < ... | #include <bits/stdc++.h>
int main() {
int D;
std::cin >> D;
std::vector<int> C(26);
for (int i = 0; i < 26; i++) {
std::cin >> C[i];
}
std::vector<std::vector<int>> S(D, std::vector<int>(26));
std::vector<int> best_index(D, 0);
for (int i = 0; i < D; i++) {
int max = 0;
for (int j = 0; j < ... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 266 |
import numpy as np
D = int(input())
C = ([int(x) for x in input().split()])
for d in range(D):
exec('s{} = ([int(x) for x in input().split()])'.format(d))
d = 0
lday = np.array([0] * 26)
C = np.array(C)
while d != D:
exec("curs = np.array(s{})".format(d))
pos_max_i = np.argmax(curs)
decl = C * ... | import numpy as np
D = int(input())
C = ([int(x) for x in input().split()])
for d in range(D):
exec('s{} = ([int(x) for x in input().split()])'.format(d))
d = 0
lday = np.array([0] * 26)
C = np.array(C)
while d != D:
exec("curs = np.array(s{})".format(d))
pos_max_i = np.argmax(curs)
decl = C * ... | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 170 |
#include <iostream>
using namespace std;
int score(int D, int c[27], int s[365][26], int t[365]) {
int i = 0;
// int j=0;
int day = 0;
int last[365][26] = {};
long long int sat = 0;
day = 0;
last[day][t[day]] = day + 1;
sat += s[day][t[day]];
for (i = 0; i < 26; i++) {
sat -= c[i] * (day + 1 - la... | #include <iostream>
using namespace std;
int score(int D, int c[27], int s[365][26], int t[365]) {
int i = 0;
// int j=0;
int day = 0;
int last[365][26] = {};
long long int sat = 0;
day = 0;
last[day][t[day]] = day + 1;
sat += s[day][t[day]];
for (i = 0; i < 26; i++) {
sat -= c[i] * (day + 1 - la... | [["+", 8, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 8, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 513 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
using vi = vector<int>;
#define in(v) \
v; ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
using vi = vector<int>;
#define in(v) \
v; ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 8, 9, 0, 57, 64, 1, 0, 11, 31, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 31, 22], ["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 16, 31... | 1 | 650 |
#define __mode_debug__
/* ξ
ll
_ll_
/ ∞ \
│* A *│
│* C *│
│* 祈 *│
│* 願 *│
│* *│
 ̄ ̄ ̄ ̄ ̄ */
// C++14 (GCC 5.4.1)
#include <bits/stdc++.h>
using namespace std;
#ifdef __mode_debug__
#define DBG
#else
#define DBG if (false)
#endif
#define LLINF (1LL << 60)
using ll = long long;
#define mod 100... | #define __mode_debug__
/* ξ
ll
_ll_
/ ∞ \
│* A *│
│* C *│
│* 祈 *│
│* 願 *│
│* *│
 ̄ ̄ ̄ ̄ ̄ */
// C++14 (GCC 5.4.1)
#include <bits/stdc++.h>
using namespace std;
#ifdef __mode_debug__
#define DBG
#else
#define DBG if (false)
#endif
#define LLINF (1LL << 60)
using ll = long long;
#define mod 100... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 1,285 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
using name... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
using name... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 24], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 9, 0, 43, 39, 78], ["+", 8, 9, 0, 9, 0, 43, 4... | 1 | 1,165 |
import random
def calc(D, s, t):
last = [0 for _ in range(26)]
value = 0
for i in range(D):
day = i + 1
value += s[i][t[i]-1]
last[t[i]-1] = day
for j in range(26):
value -= c[j] * (day - last[j])
return value
D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, inpu... | import random
def calc(D, s, t):
last = [0 for _ in range(26)]
value = 0
for i in range(D):
day = i + 1
value += s[i][t[i]-1]
last[t[i]-1] = day
for j in range(26):
value -= c[j] * (day - last[j])
return value
D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, in... | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 263 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<string, int>;
int main() {
int d;
cin >> d;
vector<int> c(26);
rep(i, 26) cin >> c.at(i);
vector<vector<int>> s(d, vector<int>(26));
rep(i, d) rep(j, 26) cin >> s.at(i).at... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<string, int>;
int main() {
int d;
cin >> d;
vector<int> c(26);
rep(i, 26) cin >> c.at(i);
vector<vector<int>> s(d, vector<int>(26));
rep(i, d) rep(j, 26) cin >> s.at(i).at... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 183 |
d = int(input())
cl = list(map(int, input().split()))
sl = []
for _ in range(d):
sl.append(list(map(int, input().split())))
tl = []
# for _ in range(d):
# tl.append(int(input()))
last_di = [-1]*26
ans = 0
for day in range(d):
best_t = 0
best_t_val = -999999999999
for t in range(26):
curr_v... | d = int(input())
cl = list(map(int, input().split()))
sl = []
for _ in range(d):
sl.append(list(map(int, input().split())))
tl = []
# for _ in range(d):
# tl.append(int(input()))
last_di = [-1]*26
ans = 0
for day in range(d):
best_t = 0
best_t_val = -999999999999
for t in range(26):
curr_v... | [["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 186 |
d = int(input())
c = tuple(map(int, input().split()))
s = [
tuple(map(int, input().split()))
for _ in range(d)
]
m = 0
ans = []
last = [0] * 26
for i in range(d):
# for all contest
mdmax = -10000000000000000
mdi = 0
for j, ss in enumerate(s[i]):
md = 0
# choose one contest to op... | d = int(input())
c = tuple(map(int, input().split()))
s = [
tuple(map(int, input().split()))
for _ in range(d)
]
m = 0
ans = []
last = [0] * 26
for i in range(d):
# for all contest
mdmax = -10000000000000000
mdi = 0
for j, ss in enumerate(s[i]):
md = 0
# choose one contest to op... | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 176 |
#include <algorithm>
#include <bitset>
#include <cfloat>
#include <cmath>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdlib.h>
#include <st... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <cmath>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdlib.h>
#include <st... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 604 |
#include <algorithm>
#include <cstdio>
using namespace std;
int main() {
int D;
scanf("%d", &D);
int c[26], s[D][26], last[26], ans[D];
for (int i = 0; i < 26; ++i)
scanf("%d", &c[i]);
for (int i = 0; i < D; ++i) {
for (int j = 0; j < 26; ++j)
scanf("%d", &s[i][j]);
}
fill_n(last, 26, -1);
... | #include <algorithm>
#include <cstdio>
using namespace std;
int main() {
int D;
scanf("%d", &D);
int c[26], s[D][26], last[26], ans[D];
for (int i = 0; i < 26; ++i)
scanf("%d", &c[i]);
for (int i = 0; i < D; ++i) {
for (int j = 0; j < 26; ++j)
scanf("%d", &s[i][j]);
}
fill_n(last, 26, -1);
... | [["-", 0, 57, 64, 1, 0, 34, 12, 11, 12, 22], ["+", 0, 57, 64, 1, 0, 34, 12, 11, 12, 22]] | 1 | 274 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int d;
cin >> d;
vector<int> c(26);
rep(i, 26) cin >> c[i];
vector<vector<int>> s(d, vector<int>(26));
rep(i, d) {
rep(j, 26) { cin >> s[i][j]; }
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int d;
cin >> d;
vector<int> c(26);
rep(i, 26) cin >> c[i];
vector<vector<int>> s(d, vector<int>(26));
rep(i, d) {
rep(j, 26) { cin >> s[i][j]; }
... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["-", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 197 |
D = int(input())
c = list(map(int,input().split()))
s = list(list(map(int,input().split())) for i in range(D))
t = []
score = 0
last = [0]*26
#v = [0]*D
def calc(d):
"""
貪欲法でd日目のスコアが最も高くなるコンテストを出力
"""
score = 0
t = 0
contest = 0
for i in range(26):
temp = 0
temp += s[d][i]
... | D = int(input())
c = list(map(int,input().split()))
s = list(list(map(int,input().split())) for i in range(D))
t = []
score = 0
last = [0]*26
#v = [0]*D
def calc(d):
"""
貪欲法でd日目のスコアが最も高くなるコンテストを出力
"""
score = 0
t = 0
contest = 0
for i in range(26):
temp = 0
temp += s[d][i]
... | [["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 197 |
#include <bits/stdc++.h>
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define ll long long
using namespace std;
const ll P = 1000000007;
const long long INF = 1LL << 60;
int gcd(in... | #include <bits/stdc++.h>
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define ll long long
using namespace std;
const ll P = 1000000007;
const long long INF = 1LL << 60;
int gcd(in... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 69, 28, 22], ["+", 31, 16, 12, 16, 31, 69, 341, 342, 0, 70], ["+", 31, 16, 12, 16, 31, 69, 341, 342, 0, 22], ["+", 31, 16, 12, 16, 31, 69, 341, 342, 0, 73], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 369 |
###==================================================
### import
#import bisect
#from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): re... | ###==================================================
### import
#import bisect
#from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): re... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 477 |
import numpy as np
D=int(input())#365
c=list(map(int,input().split()))
s=np.array([])
for i in range(D):
s=np.array([input().split()], dtype=np.int64)
max_space=np.argmax(s)
print(max_space+1,s) | import numpy as np
D=int(input())#365
c=list(map(int,input().split()))
s=np.array([])
for i in range(D):
# if(i<16):
# print((i+10)%26+1)
# else:
s=np.array([input().split()], dtype=np.int64)
max_space=np.argmax(s)
print(max_space+1) | [["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 85 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<long long> vll;
typedef vector<vector<long long>> vvll;
typedef pair<int, int> pii;
typedef pair<long long, int> pli;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<long long> vll;
typedef vector<vector<long long>> vvll;
typedef pair<int, int> pii;
typedef pair<long long, int> pli;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define... | [["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 13], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 0, 16, 12, 69, 341, 342, 0, 16, 17, 72], ["+", 0, 16, 12, 69, 341, 342, 0, 16, 12, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 0, 43, 49, 53, 54... | 1 | 348 |
package main
import (
"fmt"
"log"
"math/rand"
)
const D = 365
const T = 26
const isTest = false
func main() {
if !isTest {
var d int
var c [T]int
var s [D][T]int
fmt.Scanf("%d", &d)
for i := 0; i < T; i++ {
fmt.Scanf("%d", &c[i])
}
for i := 0; i < d; i++ {
for j := 0; j < T; j++ {
fmt.Sc... | package main
import (
"fmt"
"log"
"math/rand"
)
const D = 365
const T = 26
const isTest = false
func main() {
if !isTest {
var d int
var c [T]int
var s [D][T]int
fmt.Scanf("%d", &d)
for i := 0; i < T; i++ {
fmt.Scanf("%d", &c[i])
}
for i := 0; i < d; i++ {
for j := 0; j < T; j++ {
fmt.Sc... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 433]] | 7 | 829 |
import numpy as np
D = int(input())
c = list(map(int,input().split()))
s=[]
for i in range(D):
x = np.array(list(map(int, input().split())))
s.append(c[x.argmax()])
for i in range(D):
print(s[i]) | import numpy as np
D = int(input())
c = list(map(int,input().split()))
s=[]
for i in range(D):
x = np.array(list(map(int, input().split())))
s.append(x.argmax())
for i in range(D):
print(s[i]+1) | [["-", 0, 1, 0, 652, 3, 4, 0, 206, 51, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 0, 70], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 0, 73], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 91 |
import numpy as np
D = int(input())
c = list(map(int,input().split()))
s=[]
f=[]
for i in range(D):
if(i%26 == 0):
f = [0]*26
x = np.array(list(map(int, input().split())))
for j in range(26):
if(f[j]!=0):
x.delete(1,j)
s.append(x.argmax())
for i in range(D):
print(s[i]) | import numpy as np
D = int(input())
c = list(map(int,input().split()))
s=[]
f=[]
for i in range(D):
if(i%26 == 0):
f = [0]*26
x = np.array(list(map(int, input().split())))
for j in range(26):
if(f[j]!=0):
x.delete(1,j)
s.append(x.argmax())
for i in range(D):
print(s[i]+1) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 134 |
def main():
D = int(input())
c = list(map(int, input().split()))
last = [0] * 27
for d in range(1, D+1):
s = list(map(int, input().split()))
max_s = max(s)
index_s = s.index(max_s)
print(index_s)
if __name__ == '__main__':
main()
| def main():
D = int(input())
c = list(map(int, input().split()))
last = [0] * 27
for d in range(1, D+1):
s = list(map(int, input().split()))
max_s = max(s)
index_s = s.index(max_s)
print(index_s + 1)
if __name__ == '__main__':
main()
| [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 94 |
D = int(input())
C = [0] + list(map(int, input().split()))
S = [0] + [[0] + list(map(int, input().split())) for _ in range(D)]
last = [0] + [0 for _ in range(26)]
for d in range(1, D+1):
vmax = -float('inf')
for i in range(1, 27):
v = 0
last_ = [s for s in last]
v += S[d][i]
la... | D = int(input())
C = [0] + list(map(int, input().split()))
S = [0] + [[0] + list(map(int, input().split())) for _ in range(D)]
last = [0] + [0 for _ in range(26)]
for d in range(1, D+1):
vmax = -float('inf')
for i in range(1, 27):
v = 0
last_ = [s for s in last]
v += S[d][i]
la... | [["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 177 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
#define P pair<int, int>
#define PI 3.141592653589793
const int INF = 1001001001;
const ll MX = 1e18;
int main() {
int d;
cin >> d;
vector<int> c(26), l(26), t(d);
rep(i, 26) cin >> c[i];
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
#define P pair<int, int>
#define PI 3.141592653589793
const int INF = 1001001001;
const ll MX = 1e18;
int main() {
int d;
cin >> d;
vector<int> c(26), l(26), t(d);
rep(i, 26) cin >> c[i];
... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 264 |
N = 26
D = int(input())
C = [int(i) for i in input().split()]
S = []
for i in range(D):
s = [int(i) for i in input().split()]
m = max(s)
i = s.index(m)
S.append(i)
for i in S:
print(i) | N = 26
D = int(input())
C = [int(i) for i in input().split()]
S = []
for i in range(D):
s = [int(i) for i in input().split()]
m = max(s)
i = s.index(m)
S.append(i+1)
for i in S:
print(i) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 88 |
D = int(input())
c = list(map(int, input().split()))
S = [list(map(int, input().split())) for i in range(D)]
#T = [int(input()) for i in range(D)]
SUM = 0
last = [0] * 28
for d in range(1, D + 1):
i = S[d - 1].index(max(S[d - 1]))
print(i) | D = int(input())
c = list(map(int, input().split()))
S = [list(map(int, input().split())) for i in range(D)]
#T = [int(input()) for i in range(D)]
SUM = 0
last = [0] * 28
for d in range(1, D + 1):
i = S[d - 1].index(max(S[d - 1]))
print(i + 1) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 99 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::pow;
using std::string;
using std::vector;
int main() {
int D, out = 0, max, m_c;
cin >> D;
int c[26], s[D][26], t[D], l[26] = {};
for (int i = 0; i < 26; ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::pow;
using std::string;
using std::vector;
int main() {
int D, out = 0, max, m_c;
cin >> D;
int c[26], s[D][26], t[D], l[26] = {};
for (int i = 0; i < 26; ... | [["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 226 |
#include <iostream>
#include <queue>
#include <random>
#include <unordered_map>
#include <vector>
int main() {
int d;
std::cin >> d;
std::vector<int> c(26);
for (int i = 0; i < 26; i++)
std::cin >> c[i];
std::vector<std::vector<int>> s(d, std::vector<int>(26));
for (int i = 0; i < d; i++) {
for (in... | #include <iostream>
#include <queue>
#include <random>
#include <unordered_map>
#include <vector>
int main() {
int d;
std::cin >> d;
std::vector<int> c(26);
for (int i = 0; i < 26; i++)
std::cin >> c[i];
std::vector<std::vector<int>> s(d, std::vector<int>(26));
for (int i = 0; i < d; i++) {
for (in... | [["+", 0, 7, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 207 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
int d;
cin >> d;
int c[26];
for (int i ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
int d;
cin >> d;
int c[26];
for (int i ... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 217 |
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
constexpr char ln = '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1001001001LL;
constexpr long long LINF = 1001001001001001001;
... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
constexpr char ln = '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1001001001LL;
constexpr long long LINF = 1001001001001001001;
... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 397 |
#include <algorithm>
#include <iostream>
using namespace std;
int D;
const int n_type = 26;
int s_temp[n_type];
int main() {
cin >> D;
for (int i = 0; i < 26; i++) {
int x;
cin >> x;
}
for (int d = 0; d < D; d++) {
for (int i = 0; i < 26; i++) {
cin >> s_temp[i];
}
int max_idx = max_... | #include <algorithm>
#include <iostream>
using namespace std;
int D;
const int n_type = 26;
int s_temp[n_type];
int main() {
cin >> D;
for (int i = 0; i < 26; i++) {
int x;
cin >> x;
}
for (int d = 0; d < D; d++) {
for (int i = 0; i < 26; i++) {
cin >> s_temp[i];
}
int max_idx = max_... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 118 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, a, n) for (int i = a; i < n; i++)
#define been(ix) (ix).begin(), (ix).end()
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
const ll INFL = 1e18;
const int INF = 1001001001;
typedef pa... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, a, n) for (int i = a; i < n; i++)
#define been(ix) (ix).begin(), (ix).end()
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
const ll INFL = 1e18;
const int INF = 1001001001;
typedef pa... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 344 |
D = int(input())#D=365
c = list(map(int, input().split()))#0<=c<=100
s = [list(map(int, input().split())) for _ in range(D)]#0<=s<=20000
t = []
for d in range(D):
t.append(s.index(max(s[d])) + 1)
for i in range(D):
print(t[i]) | D = int(input())#D=365
c = list(map(int, input().split()))#0<=c<=100
s = [list(map(int, input().split())) for _ in range(D)]#0<=s<=20000
t = []
for d in range(D):
t.append(s[d].index(max(s[d])) + 1)
for i in range(D):
print(t[i]) | [["+", 0, 657, 31, 652, 63, 319, 500, 206, 0, 70], ["+", 0, 657, 31, 652, 63, 319, 500, 206, 206, 22], ["+", 0, 657, 31, 652, 63, 319, 500, 206, 0, 73]] | 5 | 100 |
D = int(input())
C = list(map(int,input().split()))
S = [list(map(int,input().split())) for _ in range(D)]
# 初期化
Ans = 0 # 満足度
last = [-1]*26
# 満足度を計算
for d in range(D):
max_ans = 0
max_i = 0
# 開催するコンテストID
for contest_id in range(26):
ans = 0
# 満足度をプラス
ans += S[d][contest_id]
... | D = int(input())
C = list(map(int,input().split()))
S = [list(map(int,input().split())) for _ in range(D)]
# 初期化
Ans = 0 # 満足度
last = [-1]*26
# 満足度を計算
for d in range(D):
max_ans = 0
max_i = 0
# 開催するコンテストID
for contest_id in range(26):
ans = 0
# 満足度をプラス
ans += S[d][contest_id]
... | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 156 |
d = int(input())
c = list(map(int, input().split()))
s = np.array([list(map(int, input().split())) for _ in range(d)])
init = s.argmax(axis=1) + 1
for i in range(d):
print(init[i]) | import numpy as np
d = int(input())
c = list(map(int, input().split()))
s = np.array([list(map(int, input().split())) for _ in range(d)])
init = s.argmax(axis=1) + 1
for i in range(d):
print(init[i]) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 0, 656, 0, 596, 141, 704, 141, 673, 0, 22], ["+", 36, 36, 0, 656, 0, 596, 141, 704, 0, 272], ["+", 36, 36, 0, 656, 0, 596, 141, 704, 705, 22]] | 5 | 83 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int d;
scanf("%d", &d);
int c[26];
int s[365][26];
for (int i = 0; i < 26; i++) {
scanf("%d", &c[i]);
}
for (int i = 0; i < d; i++) {
for (int j = 0; j < 26; j++) {
scanf("%d", &s[i][j]);
}
}
int last[26] =... | #include <iostream>
using namespace std;
int main() {
int d;
scanf("%d", &d);
int c[26];
int s[365][26];
for (int i = 0; i < 26; i++) {
scanf("%d", &c[i]);
}
for (int i = 0; i < d; i++) {
for (int j = 0; j < 26; j++) {
scanf("%d", &s[i][j]);
}
}
int last[26] = {};
int yesterday ... | [["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22]] | 1 | 366 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using P = pair<int, int>;
typedef long long ll;
int main() {
int d;
cin >> d;
ll ans = 0;
vector<int> open(26, -1);
vector<ll> c(26);
vector<vector<ll>> score(d, vector<ll>(26));
rep(i, 26) { cin >> c[i]; }
re... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using P = pair<int, int>;
typedef long long ll;
int main() {
int d;
cin >> d;
ll ans = 0;
vector<int> open(26, -1);
vector<ll> c(26);
vector<vector<ll>> score(d, vector<ll>(26));
rep(i, 26) { cin >> c[i]; }
re... | [["-", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 240 |
#import math
import numpy as np
#import torch
#import torch.nn as nn
#import matplotlib.pyplot as plt
#from decimal import Decimal
#import itertools
#import collections
D=int(input())
#N,M,K = map(int,input().split())
#B,W = map(int,input().split())
#T=int(input())
C = list(map(int,input().split()))
#S=str(input())
c=... | #import math
import numpy as np
#import torch
#import torch.nn as nn
#import matplotlib.pyplot as plt
#from decimal import Decimal
#import itertools
#import collections
D=int(input())
#N,M,K = map(int,input().split())
#B,W = map(int,input().split())
#T=int(input())
C = list(map(int,input().split()))
#S=str(input())
c=... | [["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 114 |
d = int(input())
c = list(map(int, input().split()))
for i in range(d):
s = list(map(int, input().split()))
num = max(s)
print(l.index(num)+1) | d = int(input())
c = list(map(int, input().split()))
for i in range(d):
s = list(map(int, input().split()))
num = max(s)
print(s.index(num)+1)
| [["-", 3, 4, 0, 657, 31, 652, 63, 319, 500, 22], ["+", 3, 4, 0, 657, 31, 652, 63, 319, 500, 22]] | 5 | 67 |
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define sz(x) (int)(x).size()
#define uni(x) x.erase(unique(rng(x)), x.end()... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define sz(x) (int)(x).size()
#define uni(x) x.erase(unique(rng(x)), x.end()... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 392 |
D = int(input())
c = list(map(int,input().split()))
s = [list(map(int,input().split())) for _ in range(D)]
t = [int(input()) for _ in range(D)]
S = 0
last = [-1]*26
score = 0;
for d in range(D):
S += s[d][t[d]]
last[t[d]] = d
for i in range(26):
S-=c[i]*(d - last[i])
score +=max(10**6+S,0)
... | D = int(input())
c = list(map(int,input().split()))
s = [list(map(int,input().split())) for _ in range(D)]
t = [int(input())-1 for _ in range(D)]
S = 0
last = [-1]*26
score = 0;
for d in range(D):
S += s[d][t[d]]
last[t[d]] = d
for i in range(26):
S-=c[i]*(d - last[i])
score +=max(10**6+S,0)
... | [["+", 0, 1, 0, 662, 12, 658, 8, 657, 17, 33], ["+", 0, 1, 0, 662, 12, 658, 8, 657, 12, 612]] | 5 | 151 |
def read_input():
D = int(input())
C = input().split()
C = [int(i) for i in C]
S = [list(map(int, input().split())) for _ in range(D)]
T = [int(input()) for _ in range(D)]
return D, C, S, T
def scoring(S, D, T, C):
res = []
last = [0 for _ in range(26)]
final = 0
for i in rang... | def read_input():
D = int(input())
C = input().split()
C = [int(i) for i in C]
S = [list(map(int, input().split())) for _ in range(D)]
T = [int(input()) for _ in range(D)]
return D, C, S, T
def scoring(S, D, T, C):
res = []
last = [0 for _ in range(26)]
final = 0
for i in range... | [["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 219 |
/*/ Author: kal013 /*/
/*/ Author: kal013 /*/
// #pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;
using namespace __gnu_pbds;
template <class T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_o... | /*/ Author: kal013 /*/
/*/ Author: kal013 /*/
// #pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;
using namespace __gnu_pbds;
template <class T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_o... | [["-", 0, 11, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 11, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22]] | 1 | 1,593 |
// B - Scoring
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
ll d;
cin >> d;
vector<ll> c(26);
vector<vector<ll>> s(d, vector<ll>(26));
rep(i, 26) cin >> c[i];
for (int i = 0; i < d; i++) {
for (int j = 0; j < 26; j++) {... | // B - Scoring
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
ll d;
cin >> d;
vector<ll> c(26);
vector<vector<ll>> s(d, vector<ll>(26));
rep(i, 26) cin >> c[i];
for (int i = 0; i < d; i++) {
for (int j = 0; j < 26; j++) {... | [["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13]] | 1 | 230 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int D;
cin >> D;
vector<int> c(26);
for (int i = 0; i < 26; i++)
cin >> c.at(i);
vector<vector<int>> s(D, vector<int>(26));
for (int i = 0; i < D; i++) {
for (int j = 0; j < 26; j++) {
cin >> s.at(i).at(j);
}
}
int ns = 0;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int D;
cin >> D;
vector<int> c(26);
for (int i = 0; i < 26; i++)
cin >> c.at(i);
vector<vector<int>> s(D, vector<int>(26));
for (int i = 0; i < D; i++) {
for (int j = 0; j < 26; j++) {
cin >> s.at(i).at(j);
}
}
int ns = 0;
... | [["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 110], ["-", 12, 16, 12, 16, 31, 2, 3, 4, 0, 22], ["+", 0, 11, 12, 16, 31, 2, 3, 4, 0, 22]] | 1 | 231 |
D=int(input())
C=list(map(int,input().split()))
import sys
S=list()
for i in range(D):
S.append(list(map(int,input().split())))
t=list()
for i in range(D):
t.append(int(input()))
M=0
di=[0]*26
for d in range(D):
for i in range(26):
if i==t[d]-1:
di[i]=0
else:
di[i]+=1
M+=S[d][t[d]-1]
for ... | D=int(input())
C=list(map(int,input().split()))
S=list()
for i in range(D):
S.append(list(map(int,input().split())))
t=list()
for i in range(D):
t.append(int(input()))
M=0
di=[0]*26
for d in range(D):
for i in range(26):
if i==t[d]-1:
di[i]=0
else:
di[i]+=1
M+=S[d][t[d]-1]
for i in range(... | [["-", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 12, 657, 12, 23, 0, 657, 31, 657, 31, 22], ["-", 12, 657, 12, 23, 0, 657, 31, 657, 17, 72], ["-", 12, 657, 12, 23, 0, 657, 31, 657, 12, 612], ["-", 0, 677, 12, 657, 12, 23, 0, 657, 17, 33]] | 5 | 177 |
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin()... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin()... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 690 |
#include <iostream>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::vector;
int main() {
int D{0}, ret{0};
cin >> D;
std::vector<int> c(26), t(D), last(26);
std::vector<std::vector<int>> s(D, vector<int>(26));
for (auto &i : c) {
cin >> i;
}
for (auto &i : s) {
... | #include <iostream>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::vector;
int main() {
int D{0}, ret{0};
cin >> D;
std::vector<int> c(26), t(D), last(26);
std::vector<std::vector<int>> s(D, vector<int>(26));
for (auto &i : c) {
cin >> i;
}
for (auto &i : s) {
... | [["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 251 |
import numpy as np
D = int(input())
c = np.array( list(map(int, input().split())) )
s = [[] for i in range(365+1)]
for i in range(D):
s[i] = np.array( list(map(int, input().split())) )
#
last = np.array( [-1]*26 )
av = np.array( [0]*26 )
id = np.identity(4,dtype=int)
v = 0
for d in range(D):
av = s[d] - sum( c*(d... | import numpy as np
D = int(input())
c = np.array( list(map(int, input().split())) )
s = [[] for i in range(365+1)]
for i in range(D):
s[i] = np.array( list(map(int, input().split())) )
#
last = np.array( [-1]*26 )
av = np.array( [0]*26 )
id = np.identity(4,dtype=int)
v = 0
for d in range(D):
av = s[d] - sum( c*(d... | [["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21]] | 5 | 188 |
d =int(input())
c = list(map(int, input().split()))
s = []
t = []
d_l = []
score = 0
soft = 0
for i in range(d):
s.append(0)
s[i] = list(map(int, input().split()))
for i in range(26):
d_l.append(0)
for i in range(d):
t = int(input())
soft = 0
for j in range(26):
if t-1 == j... | d =int(input())
c = list(map(int, input().split()))
s = []
t = []
d_l = []
score = 0
soft = 0
for i in range(d):
s.append(0)
s[i] = list(map(int, input().split()))
for i in range(26):
d_l.append(0)
for i in range(d):
t = int(input())
soft = 0
for j in range(26):
if t-1 == j... | [["-", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 107]] | 5 | 166 |
def complain(comp,c,k,last_hold,i):
# print(k)
if(k > 26):
# print("___")
return comp
comp += c[k-1]*((i+1) - last_hold[k-1])
k += 1
# print(comp,"comp")
return complain(comp,c,k,last_hold,i)
D = int(input())
c = list(map(int,input().split()))
s = ["_"]*(D)
print(c)
for i in ra... | def complain(comp,c,k,last_hold,i):
# print(k)
if(k > 26):
# print("___")
return comp
comp += c[k-1]*((i+1) - last_hold[k-1])
k += 1
# print(comp,"comp")
return complain(comp,c,k,last_hold,i)
D = int(input())
c = list(map(int,input().split()))
s = ["_"]*(D)
# print(c)
for i in ... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 259 |
# -*- coding: utf-8 -*-
import time
import numpy as np
start = time.time()
limit_time = 1.8
# 整数の入力
d = int(input())
c = [int(i) for i in input().split()]
s = [[int(i) for i in input().split()] for j in range(d)]
def point(t):
result = 0
map = {
0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9... | # -*- coding: utf-8 -*-
import time
import numpy as np
start = time.time()
limit_time = 1.8
# 整数の入力
d = int(input())
c = [int(i) for i in input().split()]
s = [[int(i) for i in input().split()] for j in range(d)]
def point(t):
result = 0
map = {
0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9... | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 273 |
require 'pry'
class Solver
def prepare
@d = gets.to_i
@cs = gets.split(" ").map(&:to_i)
@mans = [] # mans[date][contest]
@ts = []
@last = [0] * 26
@d.times do
@mans << gets.split(" ").map(&:to_i)
end
@d.times do
@ts << gets.to_i
end
end
# ----------- #
def ... | class Solver
def prepare
@d = gets.to_i
@cs = gets.split(" ").map(&:to_i)
@mans = [] # mans[date][contest]
@ts = []
@last = [0] * 26
@d.times do
@mans << gets.split(" ").map(&:to_i)
end
@d.times do
@ts << gets.to_i
end
end
# ----------- #
def score(contest_i... | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 0, 493, 0, 652, 3, 4, 0, 557, 0, 62], ["-", 0, 493, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 204 |
import sys
from itertools import accumulate
import bisect
def input():
return sys.stdin.readline()[:-1]
def mi():
return map(int, input().split())
def ii():
return int(input())
def main():
D = ii()
c = list(mi())
s = [list(mi()) for i in range(D)]
t = [ii()-1 for i in range(D)]
las... | import sys
from itertools import accumulate
import bisect
def input():
return sys.stdin.readline()[:-1]
def mi():
return map(int, input().split())
def ii():
return int(input())
def main():
D = ii()
c = list(mi())
s = [list(mi()) for i in range(D)]
t = [ii()-1 for i in range(D)]
las... | [["+", 0, 1, 0, 652, 3, 4, 0, 661, 0, 48], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["+", 3, 4, 0, 653, 51, 557, 0, 6, 0, 44], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]] | 5 | 252 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define SP << " "
#define LLi long long int
using namespace std;
int imax = 2147483647;
long long int llimax = 9223372036854775807;
// int型vectorを出力
void PV(vector<int> pvv) {
rep(i, pvv.size()) cout <<... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define SP << " "
#define LLi long long int
using namespace std;
int imax = 2147483647;
long long int llimax = 9223372036854775807;
// int型vectorを出力
void PV(vector<int> pvv) {
rep(i, pvv.size()) cout <<... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["-", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 307 |
import sys
input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
d = I()
contest = LI()
mylist = [LI() for i in range(26)]
day = [0] * 26
result = 0
for i in range(d):
temp = I()
result += mylist[i][temp-1]
day =... | # coding: utf-8
# Your code here!
import sys
input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
d = I()
contest = LI()
mylist = [LI() for i in range(d)]
day = [0] * 26
result = 0
for i in range(d):
temp = I()
re... | [["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 612], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 22]] | 5 | 160 |
lines = []
while line = gets
lines << line.chomp.split(' ').map(&:to_i)
end
D = lines[0][0]
class Array
def max_id
max = - 10000000000
tmp = -1
for i in 1..self.length do
if self[i-1] > max then
tmp = i-1
max = self[i-1]
end
end
return tmp
end
end
last_date = [... | lines = []
while line = gets
lines << line.chomp.split(' ').map(&:to_i)
end
D = lines[0][0]
class Array
def max_id
max = - 10000000000
tmp = -1
for i in 1..self.length do
if self[i-1] > max then
tmp = i-1
max = self[i-1]
end
end
return tmp
end
end
last_date = [... | [["+", 0, 662, 12, 742, 500, 742, 0, 738, 17, 72], ["+", 0, 662, 12, 742, 500, 742, 0, 738, 12, 612], ["+", 0, 755, 12, 742, 500, 742, 0, 738, 17, 72], ["+", 0, 755, 12, 742, 500, 742, 0, 738, 12, 612]] | 4 | 177 |
#include <bits/stdc++.h>
#define rep(i, s, n) for (int i = s; i < n; i++)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define all_acc(x) (x).begin(), (x).end(), 0LL
#define int long long
using namespace std;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
using ll = long... | #include <bits/stdc++.h>
#define rep(i, s, n) for (int i = s; i < n; i++)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define all_acc(x) (x).begin(), (x).end(), 0LL
#define int long long
using namespace std;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
using ll = long... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 384 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
int main() {
ll D;
cin >> D;
v... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
int main() {
ll D;
cin >> D;
v... | [["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 22]] | 1 | 319 |
bool DBG = false;
//#pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_dec_float.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using ... | bool DBG = false;
//#pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_dec_float.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using ... | [["-", 0, 27, 28, 69, 28, 2, 3, 4, 0, 13], ["+", 0, 27, 28, 69, 28, 2, 3, 4, 0, 22]] | 1 | 1,441 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> iint;
typedef pair<ll, ll> llll;
#define ALL(x) (x).begin(), (x).end()
const ll zero = 0;
const ll INF = 3000000000000000000; // 10^18
const int inINF = 1000000000; // 10^9
const ll MOD = 1000000007; // 10^9+7
cons... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> iint;
typedef pair<ll, ll> llll;
#define ALL(x) (x).begin(), (x).end()
const ll zero = 0;
const ll INF = 3000000000000000000; // 10^18
const int inINF = 1000000000; // 10^9
const ll MOD = 1000000007; // 10^9+7
cons... | [["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 314 |
#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
using Int = long long;
const char newl = '\n';
// INSERT ABOVE HERE
signed main() {... | #include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
using Int = long long;
const char newl = '\n';
// INSERT ABOVE HERE
signed main() {... | [["+", 0, 43, 49, 50, 51, 4, 0, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 12, 13]] | 1 | 345 |
import random
d = int(input())
c = list(map(int, input().split()))
s = []
for i in range(d):
s = list(map(int, input().split()))
print(1+s.index(max(x))) | import random
d = int(input())
c = list(map(int, input().split()))
s = []
for i in range(d):
s = list(map(int, input().split()))
print(1+s.index(max(s))) | [["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 70 |
from statistics import mean
from typing import List
import sys
def read_data(file_name: str, std_in=True):
satisfactions_list = list()
file = sys.stdin if std_in else open(file_name, 'r')
days = int(file.readline().rstrip())
satisfaction_decreases = [int(c) for c in file.readline().rstrip().split(" ")... | from statistics import mean
from typing import List
import sys
def read_data(file_name: str, std_in=True):
satisfactions_list = list()
file = sys.stdin if std_in else open(file_name, 'r')
days = int(file.readline().rstrip())
satisfaction_decreases = [int(c) for c in file.readline().rstrip().split(" ")... | [["-", 0, 14, 8, 196, 0, 37, 0, 41, 0, 612], ["+", 0, 14, 8, 196, 0, 37, 0, 41, 0, 612], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 0, 14, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 678 |
import numpy as np
D = int(input())
c = list(map(int, input().split()))
c = np.array(c)
S = np.zeros([D, 26], dtype=int)
for i in range(D):
S[i, :] = list(map(int, input().split()))
T = []
last = np.zeros(26)
for i in range(D):
score = S[i, :] - (i-last)*np.array(c)
argmax = score.argmax()
t = argmax
last[... | import numpy as np
D = int(input())
c = list(map(int, input().split()))
c = np.array(c)
S = np.zeros([D, 26], dtype=int)
for i in range(D):
S[i, :] = list(map(int, input().split()))
T = []
last = np.zeros(26)
for i in range(D):
score = S[i, :] - (i-last)*np.array(c)
argmax = score.argmax()
t = argmax+1
las... | [["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 1, 0, 662, 31, 206, 206, 657, 17, 33], ["+", 0, 1, 0, 662, 31, 206, 206, 657, 12, 612]] | 5 | 144 |
import sys
import numpy as np
sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))
D = ... | import sys
import numpy as np
sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))
D = ... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 652, 3, 4, 0, 661, 0, 23, 0, 24], ["+", 3, 4, 0, 661, 0, 23, 0, 657, 17, 72], ["+", 3, 4, 0, 661, 0, 23, 0, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 661, 0, 23, 0, 25]] | 5 | 641 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 1,237 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1; i <= (int)(n); i++)
#define ll long long
#define umap unordered_map
using graph = vector<vector<int>>;
using graph2 = vector<vector<pair<int, int>>>;
#define oorret true // std::out_of_r... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1; i <= (int)(n); i++)
#define ll long long
#define umap unordered_map
using graph = vector<vector<int>>;
using graph2 = vector<vector<pair<int, int>>>;
#define oorret true // std::out_of_r... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 373 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
const ll LongINF = 1e13 + 7;
const int INF = 1e9 + 7;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
const ll LongINF = 1e13 + 7;
const int INF = 1e9 + 7;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 515 |
# -*- coding: utf-8 -*-
#############
# Libraries #
#############
import time
START = (int(time.time() * 1000))
import random
import sys
input = sys.stdin.readline
import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import ... | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import time
START = (int(time.time() * 1000))
import random
import sys
input = sys.stdin.readline
import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import ... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 575 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<int, int> P;
ll Mod = 1000000007;
int main() {
int D;
cin >> D;
int c[26];
int las[26];
for (int i = 0; i < 26; i++) {
cin >> c[i];
las[i] = 0;
}
int s[D][26];
for (int i = 0; i < D; i++) {
for (int j = 0; j < 2... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<int, int> P;
ll Mod = 1000000007;
int main() {
int D;
cin >> D;
int c[26];
int las[26];
for (int i = 0; i < 26; i++) {
cin >> c[i];
las[i] = 0;
}
int s[D][26];
for (int i = 0; i < D; i++) {
for (int j = 0; j < 2... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 402 |
D = int(input())
c = [int(i) for i in input().split()]
#score = 0
days = [0]*26
ans = []
for k in range(D):
s = [int(i) for i in input().split()]
t = 0
for i in range(1,26):
if s[t] + days[t]*c[t] <= s[i] + days[i]*c[i]:
t = i
ans.append(t)
for i in range(26):
if i == t:
... | D = int(input())
c = [int(i) for i in input().split()]
days = [0]*26
ans = []
for k in range(D):
s = [int(i) for i in input().split()]
t = 0
for i in range(1,26):
if s[t] + days[t]*c[t] <= s[i] + days[i]*c[i]:
t = i
ans.append(t)
for i in range(26):
if i == t:
... | [["+", 12, 658, 8, 652, 3, 4, 0, 657, 17, 72], ["+", 12, 658, 8, 652, 3, 4, 0, 657, 12, 612]] | 5 | 171 |
//#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 <stdl... | //#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 <stdl... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 2,501 |
import random
import copy
def cal(x):
Manzoku=0
l=[0]*26
for d in range(D):
l[x[d]-1]=d
Manzoku+=s[d][x[d]-1]
for i in range(26):
Manzoku-=c[i]*(d-l[i])
return Manzoku
D=int(input())
c=list(map(int,input().split()))
s=[]
t=[]
for i in range(D):
s.append(list(map(int,input().split())))
l=[0... | import random
import copy
def cal(x):
Manzoku=0
l=[0]*26
for d in range(D):
l[x[d]-1]=d
Manzoku+=s[d][x[d]-1]
for i in range(26):
Manzoku-=c[i]*(d-l[i])
return Manzoku
D=int(input())
c=list(map(int,input().split()))
s=[]
t=[]
for i in range(D):
s.append(list(map(int,input().split())))
l=[0... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 348 |
#include <cstdlib>
#include <iostream>
using namespace std;
#define N 500
#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++) {
... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 12, 13]] | 1 | 521 |
def main():
INF = 10 ** 9 + 10
D = int(input())
*C, = map(int, input().split())
# C[type]
# sum(ci*(d-last(d,i) for ci in C)だけ下がる
S = [[int(x) for x in input().split()] for _ in range(D)]
# S[day][type]:=happiness
last = [-1] * 26
def diff(d, t):
ret = S[d][t]
ret ... | def main():
INF = 10 ** 9 + 10
D = int(input())
*C, = map(int, input().split())
# C[type]
# sum(ci*(d-last(d,i) for ci in C)だけ下がる
S = [[int(x) for x in input().split()] for _ in range(D)]
# S[day][type]:=happiness
last = [-1] * 26
def diff(d, t):
ret = S[d][t]
ret ... | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 208 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define For(i, n, k) for (int i = (n); i < (k); i++)
#define ALL(a) (a).begin(), (a).end()
int d = 365, n = 26, score = 0;
int c[27];
int s[366][27];
int sat[366] = {};
int last[27] = {};
vector<int> a(366, 0);
int range = 7;
ofstream fout("out.txt"), ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define For(i, n, k) for (int i = (n); i < (k); i++)
#define ALL(a) (a).begin(), (a).end()
int d = 365, n = 26, score = 0;
int c[27];
int s[366][27];
int sat[366] = {};
int last[27] = {};
vector<int> a(366, 0);
int range = 7;
ofstream fout("out.txt"), ... | [["-", 0, 1, 0, 16, 31, 16, 0, 42, 0, 22], ["+", 0, 1, 0, 16, 31, 16, 0, 42, 0, 22]] | 1 | 879 |
#include <bits/stdc++.h>
typedef long long lint;
using namespace std;
int d;
vector<int> c;
vector<vector<int>> s;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
pair<int, int> from_b_a(set<int> &s, int k) {
auto before = s.lower_bound(k);
before--;
... | #include <bits/stdc++.h>
typedef long long lint;
using namespace std;
int d;
vector<int> c;
vector<vector<int>> s;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
pair<int, int> from_b_a(set<int> &s, int k) {
auto before = s.lower_bound(k);
before--;
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 35], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 691 |
from random import randint
random.seed(0)
D = int(input())
C = [int(i) for i in input().split()]
S = [[int(i) for i in input().split()] for j in range(D)]
def score_calc(T):
total = 0
last = [0] * 26
for i in range(1, D+1):
t = T[i-1]
total += S[i-1][t-1]
last[t-1] = i
for ... | import random
from random import randint
random.seed(0)
D = int(input())
C = [int(i) for i in input().split()]
S = [[int(i) for i in input().split()] for j in range(D)]
def score_calc(T):
total = 0
last = [0] * 26
for i in range(1, D+1):
t = T[i-1]
total += S[i-1][t-1]
last[t-1] = ... | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 358 |
D = int(input())
c = [int(i) for i in input().split()]
s = []
for i in range(D):
s.append([int(j) for j in input().split()])
for i, s_i in enumerate(s):
print(s_i.index(max(s_i))) | # -*- coding: utf-8 -*-
D = int(input())
c = [int(i) for i in input().split()]
s = []
for i in range(D):
s.append([int(j) for j in input().split()])
for i, s_i in enumerate(s):
print(s_i.index(max(s_i)) + 1) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 81 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) x.begin(), x.end()
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)
ll D;
ll c[26];
ll s[366][26];
ll t[366];
ll... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) x.begin(), x.end()
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)
ll D;
ll c[26];
ll s[366][26];
ll t[366];
ll... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 331 |
INF=10**30
D=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for i in range(D)]
last=[0]*26
ans=[]
point=0
for i in range(D):
d=i+1
res=-INF
z=-1
for j in range(26):
p=s[i][j]
for k in range(26):
if k==j:
continue
p-... | INF=10**30
D=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for i in range(D)]
last=[0]*26
ans=[]
point=0
for i in range(D):
d=i+1
res=-INF
z=-1
for j in range(26):
p=s[i][j]
for k in range(26):
if k==j:
continue
p-... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 187 |
#include <bits/stdc++.h>
using namespace std;
signed main() {
int d;
vector<int> c(26);
cin >> d;
for (auto &ci : c)
cin >> ci;
vector<vector<int>> s(d, vector<int>(26));
for (auto &si : s)
for (auto &sij : si)
cin >> sij;
vector<int> last(26, 0);
auto calc_satisfaction_level = [&](int... | #include <bits/stdc++.h>
using namespace std;
signed main() {
int d;
vector<int> c(26);
cin >> d;
for (auto &ci : c)
cin >> ci;
vector<vector<int>> s(d, vector<int>(26));
for (auto &si : s)
for (auto &sij : si)
cin >> sij;
vector<int> last(26, 0);
auto calc_satisfaction_level = [&](int... | [["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 8, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 8, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 336 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) rep(i, 0, n)
int cd = 20000;
int d, c[26], s[366][26];
int t[366];
ll r;
void init() {
cin >> d;
REP(i, 26) cin >> c[i];
REP(i, d) REP(j, 26) cin >> s[i][j];
}
void greedy(... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) rep(i, 0, n)
int cd = 20000;
int d, c[26], s[366][26];
int t[366];
ll r;
void init() {
cin >> d;
REP(i, 26) cin >> c[i];
REP(i, d) REP(j, 26) cin >> s[i][j];
}
void greedy(... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 395 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int WIDTH = 300;
const int DEBUG = 0;
struct State {
int score;
int prevs;
int sousa;
int Last[29];
};
bool operator<(const State &a1, const State &a2) {
if (a1.score < a2.score)
return true;
return false;
}
int N;... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int WIDTH = 300;
const int DEBUG = 0;
struct State {
int score;
int prevs;
int sousa;
int Last[29];
};
bool operator<(const State &a1, const State &a2) {
if (a1.score < a2.score)
return true;
return false;
}
int N;... | [["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 22], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 12, 13]] | 1 | 746 |
dd = int(input())
c = list(list(map(int, input().split())))
s = [[0]*26]*dd
v = [[0]*26]*dd
vs = [[0]*26]*dd
ans = [0]*dd
lastdate = [0]*26
for i in range(dd):
s[i] = list(list(map(int, input().split())))
for i in range(dd):
for j in range(dd):
v[i][j] = s[i][j] + c[i] *(i-lastdate[j])
maxv = -... |
dd = int(input())
c = list(list(map(int, input().split())))
s = [[0]*26]*dd
v = [[0]*26]*dd
vs = [[0]*26]*dd
ans = [0]*dd
fdate = [0]*26
for i in range(dd):
s[i] = list(list(map(int, input().split())))
for i in range(dd):
for j in range(26):
v[i][j] = s[i][j] + c[j] *(i-fdate[j])
maxv = -100000... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 662, 12, 657, 12, 657, 31, 206, 206, 22], ["+", 0, 662, 12, 657, 12, 657, 31, 206, 206, 22], ["-", 12, 657, 12, 23, 0, 657, 12, 206, ... | 5 | 208 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int F = 26;
const int def = 1e6;
int n;
vector<int> c(F);
vector<vector<int>> a;
void init() {
cin >> n;
a.resize(n, vector<int>(F));
for (int i = 0; i < F; i++)
cin >> c[i];
for (int i = 0; i < n; i++)
for (int j = 0; j < F; j... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int F = 26;
const int def = 1e6;
int n;
vector<int> c(F);
vector<vector<int>> a;
void init() {
cin >> n;
a.resize(n, vector<int>(F));
for (int i = 0; i < F; i++)
cin >> c[i];
for (int i = 0; i < n; i++)
for (int j = 0; j < F; j... | [["+", 51, 16, 31, 16, 12, 23, 0, 16, 17, 72], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 12, 13]] | 1 | 503 |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
private static int d;
private static int type = 26;
private static int[] c;
private static int[][] s;
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
d = Integer.parseInt(scan.next());
c = ne... |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
private static int d;
private static int type = 26;
private static int[] c;
private static int[][] s;
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
d = Integer.parseInt(scan.next());
c = n... | [["-", 0, 1, 0, 492, 3, 4, 0, 27, 0, 29], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499], ["-", 8, 196, 0, 503, 49, 200, 51, 509, 119, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 509, 119, 22], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 18], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 47]] | 3 | 453 |
from collections import defaultdict
import heapq as hq
d = int(input())
c = list(map(int,input().split()))
s = [0]
for i in range(d):
s.append([0]+list(map(int,input().split())))
dic = defaultdict(int)
contest = [[] for _ in range(27)]
contests = [-1]*(d+1)
for i in range(1,d+1):
maxscore = 0
maxcontest = -... | from collections import defaultdict
import heapq as hq
d = int(input())
c = [0]+list(map(int,input().split()))
s = [0]
for i in range(d):
s.append([0]+list(map(int,input().split())))
dic = defaultdict(int)
contest = [[] for _ in range(27)]
contests = [-1]*(d+1)
for i in range(1,d+1):
maxscore = 0
maxcontest... | [["+", 0, 1, 0, 662, 12, 657, 31, 634, 0, 70], ["+", 0, 1, 0, 662, 12, 657, 31, 634, 0, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 634, 0, 73], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72]] | 5 | 178 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n; i > 0; i--)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define all(v) v.begin(), v.end()
using pint = pair<int, int>;
using tint = tuple<int, int, int>;
template <class T> inline bool chmax... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n; i > 0; i--)
#define rep1(i, n) for (int i = 1; i < n; i++)
#define all(v) v.begin(), v.end()
using pint = pair<int, int>;
using tint = tuple<int, int, int>;
template <class T> inline bool chmax... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 527 |
#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... | [["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 596 |
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
... | import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
... | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 322 |
d = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for _ in range(d)]
t = []
memo = [0 for _ in range(26)]
for i in range(d):
scores = []
for j in range(26):
delta_score = 0
delta_score += s[i][j]
for k in range(26):
if j == k:
... | d = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for _ in range(d)]
t = []
memo = [0 for _ in range(26)]
for i in range(d):
scores = []
for j in range(26):
delta_score = 0
delta_score += s[i][j]
for k in range(26):
if j == k:
... | [["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 195 |
D = int(input())
c = list(map(int, input().split()))
sdi = [list(map(int, input().split())) for i in range(D)]
lastdi = [0 for i in range(26)]
ans_c = []
for d in range(D):
day_s = sdi[d]
sloss = [day_s[i] + c[i]*(d - lastdi[i]) for i in range(26) ]
ans = sloss.index(max(sloss))
ans_c.append( ans )
... | D = int(input())
c = list(map(int, input().split()))
sdi = [list(map(int, input().split())) for i in range(D)]
lastdi = [0 for i in range(26)]
ans_c = []
for d in range(D):
day_s = sdi[d]
sloss = [day_s[i] + c[i]*(d - lastdi[i]) for i in range(26) ]
ans = sloss.index(max(sloss))
ans_c.append( ans+1 )
... | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 167 |
def choose(D, c, s, d, last, depth, point):
maxpoint = -999999
maxnum = 0
if depth > 0:
for i in range(26):
point = s[d][i]
point += changepoint(c, d, i, last)
if point >= maxpoint:
maxpoint = point
maxnum = i
return maxnum... | def choose(D, c, s, d, last, depth, point):
maxpoint = -999999
maxnum = 0
if depth > 0:
for i in range(26):
point = s[d][i]
point += changepoint(c, d, i, last)
if point >= maxpoint:
maxpoint = point
maxnum = i
return maxnum,... | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 232 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.