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 |
|---|---|---|---|---|
n, m, p = list(map(int, input().split()))
# a = list(map(int, input().split()))
#
# abc = [int(input()) for i in range(5)]
# a = int(input())
# w = list(map(int, input().split()))
# n, k = list(map(int, input().split()))
# a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]... | n, m, p = list(map(int, input().split()))
# a = list(map(int, input().split()))
#
# abc = [int(input()) for i in range(5)]
# a = int(input())
# w = list(map(int, input().split()))
# n, k = list(map(int, input().split()))
# a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]... | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 183 |
#include <bits/stdc++.h>
#define rep(i, a, b) for (auto i = (a); i < (b); i++)
#define per(i, a, b) for (auto i = (a); i >= (b); i--)
#define Min(a, b) ((a) < (b) ? (a) : (b))
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define int_inf 0x3f3f3f3f
#define int_max 2147483647
#define ll_max 9223372036854775807
#define ull_m... | #include <bits/stdc++.h>
#define rep(i, a, b) for (auto i = (a); i < (b); i++)
#define per(i, a, b) for (auto i = (a); i >= (b); i--)
#define Min(a, b) ((a) < (b) ? (a) : (b))
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define int_inf 0x3f3f3f3f
#define int_max 2147483647
#define ll_max 9223372036854775807
#define ull_m... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 569 |
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
aindex=n
bindex=m
acumsum = [0]
bcumsum = [0]
ab =0
for aa in range(n):
ab += a[aa]
acumsum.append(ab)# = ab
if ab>k:
aindex= aa
break
ab =0
for bb in range(m):
ab += b[bb]
bcumsum.append(ab)
if ... | n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
aindex=n
bindex=m
acumsum = [0]
bcumsum = [0]
ab =0
for aa in range(n):
ab += a[aa]
acumsum.append(ab)# = ab
if ab>k:
aindex= aa
break
ab =0
for bb in range(m):
ab += b[bb]
bcumsum.append(ab)
if ... | [["+", 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 | 184 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP1(i, a, b) for (int i = a; i <= (int)(b); i++)
#define ALL(x) begin(x), end(x)
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
template <class T> inline bool chmax(... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP1(i, a, b) for (int i = a; i <= (int)(b); i++)
#define ALL(x) begin(x), end(x)
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
template <class T> inline bool chmax(... | [["+", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 14, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 440 |
n, m, k = map(int, input().split())
aes = list(map(int, input().split()))
bs = list(map(int, input().split()))
r_aes = [0]*n
for i in range(1,n):
aes[i] += aes[i-1]
for i in range(1,m):
bs[i] += bs[i-1]
cnt_a = 0
for i in range(n):
if aes[i] > k:
break
cnt_a += 1
cnt_b = 0
res = cnt_a
#cnt = 5
w... | n, m, k = map(int, input().split())
aes = list(map(int, input().split()))
bs = list(map(int, input().split()))
r_aes = [0]*n
for i in range(1,n):
aes[i] += aes[i-1]
for i in range(1,m):
bs[i] += bs[i-1]
cnt_a = 0
for i in range(n):
if aes[i] > k:
break
cnt_a += 1
cnt_b = 0
res = cnt_a
#cnt = 5
w... | [["-", 0, 662, 12, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 8, 196, 0, 57, 15, 666, 0, 664, 17, 33]] | 5 | 223 |
#include <bits/stdc++.h>
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#include <ext/pb_ds/assoc_containe... | #include <bits/stdc++.h>
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#include <ext/pb_ds/assoc_containe... | [["-", 0, 57, 64, 1, 0, 11, 12, 69, 28, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 69, 28, 22]] | 1 | 556 |
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
for i in range(1, len(A)):
A[i] += A[i - 1]
for i in range(1, len(B)):
B[i] += B[i - 1]
A.insert(0, 0)
B.insert(0, 0)
r = 0
for i, a in enumerate(A):
min_idx = 0
max_idx = len(B) - 1
while min... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
for i in range(1, len(A)):
A[i] += A[i - 1]
for i in range(1, len(B)):
B[i] += B[i - 1]
A.insert(0, 0)
B.insert(0, 0)
r = 0
for i, a in enumerate(A):
min_idx = 0
max_idx = len(B) - 1
while min... | [["+", 0, 52, 15, 679, 31, 666, 0, 657, 17, 72], ["+", 0, 52, 15, 679, 31, 666, 0, 657, 12, 612]] | 5 | 243 |
import sys
n,m,k=map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
ans = 1
c = [0]
d = [0]
for i in range(1,n+1):
c.append(c[i-1] + a[i-1])
if(c[i] > k):
c.pop()
break
for i in range(1,m+1):
d.append(d[i-1] + b[i-1])
if(d[i] > k):
... | import sys
n,m,k=map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
ans = 1
c = [0]
d = [0]
for i in range(1,n+1):
c.append(c[i-1] + a[i-1])
if(c[i] > k):
c.pop()
break
for i in range(1,m+1):
d.append(d[i-1] + b[i-1])
if(d[i] > k):
... | [["-", 0, 679, 12, 666, 0, 657, 12, 206, 206, 22], ["+", 0, 679, 12, 666, 0, 657, 12, 206, 206, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 264 |
//
// main.cpp
// tsundoku
//
// Created by Bryan on 27/06/20.
// Copyright © 2020 mac. All rights reserved.
//
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
long long N, M, K;
scanf("%lld %lld %lld", &N, &M, &K);
long long arr[N + 2];
long long brr[M + 2];
arr[0] = 0;
brr[0... | //
// main.cpp
// tsundoku
//
// Created by Bryan on 27/06/20.
// Copyright © 2020 mac. All rights reserved.
//
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
long long N, M, K;
scanf("%lld %lld %lld", &N, &M, &K);
long long arr[N + 2];
long long brr[M + 2];
arr[0] = 0;
brr[0... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 334 |
#include <bits/stdc++.h>
using namespace std;
long long n, m, k, ans, a[233333], b[233333];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> m >> k;
for (int i = 1; i <= n; i++)
cin >> a[i], a[i] += a[i - 1];
for (int i = 1; i <= m; i++)
cin >> b[i], b[i] += b[i - 1];
for... | #include <bits/stdc++.h>
using namespace std;
long long n, m, k, ans, a[233333], b[233333];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> m >> k;
for (int i = 1; i <= n; i++)
cin >> a[i], a[i] += a[i - 1];
for (int i = 1; i <= m; i++)
cin >> b[i], b[i] += b[i - 1];
for... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 192 |
import itertools
n, m, k = [int(i) for i in input().split()]
a_list = [int(i) for i in input().split()]
b_list = [int(i) for i in input().split()]
a_acc = [0]
a_acc.extend(list(itertools.accumulate(a_list)))
b_acc = [0]
b_acc.extend(list(itertools.accumulate(b_list)))
ans = 0
j = m
for i in range(1, n+1):
if a_ac... | import itertools
n, m, k = [int(i) for i in input().split()]
a_list = [int(i) for i in input().split()]
b_list = [int(i) for i in input().split()]
a_acc = [0]
a_acc.extend(list(itertools.accumulate(a_list)))
b_acc = [0]
b_acc.extend(list(itertools.accumulate(b_list)))
ans = 0
j = m
for i in range(n+1):
if a_acc[i... | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 155 |
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vec... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vec... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]] | 1 | 497 |
N,M,K = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
B = gets.split.map(&:to_i)
max = 0
a = [0]
b = [0]
A.each_with_index do |n,i|
a << a[i] + n
end
B.each_with_index do |n,i|
b << b[i] + n
end
ans = 0
j = M
1.upto(N+1) do |i|
if a[i] > K
break
end
while b[j] > K - a[i] do
j -= 1
end
c =... | N,M,K = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
B = gets.split.map(&:to_i)
a = [0]
b = [0]
A.each_with_index do |n,i|
a << a[i] + n
end
B.each_with_index do |n,i|
b << b[i] + n
end
ans = 0
j = M
0.upto(N) do |i|
if a[i] > K
break
end
while b[j] > K - a[i] do
j -= 1
end
c = i + j
an... | [["-", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["-", 36, 36, 36, 36, 0, 493, 0, 662, 0, 32], ["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["-", 36, 36, 36, 36, 0, 493, 0, 652, 486, 612], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 486, 612], ["-", 0, 493, 0, 652, 3, 4, 0, 738, 17, 72], ["-", 0, 493, 0, 652, 3, 4, 0, 738,... | 4 | 145 |
if __name__ == "__main__":
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans, j = 0, M
a = [0]
b = [0]
for i in range(N):
a.append(a[i]+A[i])
for i in range(M):
b.append(b[i]+B[i])
... | if __name__ == "__main__":
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans, j = 0, M
a = [0]
b = [0]
for i in range(N):
a.append(a[i]+A[i])
for i in range(M):
b.append(b[i]+B[i])
... | [["-", 0, 57, 75, 76, 8, 196, 0, 57, 0, 121], ["+", 0, 57, 75, 76, 8, 196, 0, 52, 0, 89]] | 5 | 174 |
NMK=input().split(" ")
N=int(NMK[0])
M=int(NMK[1])
K=int(NMK[2])
def list2int(List):
out=[]
for i in range(len(List)):
out.append(int(List[i]))
return out
A=list2int(input().split(" "))
B=list2int(input().split(" "))
a=[0]
b=[0]
for i in range(N):
a.append(a[i]+A[i])
for i in range(M):
b.... | NMK=input().split(" ")
N=int(NMK[0])
M=int(NMK[1])
K=int(NMK[2])
def list2int(List):
out=[]
for i in range(len(List)):
out.append(int(List[i]))
return out
A=list2int(input().split(" "))
B=list2int(input().split(" "))
a=[0]
b=[0]
for i in range(N):
a.append(a[i]+A[i])
for i in range(M):
b.... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 215 |
#include <iostream>
using namespace std;
typedef long long ll;
ll a[200005], b[200005];
ll min1;
int main() {
ll n, m, k;
cin >> n >> m >> k;
ll sum1 = 0, sum2 = 0;
for (ll i = 1; i <= n; i++) {
cin >> a[i];
}
for (ll i = 1; i <= n; i++) {
if (sum1 + a[i] <= k) {
sum1 += a[i];
sum2 = ... | #include <iostream>
using namespace std;
typedef long long ll;
ll a[200005], b[200005];
ll min1;
int main() {
ll n, m, k;
cin >> n >> m >> k;
ll sum1 = 0, sum2 = 0;
for (ll i = 1; i <= n; i++) {
cin >> a[i];
}
for (ll i = 1; i <= n; i++) {
if (sum1 + a[i] <= k) {
sum1 += a[i];
sum2 = ... | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45]] | 1 | 320 |
#include <bits/stdc++.h>
#define lld long long
#define pb push_back
#define mk make_pair
#define MAX (lld)1e18 + 7
#define lim (lld)1e9 + 7
#define MAX2 (lld)2e5 + 9
#define ff first
#define ss second
#define fastio \
ios::sync_with_stdio(0); ... | #include <bits/stdc++.h>
#define lld long long
#define pb push_back
#define mk make_pair
#define MAX (lld)1e18 + 7
#define lim (lld)1e9 + 7
#define MAX2 (lld)2e5 + 9
#define ff first
#define ss second
#define fastio \
ios::sync_with_stdio(0); ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 437 |
from itertools import accumulate
N, M, K = map(int, input().split())
*A, = map(int, input().split())
*B, = map(int, input().split())
cumsum_A, cumsum_B = [0] + list(accumulate(A)), [0] + list(accumulate(B))
ans = 0
j = M
for i in range(N+1):
if cumsum_A[i] > K: break
while cumsum_A[i] + cumsum_B[j] >= K: j -= ... | from itertools import accumulate
N, M, K = map(int, input().split())
*A, = map(int, input().split())
*B, = map(int, input().split())
cumsum_A, cumsum_B = [0] + list(accumulate(A)), [0] + list(accumulate(B))
ans = 0
j = M
for i in range(N+1):
if cumsum_A[i] > K: break
while cumsum_A[i] + cumsum_B[j] > K: j -= 1... | [["-", 0, 7, 8, 196, 0, 52, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 52, 15, 666, 667, 47]] | 5 | 136 |
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
S_A = [0] * (N + 1)
S_B = [0] * (M + 1)
for i in range(N):
S_A[i+1] = S_A[i] + A[i]
for i in range(M):
S_B[i+1] = S_B[i] + B[i]
ans = 0
a = 0
for i in range(M, -1, -1):
s = S_B[i]
while a<N:
if s + S_... | N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
S_A = [0] * (N + 1)
S_B = [0] * (M + 1)
for i in range(N):
S_A[i+1] = S_A[i] + A[i]
for i in range(M):
S_B[i+1] = S_B[i] + B[i]
ans = 0
a = 0
for i in range(M, -1, -1):
s = S_B[i]
if s>K:
continue
w... | [["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 102], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117]] | 5 | 185 |
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll n, m, k, ans = 0, w;
ll a[200004], b[200004];
int main() {
cin >> n >> m >> k;
rep(i, n) {
cin >> a[i];
if (i != 0)
a[i] += a[i - 1];
}
rep(i, m) {
c... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 1; i <= (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll n, m, k, ans = 0, w;
ll a[200004], b[200004];
int main() {
cin >> n >> m >> k;
rep(i, n) {
cin >> a[i];
if (i != 0)
a[i] += a[i - 1];
}
rep(i, m) {
... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 204 |
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと
def a_int(): return int(read())
def ints()... | import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと
def a_int(): return int(read())
def ints()... | [["-", 0, 57, 15, 679, 31, 666, 0, 657, 17, 33], ["-", 0, 57, 15, 679, 31, 666, 0, 657, 12, 612]] | 5 | 598 |
def main():
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a,b = [0],[0]
for i in range(N):
a.append(a[i] + A[i])
for i in range(N):
b.append(b[i] + B[i])
ans,j = 0,M
for i in range(N+1):
if a[i... | def main():
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a,b = [0],[0]
for i in range(N):
a.append(a[i] + A[i])
for i in range(M):
b.append(b[i] + B[i])
ans,j = 0,M
for i in range(N+1):
if a[i... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22]] | 5 | 178 |
import sys
import math
import itertools
import collections
def solve(N,M,K,A,B):
accumA = [0,A.pop(0)]
accumB = [0,B.pop(0)]
for a in A:
accumA.append(accumA[-1] + a)
for b in B:
accumB.append(accumB[-1] + b)
ans = 0
j = M
for i in range(N + 1):
if a[i] > K:
... |
import sys
import math
import itertools
import collections
def solve(N,M,K,A,B):
accumA = [0,A.pop(0)]
accumB = [0,B.pop(0)]
for a in A:
accumA.append(accumA[-1] + a)
for b in B:
accumB.append(accumB[-1] + b)
ans = 0
j = M
for i in range(N + 1):
if accumA[i] > K:
... | [["-", 8, 196, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 51, 22], ["-", 8, 196, 0, 52, 15, 666, 0, 206, 51, 22], ["+", 8, 196, 0, 52, 15, 666, 0, 206, 51, 22], ["-", 0, 52, 15, 666, 0, 657, 12, 206, 51, 22], ["+", 0, 52, 15, 666, 0, 657, 12, 206, 51, 22]] | 5 | 216 |
import sys
input = sys.stdin.readline
from itertools import accumulate
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = [0]+list(accumulate(A))
b = [0]+list(accumulate(B))
ans,j = 0,M
for i in range(N+1):
if i > K:
break
while b[j] > K - a[i]:
... | import sys
input = sys.stdin.readline
from itertools import accumulate
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = [0]+list(accumulate(A))
b = [0]+list(accumulate(B))
ans,j = 0,M
for i in range(N+1):
if a[i] > K:
break
while b[j] > K - a[i]... | [["+", 8, 196, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 70], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 73]] | 5 | 144 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
int n, m, k, ans = 0;
cin >> n >> m >> k;
vector<long long> a(n + 1, 0), b(n + 1, 0);
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] += a[i - 1];
}
for (int i = 1; i <= m; i++) {
cin >> b[i];
b... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
int n, m, k, ans = 0;
cin >> n >> m >> k;
vector<long long> a(n + 1, 0), b(m + 1, 0);
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] += a[i - 1];
}
for (int i = 1; i <= m; i++) {
cin >> b[i];
b... | [["-", 0, 43, 49, 50, 51, 4, 0, 16, 31, 22], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 31, 22]] | 1 | 228 |
import itertools
N,M,K = map(int,input().split())
A = [0]+list(map(int,input().split()))
B = [0]+list(map(int,input().split()))
SA = list(itertools.accumulate(A))
SB = list(itertools.accumulate(B))
ans = 0
j = len(B)-1
for i in range(len(SA)):
while(pt>=0):
if SA[i] + SB[j] <= K:
ans = max(ans,i... | import itertools
N,M,K = map(int,input().split())
A = [0]+list(map(int,input().split()))
B = [0]+list(map(int,input().split()))
SA = list(itertools.accumulate(A))
SB = list(itertools.accumulate(B))
ans = 0
j = len(B)-1
for i in range(len(SA)):
while(j>=0):
if SA[i] + SB[j] <= K:
ans = max(ans,i+... | [["-", 8, 196, 0, 52, 15, 23, 0, 666, 0, 22], ["+", 8, 196, 0, 52, 15, 23, 0, 666, 0, 22]] | 5 | 144 |
#include <bits/stdc++.h>
using namespace std;
#define N 200000
#define M 200000
int n, m, a[N], b[M];
__int64_t k;
int main(void) {
cin >> n >> m >> k;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int j = 0; j < m; j++) {
cin >> b[j];
}
int cntMax, cntA = 0, cntB = 0, judge = 0;
__int64_t... | #include <bits/stdc++.h>
using namespace std;
#define N 200000
#define M 200000
int n, m, a[N], b[M];
__int64_t k;
int main(void) {
cin >> n >> m >> k;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int j = 0; j < m; j++) {
cin >> b[j];
}
int cntMax, cntA = 0, cntB = 0, judge = 0;
__int64_t... | [["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22]] | 1 | 344 |
#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x, to) for (x = 0; x < (to); x++)
#define FORR(x, arr) for (auto &x : arr)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define ALL(a) (a.begin()), ... | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x, to) for (x = 0; x < (to); x++)
#define FORR(x, arr) for (auto &x : arr)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define ALL(a) (a.begin()), ... | [["+", 31, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 337 |
#include <iostream>
#include <string.h>
using namespace std;
#define DATASIZE 200000
int main(void) {
// Your code here!
int A[DATASIZE];
long Acum[DATASIZE];
int B[DATASIZE];
long Bcum[DATASIZE];
int N, M, K, Nlim, Mlim;
scanf("%d %d %d", &N, &M, &K);
Nlim = N - 1;
Mlim = M - 1;
for (int i = 0; ... | #include <iostream>
#include <string.h>
using namespace std;
#define DATASIZE 200000
int main(void) {
// Your code here!
int A[DATASIZE];
long Acum[DATASIZE];
int B[DATASIZE];
long Bcum[DATASIZE];
int N, M, K, Nlim, Mlim;
scanf("%d %d %d", &N, &M, &K);
Nlim = N - 1;
Mlim = M - 1;
for (int i = 0; ... | [["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]] | 1 | 401 |
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
t = 0
a = 0
b = 0
while True:
if not t + A[a] > K:
t += A[a]
a += 1
# print(a, t, A[a-1])
if a >= N:
break
else:
break
flug = True #全探索を行... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
t = 0
a = 0
b = 0
while True:
if not t + A[a] > K:
t += A[a]
a += 1
# print(a, t, A[a-1])
if a >= N:
break
else:
break
flug = True #全探索を行... | [["+", 64, 196, 0, 52, 8, 196, 0, 57, 0, 121], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 64, 196, 0, 52, 8, 196, 0, 57, 0, 102], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 216 |
from collections import deque
import bisect
N,M,K = list(map(int, input().split()))
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))
#if(sum(As) + sum(Bs) <= K):
# print(N + M)
# exit()
Asruisekiwa = []
Bsruisekiwa = []
Asruisekiwa.append(As[0])
Bsruisekiwa.append(Bs[0])
for i, j in ... | from collections import deque
import bisect
N,M,K = list(map(int, input().split()))
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))
#if(sum(As) + sum(Bs) <= K):
# print(N + M)
# exit()
Asruisekiwa = []
Bsruisekiwa = []
Asruisekiwa.append(As[0])
Bsruisekiwa.append(Bs[0])
for i, j in ... | [["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 657, 31, 657, 17, 33], ["+", 12, 652, 3, 4, 0, 657, 31, 657, 12, 612]] | 5 | 240 |
N, M, K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = -1
b = -1
total = 0
ans = 0
while a<len(A)-1:
if total+A[a+1] > K:
break
a+=1
total+=A[a]
while b<len(B)-1:
if total+B[b+1] > K:
break
b+=1
total+=B[b]
ans = a+b... | N, M, K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = -1
b = -1
total = 0
ans = 0
while a<len(A)-1:
if total+A[a+1] > K:
break
a+=1
total+=A[a]
while b<len(B)-1:
if total+B[b+1] > K:
break
b+=1
total+=B[b]
ans = a+b... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 203 |
N,M,K=list(map(int,input().split()))
A=list(map(int,input().split()))
B=list(map(int,input().split()))
from itertools import accumulate
from collections import deque
A=deque(list(accumulate(A)))
B=deque(list(accumulate(B)))
A.appendleft(0)
B.appendleft(0)
ans1=0
for i in range(N+1):
if A[i]>K:
ans1=i
... |
N,M,K=list(map(int,input().split()))
A=list(map(int,input().split()))
B=list(map(int,input().split()))
from itertools import accumulate
from collections import deque
A=deque(list(accumulate(A)))
B=deque(list(accumulate(B)))
A.appendleft(0)
B.appendleft(0)
ans1=0
for i in range(N+1):
if A[i]>K:
ans1=i-1
... | [["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 185 |
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
vector<long long> a, b;
main() {
int ans = 0;
int n, m;
long long k;
scanf("%d %d %lld", &n, &m, &k);
long long af = 0;
for (int i = 0; i < n; i++) {
long long ta;
scanf("%lld", &ta);
af += ta;... | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
vector<long long> a, b;
main() {
int ans = 0;
int n, m;
long long k;
scanf("%d %d %lld", &n, &m, &k);
long long af = 0;
for (int i = 0; i < n; i++) {
long long ta;
scanf("%lld", &ta);
af += ta;... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 310 |
n,m,k = map(int, input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
lim = n+m
i = 0
cnt_a = 0
loop = len(a)
while k > 0 and i < loop:
if k - a[i] >= 0:
k -= a[i]
i += 1
cnt_a += 1
else:
break
i = 0
cnt_b = 0
loop = len(b)
while k > ... | n,m,k = map(int, input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
lim = n+m
i = 0
cnt_a = 0
loop = len(a)
while k > 0 and i < loop:
if k - a[i] >= 0:
k -= a[i]
i += 1
cnt_a += 1
else:
break
i = 0
cnt_b = 0
loop = len(b)
while k > ... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["-", 8, 196, 0, 52, 15, 679, 31, 666, 0, 22], ["+", 8, 196, 0, 52, 15, 679, 31, 666, 0, 22]] | 5 | 246 |
#include <bits/stdc++.h>
using namespace std;
int main() {
#define int long long
int n, m, k, x, t, maxx = 0;
cin >> n >> m >> k;
int a[n + 1], b[m + 1];
a[0] = 0, b[0] = 0;
for (int i = 1; i <= n; i++) {
cin >> x;
a[i] = a[i - 1] + x;
}
for (int i = 1; i <= m; i++) {
cin >> x;
b[i] = b[i ... | #include <bits/stdc++.h>
using namespace std;
int main() {
#define int long long
int n, m, k, x, t, maxx = 0;
cin >> n >> m >> k;
int a[n + 1], b[m + 1];
a[0] = 0, b[0] = 0;
for (int i = 1; i <= n; i++) {
cin >> x;
a[i] = a[i - 1] + x;
}
for (int i = 1; i <= m; i++) {
cin >> x;
b[i] = b[i ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 64, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 64, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 357 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define REP(i, b) FOR(i, 0, b)
#define RFOR(i, a, b) for (ll i = a - 1; i >= b; i--)
#define RREP(i, a) RFOR(i, a, 0)
#define REPALL(i, x) for (ll i = 0; i < x.size(); i++)
#define RREPALL(i, x) for (ll i = x.size() - 1; i >= ... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define REP(i, b) FOR(i, 0, b)
#define RFOR(i, a, b) for (ll i = a - 1; i >= b; i--)
#define RREP(i, a) RFOR(i, a, 0)
#define REPALL(i, x) for (ll i = 0; i < x.size(); i++)
#define RREPALL(i, x) for (ll i = x.size() - 1; i >= ... | [["-", 0, 52, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 18], ["-", 15, 339, 51, 16, 12, 16, 12, 16, 17, 33], ["-", 15, 339, 51, 16, 12, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]] | 1 | 570 |
def count_books(books, limit):
num_books = len(books)
total_time = 0
for i, time in enumerate(books):
if total_time + time > limit:
num_books = i
break
total_time += time
return [num_books, total_time]
def main():
N, M, K = map(int, input().split())
A = l... | def count_books(books, limit):
num_books = len(books)
total_time = 0
for i, time in enumerate(books):
if total_time + time > limit:
num_books = i
break
total_time += time
return [num_books, total_time]
def main():
N, M, K = map(int, input().split())
A = l... | [["-", 0, 1, 0, 677, 12, 206, 206, 657, 17, 33], ["-", 0, 1, 0, 677, 12, 206, 206, 657, 12, 612], ["-", 8, 196, 0, 52, 15, 679, 12, 666, 667, 18], ["+", 8, 196, 0, 52, 15, 679, 12, 666, 667, 19]] | 5 | 229 |
#include <bits/stdc++.h>
using namespace std;
#define hell 1000000007
#define PI acos(-1.0)
#define S second
#define F first
#define pb push_back
#define endl '\n'
#define lli long long int
#define li long int
#define ld long double
#define all(v) v.begin(), v.end()
#define run(j, n) for (auto ii = j; ii != n; ii++)
... | #include <bits/stdc++.h>
using namespace std;
#define hell 1000000007
#define PI acos(-1.0)
#define S second
#define F first
#define pb push_back
#define endl '\n'
#define lli long long int
#define li long int
#define ld long double
#define all(v) v.begin(), v.end()
#define run(j, n) for (auto ii = j; ii != n; ii++)
... | [["-", 0, 7, 8, 9, 0, 57, 64, 116, 0, 117], ["+", 0, 7, 8, 9, 0, 57, 64, 93, 0, 94], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 31, 22], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33]] | 1 | 363 |
#include <bits/stdc++.h>
#define pp push_back
#define pf push_front
#define mp make_pair
#define fs first
#define sc second
#define sf scanf
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ii;
const int N = (int)1e5;
const int INF = (int)1e9 + 7;
int main(int argc,... | #include <bits/stdc++.h>
#define pp push_back
#define pf push_front
#define mp make_pair
#define fs first
#define sc second
#define sf scanf
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ii;
const int N = (int)1e5;
const int INF = (int)1e9 + 7;
int main(int argc,... | [["-", 15, 339, 51, 16, 31, 16, 12, 69, 28, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 69, 28, 22]] | 1 | 353 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 1e9;
long long n, l, r, t, m, k, res;
int solve(vector<int> &a, int n, vector<int> b, int m) {
vector<long long> t(n + 1, 0), r(m + 1, 0);
for (int i = 1; i <= n; ++i) {
t[i] = t[i - 1] + a[i];
}
for (int i = 1; i <= m; ++i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 1e9;
long long n, l, r, t, m, k, res;
int solve(vector<int> &a, int n, vector<int> b, int m) {
vector<long long> t(n + 1, 0), r(m + 1, 0);
for (int i = 1; i <= n; ++i) {
t[i] = t[i - 1] + a[i];
}
for (int i = 1; i <= m; ++i... | [["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 407 |
#include <bits/stdc++.h>
using namespace std;
int A[200002], B[200002];
int main() {
int t = 1;
// cin >> t;
while (t--) {
int n, m, ms;
scanf("%d%d%d", &n, &m, &ms);
for (int A_i = 0; A_i < n; A_i++) {
scanf("%d", &A[A_i]);
}
for (int B_i = 0; B_i < m; B_i++) {
scanf("%d", ... | #include <bits/stdc++.h>
using namespace std;
int A[200002], B[200002];
int main() {
int t = 1;
// cin >> t;
while (t--) {
int n, m, ms;
scanf("%d%d%d", &n, &m, &ms);
for (int A_i = 0; A_i < n; A_i++) {
scanf("%d", &A[A_i]);
}
for (int B_i = 0; B_i < m; B_i++) {
scanf("%d", ... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]] | 1 | 231 |
#include <bits/stdc++.h>
using namespace std;
int A[200002], B[200002];
int main() {
int t = 1;
// cin >> t;
while (t--) {
int n, m, ms;
scanf("%d%d%d", &n, &m, &ms);
for (int A_i = 0; A_i < n; A_i++) {
scanf("%d", &A[A_i]);
}
for (int B_i = 0; B_i < m; B_i++) {
scanf("%d", ... | #include <bits/stdc++.h>
using namespace std;
int A[200002], B[200002];
int main() {
int t = 1;
// cin >> t;
while (t--) {
int n, m, ms;
scanf("%d%d%d", &n, &m, &ms);
for (int A_i = 0; A_i < n; A_i++) {
scanf("%d", &A[A_i]);
}
for (int B_i = 0; B_i < m; B_i++) {
scanf("%d", ... | [["-", 0, 52, 15, 339, 51, 16, 12, 16, 17, 20], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 47], ["-", 0, 11, 12, 69, 341, 342, 0, 27, 28, 22], ["+", 0, 11, 12, 69, 341, 342, 0, 27, 28, 22]] | 1 | 235 |
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A_time = [0]
time = 0
for i in range(N):
time += A[i]
A_time.append(time)
B_time = [0]
time = 0
for i in range(M):
time += B[i]
B_time.append(time)
def binarySearch(key):
left = -1
right ... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A_time = [0]
time = 0
for i in range(N):
time += A[i]
A_time.append(time)
B_time = [0]
time = 0
for i in range(M):
time += B[i]
B_time.append(time)
def binarySearch(key):
left = -1
right ... | [["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 102], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 199 |
def main():
import bisect
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
A_ac = [0]
B_ac = [0]
a_ac = 0
b_ac = 0
for a in A:
a_ac+=a
A_ac.append(a_ac)
for b in B:
b_ac+=b
B_ac.append(b_ac)
... | def main():
import bisect
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
A_ac = [0]
B_ac = [0]
a_ac = 0
b_ac = 0
for a in A:
a_ac+=a
A_ac.append(a_ac)
for b in B:
b_ac+=b
B_ac.append(b_ac)
... | [["-", 0, 14, 8, 196, 0, 52, 15, 666, 667, 47], ["+", 0, 14, 8, 196, 0, 52, 15, 666, 667, 20]] | 5 | 169 |
#include <bits/stdc++.h>
using namespace std;
long long abc(int n) {
long long a = n;
a *= n + 1;
a >>= 1;
return a;
}
long long arr[10000001];
long long arr2[10000001];
int main() {
long long n, m, k;
int count = 0;
cin >> n >> m >> k;
for (int i = 1; i <= n; i++) {
cin >> arr[i];
arr[i] += ar... | #include <bits/stdc++.h>
using namespace std;
long long abc(int n) {
long long a = n;
a *= n + 1;
a >>= 1;
return a;
}
long long arr[10000001];
long long arr2[10000001];
int main() {
long long n, m, k;
int count = 0;
cin >> n >> m >> k;
for (int i = 1; i <= n; i++) {
cin >> arr[i];
arr[i] += ar... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 228 |
import bisect
n, m, k = map(int, input().split())
aList = list(map(int, input().split()))
bList = list(map(int, input().split()))
cList = [0]
dList = [0]
for a in aList:
t = a + cList[-1]
if t <= k:
cList.append(a + cList[-1])
else:
break
for b in bList:
t = b + dList[-1]
if t <= k:... | import bisect
n, m, k = map(int, input().split())
aList = list(map(int, input().split()))
bList = list(map(int, input().split()))
cList = [0]
dList = [0]
for a in aList:
t = a + cList[-1]
if t <= k:
cList.append(a + cList[-1])
else:
break
for b in bList:
t = b + dList[-1]
if t <= k:... | [["-", 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, 21], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 243 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
int a[200010], b[200010], sa[200010], sb[200010];
signed main() {
int n, m, k, i, maxv = 0;
cin >> n >> m >> k;
for (i = 1; i <= n; i++) {
cin >> a[i];
sa[i] = sa[i - 1] + a[i];
}
for (i = 1; i <= m; i++) {
cin >> b[i];
sb[i] ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
int a[200010], b[200010], sa[200010], sb[200010];
signed main() {
int n, m, k, i, maxv = 0;
cin >> n >> m >> k;
for (i = 1; i <= n; i++) {
cin >> a[i];
sa[i] = sa[i - 1] + a[i];
}
for (i = 1; i <= m; i++) {
cin >> b[i];
sb[i] ... | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]] | 1 | 208 |
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<long long int> vta = {0}, vtb = {0};
long long int ta = 0, tb = 0;
int n, m, k;
int ans = -1;
cin >> n >> m >> k;
rep(i... | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<long long int> vta = {0}, vtb = {0};
long long int ta = 0, tb = 0;
int n, m, k;
int ans = -1;
cin >> n >> m >> k;
rep(i... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 15, 339, 51, 16, 12, 16, 12, 16, 12, 13], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 12, 13]] | 1 | 224 |
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = 0
# もしすべてaから選んだ場合
time = k
aOnly = 0
for i in range(len(a)):
time -= a[i]
if time < 0:
time += a[i]
i -= 1
break
aOnly += 1
a_idx = i
b_idx = -1
for i in range(len(b)):... | n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = 0
# もしすべてaから選んだ場合
time = k
aOnly = 0
for i in range(len(a)):
time -= a[i]
if time < 0:
time += a[i]
i -= 1
break
aOnly += 1
a_idx = i
b_idx = -1
for i in range(len(b)):... | [["-", 8, 196, 0, 1, 0, 677, 12, 206, 206, 22], ["+", 8, 196, 0, 1, 0, 677, 12, 206, 206, 22], ["-", 64, 196, 0, 1, 0, 677, 12, 206, 206, 22], ["+", 64, 196, 0, 1, 0, 677, 12, 206, 206, 22], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22]] | 5 | 224 |
#include <bits/stdc++.h>
using namespace std;
int n, m, k, a[200005], b[200005], ans, maxans, lo, hi, mid, target;
long long sum_a[200005], sum_b[200005];
int main() {
scanf("%d%d%d", &n, &m, &k);
for (int i = 1; i <= n; ++i) {
scanf("%d", &a[i]);
sum_a[i] = sum_a[i - 1] + a[i];
}
for (int i = 1; i <=... | #include <bits/stdc++.h>
using namespace std;
int n, m, k, a[200005], b[200005], ans, maxans, lo, hi, mid, target;
long long sum_a[200005], sum_b[200005];
int main() {
scanf("%d%d%d", &n, &m, &k);
for (int i = 1; i <= n; ++i) {
scanf("%d", &a[i]);
sum_a[i] = sum_a[i - 1] + a[i];
}
for (int i = 1; i <=... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 301 |
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, b, a) for (int i = b; i >= a; i--)
#define fori(a) for (auto i : a)
#define all(a) begin(a), end(a)
#define set(a, b) memset(a, b, sizeof(a))
#define sz(a) a.size()
#define pi 3.14159
#define ll long long
#define ull unsigned long... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, b, a) for (int i = b; i >= a; i--)
#define fori(a) for (auto i : a)
#define all(a) begin(a), end(a)
#define set(a, b) memset(a, b, sizeof(a))
#define sz(a) a.size()
#define pi 3.14159
#define ll long long
#define ull unsigned long... | [["-", 0, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 471 |
from itertools import accumulate
N, M, K = map(int, input().split())
As = [0] + list(map(int, input().split()))
Bs = [0] + list(map(int, input().split()))
csum_A = list(accumulate(As))
csum_B = list(accumulate(Bs))
ok = 0
ng = N + M + 2
while ng - ok > 1:
mid = (ng + ok) // 2
min_time = 10 ** 9 + 10
for t ... | from itertools import accumulate
N, M, K = map(int, input().split())
As = [0] + list(map(int, input().split()))
Bs = [0] + list(map(int, input().split()))
csum_A = list(accumulate(As))
csum_B = list(accumulate(Bs))
ok = 0
ng = N + M + 2
while ng - ok > 1:
mid = (ng + ok) // 2
min_time = 10 ** 9 + 10
for t ... | [["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 174 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n, m, t, a[200005], b[200005];
signed main() {
cin >> n >> m >> t;
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] += a[i - 1];
}
for (int i = 1; i <= m; i++) {
cin >> b[i];
b[i] += b[i - 1];
}
int qwq = 0, sum = 0;
f... | #include <bits/stdc++.h>
#define int long long
using namespace std;
int n, m, t, a[200005], b[200005];
signed main() {
cin >> n >> m >> t;
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] += a[i - 1];
}
for (int i = 1; i <= m; i++) {
cin >> b[i];
b[i] += b[i - 1];
}
int qwq = 0, sum = 0;
f... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 249 |
#include <bits/stdc++.h>
#define N 1000011
#define MAX(x, y) (x > y ? x : y)
using namespace std;
long long a[N], b[N], k, n, m, q, dap;
long long f1(long long x, long long y, long long sum) {
long long mid = (x + y) / 2;
if (x == y)
return x;
if (b[mid] + sum > k)
return f1(x, mid, sum);
else
re... | #include <bits/stdc++.h>
#define N 1000011
#define MAX(x, y) (x > y ? x : y)
using namespace std;
long long a[N], b[N], k, n, m, q, dap;
long long f1(long long x, long long y, long long sum) {
long long mid = (x + y) / 2;
if (x == y)
return x;
if (b[mid] + sum > k)
return f1(x, mid, sum);
else
re... | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]] | 1 | 319 |
import itertools
import bisect
N, M, K = map(int,input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A_ = list(itertools.accumulate(A))
B_ = list(itertools.accumulate(B))
l = len(A_)
ans = max(ans, bisect.bisect_right(B_, K))
for idx, i in enumerate(A_):
if i <= K:
... | import itertools
import bisect
N, M, K = map(int,input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A_ = list(itertools.accumulate(A))
B_ = list(itertools.accumulate(B))
ans = 0
l = len(A_)
ans = max(ans, bisect.bisect_right(B_, K))
for idx, i in enumerate(A_):
if i <= K:
... | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 139 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n, m, k, ans;
int a[200001], b[200001];
int find(int x) {
int l = 1, r = m, mid, tnt = 0;
while (l <= r) {
mid = (l + r) >> 1;
if (b[mid] <= x)
tnt = mid, l = mid + 1;
else
r = mid - 1;
}
return tnt;
}
signed main() ... | #include <bits/stdc++.h>
#define int long long
using namespace std;
int n, m, k, ans;
int a[200001], b[200001];
int find(int x) {
int l = 1, r = m, mid, tnt = 0;
while (l <= r) {
mid = (l + r) >> 1;
if (b[mid] <= x)
tnt = mid, l = mid + 1;
else
r = mid - 1;
}
return tnt;
}
signed main() ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 253 |
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
tmp = []
s = 0
for i in a:
if s + i <= k:
tmp.append(i)
s += i
else:
break
a = tmp
tmp = []
s = 0
for i in b:
if s + i <= k:
tmp.append(i)
s += i
else:
... | n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
tmp = []
s = 0
for i in a:
if s + i <= k:
tmp.append(i)
s += i
else:
break
a = tmp
tmp = []
s = 0
for i in b:
if s + i <= k:
tmp.append(i)
s += i
else:
... | [["-", 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 | 214 |
M,N,K = [int(hoge) for hoge in input().split()]
A = [int(hoge) for hoge in input().split()]
B = [int(hoge) for hoge in input().split()]
S = 0
Abook = 0
Bbook = 0
curbook = 0
for a in A:
if S + a <= K:
Abook += 1
curbook += 1
S += a
nextB = 0
for n,b in enumerate(B):
if S + b <= K:
... | M,N,K = [int(hoge) for hoge in input().split()]
A = [int(hoge) for hoge in input().split()]
B = [int(hoge) for hoge in input().split()]
S = 0
Abook = 0
Bbook = 0
curbook = 0
for a in A:
if S + a <= K:
Abook += 1
curbook += 1
S += a
else:
break
nextB = 0
for n,b in enumerate(B):
... | [["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["+", 0, 57, 75, 76, 8, 196, 0, 93, 0, 94]] | 5 | 235 |
n, m, k = gets.split.map(&:to_i)
a_array = gets.split.map(&:to_i)
b_array = gets.split.map(&:to_i)
num = 0
total_time = 0
a_index = 0
max_num = 0
n.times do |i|
break if total_time + a_array[i] > k
total_time = total_time + a_array[i]
num = num + 1
a_index = i
end
max_num = num
m.times do |i|
w... | n, m, k = gets.split.map(&:to_i)
a_array = gets.split.map(&:to_i)
b_array = gets.split.map(&:to_i)
num = 0
total_time = 0
a_index = -1
max_num = 0
n.times do |i|
break if total_time + a_array[i] > k
total_time = total_time + a_array[i]
num = num + 1
a_index = i
end
max_num = num
m.times do |i|
... | [["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["+", 36, 36, 0, 493, 0, 662, 12, 748, 17, 33], ["+", 36, 36, 0, 493, 0, 662, 12, 748, 439, 612], ["-", 0, 89, 8, 170, 0, 751, 15, 738, 12, 612], ["+", 8, 170, 0, 751, 15, 738, 12, 748, 17, 33], ["+", 8, 170, 0, 751, 15, 738, 12, 748, 439, 612]] | 4 | 163 |
// Problem : C - Tsundoku
// Contest : AtCoder - AtCoder Beginner Contest 172
// URL : https://atcoder.jp/contests/abc172/tasks/abc172_c?lang=en
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
#define DEBUG fprintf(stderr, "Passi... | // Problem : C - Tsundoku
// Contest : AtCoder - AtCoder Beginner Contest 172
// URL : https://atcoder.jp/contests/abc172/tasks/abc172_c?lang=en
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
#define DEBUG fprintf(stderr, "Passi... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 481 |
using namespace std;
#include <bits/stdc++.h>
#define fdto(i, r, l) for (int i = r; i >= l; --i)
#define fto(i, l, r) for (int i = l; i <= r; ++i)
#define forit(it, type, var) \
for (type::iterator it = var.begin(); it != var.end(); it++)
#define ii pair<int, int>
#de... | using namespace std;
#include <bits/stdc++.h>
#define fdto(i, r, l) for (int i = r; i >= l; --i)
#define fto(i, l, r) for (int i = l; i <= r; ++i)
#define forit(it, type, var) \
for (type::iterator it = var.begin(); it != var.end(); it++)
#define ii pair<int, int>
#de... | [["-", 75, 76, 0, 9, 0, 1, 0, 11, 12, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 22]] | 1 | 374 |
import bisect
N, M, K = map(int, input().split())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
WA = [0] * (N + 1)
WB = [0] * (M + 1)
for i in range(N):
WA[i + 1] = WA[i] + A[i]
for j in range(M):
WB[j + 1] = WB[j] + B[j]
ma = 0
for i in range(1, N + 1):
if WA[i] > K:
... | import bisect
N, M, K = map(int, input().split())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
WA = [0] * (N + 1)
WB = [0] * (M + 1)
for i in range(N):
WA[i + 1] = WA[i] + A[i]
for j in range(M):
WB[j + 1] = WB[j] + B[j]
ma = 0
last = False
for i in range(0, N + 1):
if WA[i... | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 147], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 184 |
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
s_a = [0]*(n+1)
s_b = [0]*(m+1)
for i in range(1,n+1):
s_a[i] = s_a[i-1] + a[i-1]
for i in range(1,m+1):
s_b[i] = s_b[i-1] + b[i-1]
import bisect
Sa = bisect.bisect_right(s_a,k) -1
Sb = bisect.bisect_right(s_b... | n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
s_a = [0]*(n+1)
s_b = [0]*(m+1)
for i in range(1,n+1):
s_a[i] = s_a[i-1] + a[i-1]
for i in range(1,m+1):
s_b[i] = s_b[i-1] + b[i-1]
import bisect
Sa = bisect.bisect_right(s_a,k) -1
Sb = bisect.bisect_right(s_b... | [["+", 0, 656, 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, 21], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 218 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
#define LIMIT 1000000007 // 10^9+7
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(v) (v).begin(), (v).end()
namespace /* debug */ {
#define DEBUG(...) ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
#define LIMIT 1000000007 // 10^9+7
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(v) (v).begin(), (v).end()
namespace /* debug */ {
#define DEBUG(...) ... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 647 |
def search(tim, d)
i = 0
j = d.size - 1
if d[0] > tim
return 0
end
while true
if tim < d[i]
return i
end
if i >= j
if i > d.size - 1
return i
end
if tim >= d[i]
return i + 1
... |
def search(tim, d)
i = 0
j = d.size - 1
if d[0] > tim
return 0
end
while true
if tim < d[i]
return i
end
if i >= j
if i > d.size - 1
return i
end
if tim >= d[i]
return i + 1
... | [["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["+", 0, 493, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 493, 0, 662, 12, 652, 3, 4, 0, 743], ["+", 0, 493, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 0, 493, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 493, 0, 662, 12, 652, 3, 4, 0, 2... | 4 | 289 |
// AUTHOR: RAVAN_2070
// PUNE INSTITUTE OF COMPUTER TECHNOLOGY
/*
I ♥ CLARICE STARLING...
EXPLAINATION BELOW->
*/
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<pair<ll, ll>> vii;
typ... | // AUTHOR: RAVAN_2070
// PUNE INSTITUTE OF COMPUTER TECHNOLOGY
/*
I ♥ CLARICE STARLING...
EXPLAINATION BELOW->
*/
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<pair<ll, ll>> vii;
typ... | [["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 12, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["-", 12, 23, 0, 16, 12, 2, 63, 118, 28, 22], ["+", 12, 23, 0, 16, 12, 2, 63, 118, 28, 22]] | 1 | 497 |
#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... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 587 |
#define DEBUG 1
#include <bits/stdc++.h>
using namespace std;
typedef char s8;
typedef unsigned char u8;
typedef short s16;
typedef unsigned short u16;
typedef int s32;
typedef unsigned int u32;
typedef long int s64;
typedef unsigned long int u64;
typedef float f32;
typedef double f64;
#define rep(_i, _n) for (int _i =... | #define DEBUG 1
#include <bits/stdc++.h>
using namespace std;
typedef char s8;
typedef unsigned char u8;
typedef short s16;
typedef unsigned short u16;
typedef int s32;
typedef unsigned int u32;
typedef long int s64;
typedef unsigned long int u64;
typedef float f32;
typedef double f64;
#define rep(_i, _n) for (int _i =... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["-", 0, 11, 12, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 11, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 503 |
#include <iostream>
#include <stack>
using namespace std;
int main() {
int n, m, k;
cin >> n >> m >> k;
int a[n], b[m];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < m; i++) {
cin >> b[i];
}
int restTime = k;
int cnt = 0, maxCnt = 0;
stack<int> stA, stB;
for (int i = 0; ... | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n, m, k;
cin >> n >> m >> k;
int a[n], b[m];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < m; i++) {
cin >> b[i];
}
int restTime = k;
int cnt = 0, maxCnt = 0;
stack<int> stA, stB;
for (int i = 0; ... | [["-", 75, 76, 0, 9, 0, 1, 0, 27, 17, 29], ["+", 75, 76, 0, 9, 0, 1, 0, 27, 17, 68]] | 1 | 288 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define inf ll(1e9)
#define mod 1000000007
#define mod1 998244353
#define mod2 999983
ll power(ll a, ll n, ll m);
ll power(ll a, ll n, ll m) {
if (n == 0)
return 1;
ll x = power(a, n / 2, m);
if (n % 2 != 0)
return (((a * x) % m) * (x... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define inf ll(1e9)
#define mod 1000000007
#define mod1 998244353
#define mod2 999983
ll power(ll a, ll n, ll m);
ll power(ll a, ll n, ll m) {
if (n == 0)
return 1;
ll x = power(a, n / 2, m);
if (n % 2 != 0)
return (((a * x) % m) * (x... | [["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 1 | 582 |
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
#define mem(x, b) memset(x, b, sizeof(x))
#define mp(a, b) make_pair(a, b)
#define debug(a) cout << a << endl
#define maxn... | #include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
#define mem(x, b) memset(x, b, sizeof(x))
#define mp(a, b) make_pair(a, b)
#define debug(a) cout << a << endl
#define maxn... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 450 |
// To debug : g++ -g file.cpp -o code
// to flush output : fflush(stdout) or cout.flush()
// cout<<setprecision(p)<<fixed<<var
// use 1LL<<i to for 64 bit shifting , (ll)2 because by default 2 is ll
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, a, n) for (i = a; i < n; ++i)
#define... | // To debug : g++ -g file.cpp -o code
// to flush output : fflush(stdout) or cout.flush()
// cout<<setprecision(p)<<fixed<<var
// use 1LL<<i to for 64 bit shifting , (ll)2 because by default 2 is ll
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, a, n) for (i = a; i < n; ++i)
#define... | [["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13], ["+", 8, 9, 0, 9, 0, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 9, 0, 57, 64, 9, 0, 46]] | 1 | 305 |
from collections import *
import sys
from bisect import *
input=sys.stdin.readline
from math import *
t=1
while(t):
t-=1
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
prea=[a[0]]
preb=[b[0]]
for i in range(1,n):
prea.append(prea[-1]+... | from collections import *
import sys
from bisect import *
input=sys.stdin.readline
from math import *
t=1
while(t):
t-=1
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
prea=[a[0]]
preb=[b[0]]
for i in range(1,n):
prea.append(prea[-1]+... | [["-", 0, 652, 3, 4, 0, 657, 12, 206, 206, 22], ["+", 0, 652, 3, 4, 0, 657, 12, 206, 206, 22]] | 5 | 255 |
#include <bits/stdc++.h>
int ri() {
int n;
scanf("%d", &n);
return n;
}
int main() {
int n = ri(), m = ri();
int k = ri();
int64_t sum0[n + 1];
sum0[0] = 0;
for (int i = 0; i < n; i++)
sum0[i + 1] = sum0[i] + ri();
int64_t sum1[m + 1];
sum1[0] = 0;
for (int i = 0; i < m; i++)
sum1[i + 1... | #include <bits/stdc++.h>
int ri() {
int n;
scanf("%d", &n);
return n;
}
int main() {
int n = ri(), m = ri();
int k = ri();
int64_t sum0[n + 1];
sum0[0] = 0;
for (int i = 0; i < n; i++)
sum0[i + 1] = sum0[i] + ri();
int64_t sum1[m + 1];
sum1[0] = 0;
for (int i = 0; i < m; i++)
sum1[i + 1... | [["-", 0, 52, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 17, 19]] | 1 | 219 |
#include <bits/stdc++.h>
using namespace std;
signed main() {
int n, m, high, low, mid, ans = 0;
long long k, a[200001], b[200001];
a[0] = b[0] = 0;
cin >> n >> m >> k;
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] += a[i - 1];
}
for (int i = 1; i <= n; i++) {
cin >> b[i];
b[i] += b[i... | #include <bits/stdc++.h>
using namespace std;
signed main() {
int n, m, high, low, mid, ans = 0;
long long k, a[200001], b[200001];
a[0] = b[0] = 0;
cin >> n >> m >> k;
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] += a[i - 1];
}
for (int i = 1; i <= m; i++) {
cin >> b[i];
b[i] += b[i... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 247 |
# C
import itertools
import bisect
n, m, k = map(int, input().split())
a_l = [int(x) for x in input().split()]
b_l = [int(x) for x in input().split()]
cumsuma_l = list(itertools.accumulate(a_l))
cumsumb_l = list(itertools.accumulate(b_l))
_idx = bisect.bisect_left(cumsumb_l, k)
if _idx == m or cumsumb_l[_idx] != _... | # C
import itertools
import bisect
n, m, k = map(int, input().split())
a_l = [int(x) for x in input().split()]
b_l = [int(x) for x in input().split()]
cumsuma_l = list(itertools.accumulate(a_l))
cumsumb_l = list(itertools.accumulate(b_l))
_idx = bisect.bisect_left(cumsumb_l, k)
if _idx == m or cumsumb_l[_idx] != k... | [["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22]] | 5 | 177 |
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
from itertools import accumulate
a = list(accumulate(a))
b = list(accumulate(b))
from collections import deque
u = deque([0])
a.append(0)
import bisect
for i in range(n+1):
if k-a[i]>=0:
index = bisect.... | n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
from itertools import accumulate
a = list(accumulate(a))
b = list(accumulate(b))
from collections import deque
u = deque([0])
a.insert(0,0)
import bisect
for i in range(n+1):
if k-a[i]>=0:
index = bisec... | [["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22]] | 5 | 147 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
int main() {
long N, M, K;
std::cin >> N >> M >> K;
long A[200000] = {};
long B[200000] = {};
for (long i = 0; i < N; i++) {
std::cin >> A[i];
}
for (lo... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
int main() {
long N, M, K;
std::cin >> N >> M >> K;
long A[200000] = {};
long B[200000] = {};
for (long i = 0; i < N; i++) {
std::cin >> A[i];
}
for (lo... | [["+", 12, 16, 12, 69, 341, 342, 0, 16, 17, 33], ["+", 12, 16, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 347 |
import sys
input = sys.stdin.readline
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
ans0 = 0
ans1 = 0
for i in range(n):
if A[i] + ans0 <= k:
ans0 += A[i]
ans1 += 1
else:
break
ind = ans1-1
jnd = 0
for i in range(m):
... | import sys
input = sys.stdin.readline
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
ans0 = 0
ans1 = 0
for i in range(n):
if A[i] + ans0 <= k:
ans0 += A[i]
ans1 += 1
else:
break
ind = ans1-1
jnd = 0
for i in range(m):
... | [["-", 0, 7, 8, 196, 0, 1, 0, 677, 12, 22], ["+", 8, 196, 0, 1, 0, 677, 12, 206, 51, 22], ["+", 8, 196, 0, 1, 0, 677, 12, 206, 0, 70], ["+", 8, 196, 0, 1, 0, 677, 12, 206, 206, 22], ["+", 8, 196, 0, 1, 0, 677, 12, 206, 0, 73]] | 5 | 203 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const int inf = 1e9;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define per(i, b, a) for (int i = a - 1; i >= b; i--)
using Graph = vector<vector<int>>;
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const int inf = 1e9;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define per(i, b, a) for (int i = a - 1; i >= b; i--)
using Graph = vector<vector<int>>;
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0... | [["-", 0, 9, 0, 57, 64, 1, 0, 11, 17, 107], ["-", 0, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 0, 9, 0, 57, 64, 1, 0, 27, 17, 68]] | 1 | 371 |
import sys
import os
import itertools
import numpy as np
from collections import deque
def main():
if os.getenv("ENV")=='LOCAL':
sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')
N,M,K=map(int, input().split())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
... | import sys
import os
import itertools
import numpy as np
from collections import deque
def main():
if os.getenv("ENV")=='LOCAL':
sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')
N,M,K=map(int, input().split())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
... | [["-", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 664, 17, 33], ["+", 8, 196, 0, 1, 0, 662, 12, 664, 28, 612]] | 5 | 286 |
/*#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/rational.hpp>
*/
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
using ll = long long;
using ld = long double;
#define rep2(i, s, n) fo... | /*#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/rational.hpp>
*/
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
using ll = long long;
using ld = long double;
#define rep2(i, s, n) fo... | [["-", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 386 |
#include <bits/stdc++.h>
// 2의 제곱수 판정
#define POW2(X) (X) == ((X) & (-(X)))
// 기본설정
typedef long long ll;
using namespace std;
int dirx[4] = {1, 0, -1, 0};
int diry[4] = {0, 1, 0, -1};
// 전역변수
ll n, m, k, ans = 0;
vector<ll> a, b;
int main(void) {
cin.tie(NULL);
ios_base::sync_with_stdio(false);
cin >> n >> m... | #include <bits/stdc++.h>
// 2의 제곱수 판정
#define POW2(X) (X) == ((X) & (-(X)))
// 기본설정
typedef long long ll;
using namespace std;
int dirx[4] = {1, 0, -1, 0};
int diry[4] = {0, 1, 0, -1};
// 전역변수
ll n, m, k, ans = 0;
vector<ll> a, b;
int main(void) {
cin.tie(NULL);
ios_base::sync_with_stdio(false);
cin >> n >> m... | [["-", 0, 52, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 52, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 319 |
import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)
def main():
n,m,k = map(int,ipt().split())... | import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)
def main():
n,m,k = map(int,ipt().split())... | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22], ["+", 0, 57, 15, 666, 0, 657, 12, 206, 51, 22], ["+", 0, 57, 15, 666, 0, 657, 12, 206, 0, 70], ["+", 0, 57, 15, 666, 0, 657, 12, 206, 206, 22], ["+", 0, 57, 15, 666, 0, 657, 12, 206, 0, 73]] | 5 | 260 |
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
time = 0
ans_a = 0
ans_b = 0
for i in range(N):
if time + A[i] > K:
break
else:
time += A[i]
ans_a += 1
for i in range(M):
if time + B[i] > K:
break
else:
t... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
time = 0
ans_a = 0
ans_b = 0
for i in range(N):
if time + A[i] > K:
break
else:
time += A[i]
ans_a += 1
for i in range(M):
if time + B[i] > K:
break
else:
t... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 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 | 198 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
namespace IO {
template <typename T> inline void read(T &x) {
int f = 1;
x = 0;
char c = getchar();
for (; !isdigit(c); c = getchar())
if (c == '-')
f = -1;
for (; isdigit(c); ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
namespace IO {
template <typename T> inline void read(T &x) {
int f = 1;
x = 0;
char c = getchar();
for (; !isdigit(c); c = getchar())
if (c == '-')
f = -1;
for (; isdigit(c); ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98]] | 1 | 528 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 2e5 + 5;
int n, m, k, a[N], b[N];
main() {
cin >> n >> m >> k;
for (int i = 1; i <= n; i++) {
int x;
cin >> x;
a[i] = a[i - 1] + x;
}
for (int i = 1; i <= m; i++) {
int x;
cin >> x;
b[i] = b[i - 1] + x;
}... | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 2e5 + 5;
int n, m, k, a[N], b[N];
main() {
cin >> n >> m >> k;
for (int i = 1; i <= n; i++) {
int x;
cin >> x;
a[i] = a[i - 1] + x;
}
for (int i = 1; i <= m; i++) {
int x;
cin >> x;
b[i] = b[i - 1] + x;
}... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 195 |
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
n... | import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
n... | [["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22]] | 5 | 286 |
// Never stop trying
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_updat... | // Never stop trying
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_updat... | [["+", 0, 43, 49, 50, 51, 16, 12, 74, 0, 24], ["+", 49, 50, 51, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 12, 74, 0, 25], ["-", 0, 43, 49, 50, 51, 16, 12, 69, 28, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 69, 28, 22]] | 1 | 493 |
#include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;
const int MAXN = 2e5 + 7;
ll n, m, k, ans, a[MAXN], b[MAXN];
int main() {
cin >> n >> m >> k;
for (int i = 1; i <= n; i++)
cin >> a[i], a[i] += a[i - 1];
for (int i = 1; i <= m; i++)
cin >> b[i], b[i] += b[i - 1];
/*
c... | #include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;
const int MAXN = 2e5 + 7;
ll n, m, k, ans, a[MAXN], b[MAXN];
int main() {
cin >> n >> m >> k;
for (int i = 1; i <= n; i++)
cin >> a[i], a[i] += a[i - 1];
for (int i = 1; i <= m; i++)
cin >> b[i], b[i] += b[i - 1];
/*
c... | [["+", 64, 9, 0, 52, 15, 339, 51, 16, 17, 106], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 216 |
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bise... | import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bise... | [["-", 0, 57, 75, 665, 15, 666, 0, 206, 51, 22], ["+", 0, 57, 75, 665, 15, 666, 0, 206, 51, 22]] | 5 | 400 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#in... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#in... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 437 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
//マクロ
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define REPS(i, n) for (int i = 1; i <= (int)(n); ++i)... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
//マクロ
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define REPS(i, n) for (int i = 1; i <= (int)(n); ++i)... | [["-", 8, 9, 0, 9, 0, 57, 64, 93, 0, 94], ["+", 8, 9, 0, 9, 0, 57, 64, 116, 0, 117]] | 1 | 482 |
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
from bisect import bisect_right
dpa = [0]
for a in A:
dpa.append(dpa[-1]+a)
dpb = [0]
for b in B:
dpb.append(dpb[-1]+b)
ans = 0
for i in range(1, N+1):
t = dpa[i]
if t > K:
break
j = b... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
from bisect import bisect_right
dpa = [0]
for a in A:
dpa.append(dpa[-1]+a)
dpb = [0]
for b in B:
dpb.append(dpb[-1]+b)
ans = 0
for i in range(N+1):
t = dpa[i]
if t > K:
break
j = bise... | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 153 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
//#define ll long long
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
//#define ll long long
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 370 |
import sys
from bisect import bisect_right, bisect_left
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ap = [0 for i in range(n)]
bp = [0 for j in range(m)]
for i in range(n):
if i == 0:
ap[i] = a[i]
else:
ap[i] = a[i] + ap[i - 1]
for i in range(m)... | import sys
from bisect import bisect_right, bisect_left
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ap = [0 for i in range(n)]
bp = [0 for j in range(m)]
for i in range(n):
if i == 0:
ap[i] = a[i]
else:
ap[i] = a[i] + ap[i - 1]
for i in range(m)... | [["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 352 |
from sys import stdin
input = stdin.readline
n, m, k = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
cnt = 0
idx = 0
res = [0]
na, nb = [0, a[0]], [0, b[0]]
for x in range(1, n):
na.append(na[-1] + a[x])
for x in range(1, m):
nb.append(nb[-1] + b[x])
... | from sys import stdin
input = stdin.readline
n, m, k = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
cnt = 0
idx = 0
res = [0]
na, nb = [0, a[0]], [0, b[0]]
for x in range(1, n):
na.append(na[-1] + a[x])
for x in range(1, m):
nb.append(nb[-1] + b[x])
... | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 664, 17, 33], ["+", 0, 7, 12, 652, 3, 4, 0, 664, 28, 612]] | 5 | 228 |
N, M, k = gets.split.map &:to_i
A = gets.split.map &:to_i
B = gets.split.map &:to_i
ans = 0
current = 0
idx_a = 0
idx_b = 0
while A[idx_a] && k >= A[idx_a]
k -= A[idx_a]
current += 1
idx_a += 1
end
ans = current
while B[idx_b]
k -= B[idx_b]
current += 1
while k < 0 && idx_a >= 0
idx_a ... | N, M, k = gets.split.map &:to_i
A = gets.split.map &:to_i
B = gets.split.map &:to_i
ans = 0
current = 0
idx_a = 0
idx_b = 0
while A[idx_a] && k >= A[idx_a]
k -= A[idx_a]
current += 1
idx_a += 1
end
ans = current
while B[idx_b]
k -= B[idx_b]
current += 1
while k < 0 && idx_a >= 1
idx_a ... | [["-", 8, 170, 0, 89, 15, 738, 12, 738, 12, 612], ["+", 8, 170, 0, 89, 15, 738, 12, 738, 12, 612]] | 4 | 124 |
#include <algorithm>
#include <climits>
#include <iostream>
using namespace std;
const long long INF = LLONG_MAX;
int main() {
int n, m;
long long k;
long long a[200005] = {0};
long long b[200005] = {0};
cin >> n >> m >> k;
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] += a[i - 1];
}
a[n + 1... | #include <algorithm>
#include <climits>
#include <iostream>
using namespace std;
const long long INF = LLONG_MAX;
int main() {
int n, m;
long long k;
long long a[200005] = {0};
long long b[200005] = {0};
cin >> n >> m >> k;
for (int i = 1; i <= n; i++) {
cin >> a[i];
a[i] += a[i - 1];
}
a[n + 1... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20]] | 1 | 238 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.