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
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound, __gcd, count, find, next_permutation #include <bitset> // bitset #include <deque> // deque #include <iomanip> // setprecsion #include <iostream> // cout, endl, cin #include <map> // map #include <queue> // queue, priori...
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound, __gcd, count, find, next_permutation #include <bitset> // bitset #include <deque> // deque #include <iomanip> // setprecsion #include <iostream> // cout, endl, cin #include <map> // map #include <queue> // queue, priori...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72]]
1
415
#include <bits/stdc++.h> using namespace std; #define pb push_back #define vi vector<int> #define all(a) (a).begin(), (a).end() #define F first #define S second #define endl "\n" #define fast \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define vi vector<int> #define all(a) (a).begin(), (a).end() #define F first #define S second #define endl "\n" #define fast \ ios_base::sync_with_stdio(false); ...
[["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 72], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
191
h1, m1, h2, m2, k = map(int,input().split()) x = 60*max(0, h2-h1-1) print(x) if h1 == h2: x += (m2-m1) else: x += (60-m1 + m2) print(x - k)
h1, m1, h2, m2, k = map(int,input().split()) x = 60*max(0, h2-h1-1) if h1 == h2: x += (m2-m1) else: x += (60-m1 + m2) print(x - 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, 25]]
5
69
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; cout << 60 * h1 + m1 - 60 * h2 - m2 - k; }
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; cout << 60 * h2 + m2 - 60 * h1 - m1 - k; }
[["-", 31, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 12, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 12, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 12, 16, 31, 16, 31, 16, 12, 16, 12, 22], ["+", 12, 16, 31, 16, 31, 16, 12, 16, 12, 22], ["-", 0, 1, 0, 16, 12, 16, 31, 16, 12...
1
51
#include <bits/stdc++.h> using namespace std; #define endl "\n" int main() { ios::sync_with_stdio(false); cin.tie(0); int h1, h2, m1, m2, k; int h, m; cin >> h1 >> m1 >> h2 >> m2 >> k; if (m1 <= m2) m = m2 - m1; else { m = m2 + 60 - m1; if (h2 != 0) h1--; else h2 = h2 + 24 ...
#include <bits/stdc++.h> using namespace std; #define endl "\n" int main() { ios::sync_with_stdio(false); cin.tie(0); int h1, h2, m1, m2, k; int h, m; cin >> h1 >> m1 >> h2 >> m2 >> k; if (m1 <= m2) m = m2 - m1; else { m = m2 + 60 - m1; if (h2 != 0) h2--; else h2 = h2 + 24 ...
[["-", 0, 9, 0, 57, 64, 1, 0, 27, 28, 22], ["+", 0, 9, 0, 57, 64, 1, 0, 27, 28, 22]]
1
154
h1, m1, h2, m2, k = int(input().split(' ')) awake_time = (h2 - h1) * 60 + (m2 - m1) y = awake_time - k print(y)
h1, m1, h2, m2, k = list(map(int, input().split(' '))) awake_time = (h2 - h1) * 60 + (m2 - m1) y = awake_time - k print(y)
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
47
import sys a = [] for l in sys.stdin: a.append(int(l)) h1, m1, h2, m2, k = a[0].split() H1, M1, H2, M2, K = int(h1), int(m1), int(h2), int(m2), int(k) time = 60 * H2 + M2 - (60*H1 + M1) - K print(time)
import sys a = [] for l in sys.stdin: a.append(l) h1, m1, h2, m2, k = a[0].split() H1, M1, H2, M2, K = int(h1), int(m1), int(h2), int(m2), int(k) time = 60 * H2 + M2 - (60*H1 + M1) - K print(time)
[["-", 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, 25]]
5
95
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <string> #include <vector> #define ll long long using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; cout << 60 * h1 + m1 - 60 * h2 - m2 - k; }
#include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <string> #include <vector> #define ll long long using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; cout << 60 * h2 + m2 - 60 * h1 - m1 - k; }
[["-", 31, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 12, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 12, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 12, 16, 31, 16, 31, 16, 12, 16, 12, 22], ["+", 12, 16, 31, 16, 31, 16, 12, 16, 12, 22], ["-", 0, 1, 0, 16, 12, 16, 31, 16, 12...
1
64
num_list = list(map(int, input().split())) a=num_list[2]-num_list[0] b=num_list[3]-num_list[1] if b<0: a=a-1 a=a*60 c=b+a-num_list[4] if c<0: c=0 print(c)
# coding: utf-8 # Your code here! num_list = list(map(int, input().split())) a=num_list[2]-num_list[0] b=num_list[3]-num_list[1] if b<0: a=a-1 b=b+60 a=a*60 c=b+a-num_list[4] if c<0: c=0 print(c)
[["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
5
76
w_h, w_m, s_h, s_m,t = map(int,input().split()) s_t = s_h*60 + s_m -t ans = s_t - w_h*60 print(ans)
w_h, w_m, s_h, s_m,t = map(int,input().split()) s_t = s_h*60 + s_m -t ans = s_t - w_h*60 - w_m print(ans)
[["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]]
5
42
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++)...
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++)...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
185
h1, m1, h2, m2, k = map(int, input().split()) h = (h2 - h1)*60 m = m2 - m1 if m < 0: h = h - 1 m = 60 - m total = h + m print(total-k)
h1, m1, h2, m2, k = map(int, input().split()) h = (h2 - h1)*60 m = m2 - m1 if m < 0: h = h - 60 m = 60 + m total = h + m print(total-k)
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72]]
5
62
H1,M1,H2,M2,K=map(int, input().split()) if H1 > H2: hour = H2+(24-H1) else: hour = H2-H1 if M1 > M2: hour -= 1 minutes = abs(M2-M1) else: minutes = M2-M1 print(hour*60+minutes-K)
H1,M1,H2,M2,K=map(int, input().split()) if H1 > H2: hour = H2+(24-H1) else: hour = H2-H1 if M1 > M2: hour -= 1 minutes = M2+(60-M1) else: minutes = M2-M1 print(hour*60+minutes-K)
[["-", 64, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 24], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 31, 612]]
5
76
a,b,c,d,e = map(int,input.split()) time = c*60+d-a*60-b if time>=e: print(time-e) else: print(0)
a,b,c,d,e = map(int,input().split()) time = c*60+d-a*60-b if time>=e: print(time-e) else: print(0)
[["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25]]
5
50
#include <stdio.h> int main(void) { int a, b, c, d, e, f, g, h, i; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); scanf("%d", &d); scanf("%d", &e); if (d >= a) { f = d - a; g = c - a; h = g * 60 + f; i = h - e; printf("%d", i); } else if (d < a) { f = d + 60 - a; ...
#include <stdio.h> int main(void) { int a, b, c, d, e, f, g, h, i; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); scanf("%d", &d); scanf("%d", &e); if (d >= b) { f = d - b; g = c - a; h = g * 60 + f; i = h - e; printf("%d", i); } else if (d < b) { f = d + 60 - b; ...
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 12, 22], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 12, 22]]
0
172
h1,h2,m1,m2,k = gets.chomp.split.map(&:to_i) ji = m1 - h1 fun = m2 + h2 puts (ji*60 + fun) - k
h1,h2,m1,m2,k = gets.chomp.split.map(&:to_i) ji = m1 - h1 fun = m2 - h2 puts (ji*60 + fun) - k
[["-", 36, 36, 0, 493, 0, 662, 12, 738, 17, 72], ["+", 36, 36, 0, 493, 0, 662, 12, 738, 17, 33]]
4
41
#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; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; /*** Typedef ***/ typedef long long ll; // ...
#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; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; /*** Typedef ***/ typedef long long ll; // ...
[["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
1,090
h1,m1,h2,m2,k=map(int,input().split()) s=abs(h2-h1)*60+abs(m2-m1) n=s-k print(n)
h1,m1,h2,m2,k=map(int,input().split()) s=(h2-h1)*60+(m2-m1) n=s-k print(n)
[["-", 0, 662, 12, 657, 31, 657, 31, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 657, 12, 652, 63, 22]]
5
48
h1, m1,h2,m2,k = map(int,input().split()) print((h2*60+m2 - h1*60+m1)-k)
h1, m1,h2,m2,k = map(int,input().split()) print(((h2*60+m2) - (h1*60+m1))-k)
[["+", 0, 657, 31, 23, 0, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 23, 0, 657, 31, 23, 0, 25], ["+", 0, 657, 31, 23, 0, 657, 12, 23, 0, 24], ["+", 0, 657, 31, 23, 0, 657, 12, 23, 0, 25]]
5
40
h_1,m_1,h_2,m_2,k = gets.split.map(&:to_i) time = h_2*60+m_2 - h_1*60 - m_2 puts time-k
h_1,m_1,h_2,m_2,k = gets.split.map(&:to_i) time = h_2*60+m_2 - h_1*60 - m_1 puts time-k
[["-", 36, 36, 0, 493, 0, 662, 12, 738, 12, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 738, 12, 22]]
4
36
x = list(map(int, input().split())) h = (x[2] - x[0])*60 m = x[3] - x[1] if m < 0: h -= 1 m = 60 - x[1] + x[3] ans = max(m+h-x[-1], 0) print(ans)
x = list(map(int, input().split())) h = (x[2] - x[0])*60 m = x[3] - x[1] if m < 0: h -= 60 m = 60 - x[1] + x[3] ans = max(m+h-x[-1], 0) print(ans)
[["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612]]
5
84
#include <iostream> int main() { int h1; int m1; int h2; int m2; int k; std::cin >> h1 >> m1 >> h2 >> m2 >> k; int mdiff = m2 - m1; int hsub = 0; if (mdiff < 0) { mdiff = 60 - mdiff; hsub = 1; } int hdiff = h2 - h1 - hsub; int totalTime = hdiff * 60 + mdiff; std::cout << totalTime - ...
#include <iostream> int main() { int h1; int m1; int h2; int m2; int k; std::cin >> h1 >> m1 >> h2 >> m2 >> k; int mdiff = m2 - m1; int hsub = 0; if (mdiff < 0) { mdiff = 60 + mdiff; hsub = 1; } int hdiff = h2 - h1 - hsub; int totalTime = hdiff * 60 + mdiff; std::cout << totalTime - ...
[["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72]]
1
100
#include <stdio.h> int main() { int H1, M1, H2, M2, K; scanf("%d%d%d%d%d", &H1, &M1, &H2, &M2, &K); int ans; int h, m; h = (H2 - H1) * 60; if (M1 < M2) { m = M2 - M1; ans = h + m; } else { m = M2 - M1; ans = h - m; } ans = ans - K; printf("%d\n", ans); return 0; }
#include <stdio.h> int main() { int H1, M1, H2, M2, K; scanf("%d%d%d%d%d", &H1, &M1, &H2, &M2, &K); int ans; int h, m; h = (H2 - H1) * 60; if (M1 < M2) { m = M2 - M1; ans = h + m; } else { m = M1 - M2; ans = h - m; } ans = ans - K; printf("%d\n", ans); return 0; }
[["-", 0, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
0
113
h1,m1,h2,m2,k=map(int,input().split()) ans=(h2-h1-1)*60+(60-m1)-(m2-0)-k print(ans)
h1,m1,h2,m2,k=map(int,input().split()) ans=(h2-h1-1)*60+(60-m1)+m2-k print(ans)
[["-", 0, 1, 0, 662, 12, 657, 31, 657, 17, 33], ["-", 0, 662, 12, 657, 31, 657, 12, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 72], ["-", 12, 657, 31, 657, 12, 23, 0, 657, 17, 33], ["-", 12, 657, 31, 657, 12, 23, 0, 657, 12, 612], ["-", 0, 662, 12, 657, 31, 657, 12, 23, 0, 25]]
5
51
h1,m1,h2,m2,k = map(int,input().split()) time = (h2 - h1) * 60 - (m2 - m1) print(time - k)
h1,m1,h2,m2,k = map(int,input().split()) time = (h2 - h1) * 60 + (m2 - m1) print(time - k)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72]]
5
43
def resolve(): h1, m1, h2, m2, k = map(int, input().split()) print((h2-h1)*60 + (m2-m1) - k*10) resolve()
def resolve(): h1, m1, h2, m2, k = map(int, input().split()) print((h2-h1)*60 + (m2-m1) - k) resolve()
[["-", 0, 652, 3, 4, 0, 657, 12, 657, 17, 48], ["-", 0, 652, 3, 4, 0, 657, 12, 657, 12, 612]]
5
50
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; int sum = (H2 - H1) * 60 + abs(M2 - M1); if (sum == K) cout << K; else if (sum > K) cout << sum - K; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; int sum = (H2 - H1) * 60 + (M2 - M1); if (sum == K) cout << 0; else if (sum > K) cout << sum - K; return 0; }
[["-", 0, 43, 49, 50, 51, 16, 12, 2, 63, 22], ["-", 8, 9, 0, 57, 64, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 16, 12, 13]]
1
84
#include <algorithm> #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define all(obj) (obj).begin(), (obj).end() using namespace std; typedef long long ll; long long GCD(long long x, long long y) { return y ? GCD(y, x % y) : x; } int main() { int H1, H2, M1, M2, K; cin >> H1 >> M1 >> H2 >> M...
#include <algorithm> #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define all(obj) (obj).begin(), (obj).end() using namespace std; typedef long long ll; long long GCD(long long x, long long y) { return y ? GCD(y, x % y) : x; } int main() { int H1, H2, M1, M2, K; cin >> H1 >> M1 >> H2 >> M...
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
107
#include <bits/stdc++.h> using namespace std; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; cout << (H2 * 60 + M2) - (H1 * 60 + M2) - K << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; cout << (H2 * 60 + M2) - (H1 * 60 + M1) - K << endl; }
[["-", 12, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 12, 22]]
1
57
#include <algorithm> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <vector> #...
#include <algorithm> #include <climits> #include <cmath> #include <cstdint> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <vector> #...
[["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 33], ["+", 0, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 110]]
1
1,372
a,b,c,d,e=map(int,input().split()) x=((c*60-d)-(a*60+b))-e if x<0: x=x+1440 print(x)
a,b,c,d,e=map(int,input().split()) x=((c*60+d)-(a*60+b))-e if x<0: x=x+1440 print(x)
[["-", 31, 23, 0, 657, 31, 23, 0, 657, 17, 33], ["+", 31, 23, 0, 657, 31, 23, 0, 657, 17, 72]]
5
57
H1, M1, H2, M2, K = map(int,input().split()) T1 = H1*60 + M1 T2 = H2*60 - M2 T = T2 - T1 print(T - K)
H1, M1, H2, M2, K = map(int, input().split()) T1 = H1 * 60 + M1 T2 = H2 * 60 + M2 T = T2 - T1 print(T - K)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72]]
5
47
h1, m1, h2, m2, k = map(int, input().split()) h_time = h2 - h1 if m1 < m2: h_time -= 1 m_time = 60 - m2 + m1 else: m_time = m2 - m1 study_time = (h_time * 60 + m_time) - k if study_time <= 0: print(0) else: print(study_time)
h1, m1, h2, m2, k = map(int, input().split()) h_time = h2 - h1 if m1 > m2: h_time -= 1 m_time = 60 - m1 + m2 else: m_time = m2 - m1 study_time = (h_time * 60 + m_time) - k if study_time <= 0: print(0) else: print(study_time)
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 22]]
5
75
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rng(i, a, b) for (int i = int(a); i < int(b); i++) #define rep(i, b) rng(i, 0, b) #define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--) #define per(i, b) gnr(i, 0, b) #define bg begin() #define ed end() #define rbg rbegin() #define red rend() #define all...
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rng(i, a, b) for (int i = int(a); i < int(b); i++) #define rep(i, b) rng(i, 0, b) #define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--) #define per(i, b) gnr(i, 0, b) #define bg begin() #define ed end() #define rbg rbegin() #define red rend() #define all...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
415
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define ll long long using namespace std; // typedef vector<unsigned int>vec; // typedef vector<ll>vec; // typedef vector<vec> mat; typedef pair<int, int> P; typedef pair<ll, ll> LP; const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define ll long long using namespace std; // typedef vector<unsigned int>vec; // typedef vector<ll>vec; // typedef vector<vec> mat; typedef pair<int, int> P; typedef pair<ll, ll> LP; const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {...
[["-", 49, 50, 51, 16, 12, 23, 0, 16, 17, 33], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 17, 72]]
1
275
a,b,c,d,e=gets.split.map(&:to_i) b += a*60 d += c*60 puts [d-b-c, 0].max
a,b,c,d,e=gets.split.map(&:to_i) b += a*60 d += c*60 puts [d-b-e, 0].max
[["-", 3, 4, 0, 652, 486, 516, 0, 738, 12, 22], ["+", 3, 4, 0, 652, 486, 516, 0, 738, 12, 22]]
4
41
#include <bits/stdc++.h> using namespace std; #define int long long #define ld long double #define ll long long #define P pair<int, int> #define fi first #define se second #define rep(i, n) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define pb push_back #define eb emplace_back template <class T> void...
#include <bits/stdc++.h> using namespace std; #define int long long #define ld long double #define ll long long #define P pair<int, int> #define fi first #define se second #define rep(i, n) for (int i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define pb push_back #define eb emplace_back template <class T> void...
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22]]
1
624
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define endl "\n" int main() { i64 H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M1 >> K; cout << H2 * 60 + M2 - (H1 * 60 + M1) - K << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define endl "\n" int main() { i64 H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; cout << H2 * 60 + M2 - (H1 * 60 + M1) - K << endl; return 0; }
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
67
#include <bits/stdc++.h> #include <regex> using namespace std; // type typedef long long int ll; typedef pair<int, int> P; //定数 #define INF 1000000000000 // 10^12:∞ #define MOD 1000000007 // 10^9+7:合同式の法 #define MAXR 100000 // 10^5:配列の最大のrange #define PI 3.14159265358979323846264338327950L //略記 #define PB pus...
#include <bits/stdc++.h> #include <regex> using namespace std; // type typedef long long int ll; typedef pair<int, int> P; //定数 #define INF 1000000000000 // 10^12:∞ #define MOD 1000000007 // 10^9+7:合同式の法 #define MAXR 100000 // 10^5:配列の最大のrange #define PI 3.14159265358979323846264338327950L //略記 #define PB pus...
[["-", 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
774
t = list(input()) for i in range(len(t)): if t[i] == '?': t[i] = 'D' print(t)
t = list(input()) for i in range(len(t)): if t[i] == '?': t[i] = 'D' print(''.join(t))
[["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 654], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 655], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
41
// Radhe Radhe #include <bits/stdc++.h> #define godspeed \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define ll long long ...
// Radhe Radhe #include <bits/stdc++.h> #define godspeed \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define ll long long ...
[["-", 0, 57, 64, 1, 0, 11, 12, 103, 0, 125], ["+", 0, 57, 64, 1, 0, 11, 12, 103, 0, 125]]
1
127
#include <bits/stdc++.h> using namespace std; int main() { string t; cin >> t; for (int i = 0; i < t.size(); i++) { if (t.at(i) == '?') t.at(i) == 'D'; } cout << t << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string t; cin >> t; for (int i = 0; i < (int)t.size(); i++) { if (t.at(i) == '?') t.at(i) = 'D'; } cout << t << endl; }
[["+", 8, 9, 0, 7, 15, 16, 12, 74, 0, 24], ["+", 0, 7, 15, 16, 12, 74, 39, 77, 39, 40], ["+", 8, 9, 0, 7, 15, 16, 12, 74, 0, 25], ["-", 8, 9, 0, 57, 64, 1, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32]]
1
69
#include <bits/stdc++.h> using namespace std; int main() { string t; cin >> t; for (int i = 0; i < t.size(); i++) { if (t.at(i) == '?') t.at(i) == 'D'; } cout << t << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string t; cin >> t; for (int i = 0; i < t.size(); i++) { if (t.at(i) == '?') t.at(i) = 'D'; } cout << t << endl; }
[["-", 8, 9, 0, 57, 64, 1, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32]]
1
69
// Practice 40 hours a day to become Ling Ling // Code by Nguyen Huu Lam #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long LL; #define y0 Sword_Art_Online #define y1 Your_lie_in_April #define yn Dar...
// Practice 40 hours a day to become Ling Ling // Code by Nguyen Huu Lam #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long LL; #define y0 Sword_Art_Online #define y1 Your_lie_in_April #define yn Dar...
[["-", 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, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
355
#include <bits/stdc++.h> using namespace std; string s; int main() { cin >> s; for (char c : s) if (c == '?') c = 'D'; cout << s << endl; return 0; }
#include <bits/stdc++.h> using namespace std; string s; int main() { cin >> s; for (char &c : s) if (c == '?') c = 'D'; cout << s << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 338, 49, 352, 0, 67]]
1
49
#include <bits/stdc++.h> using namespace std; #define INF 2147483647 #define LINF 9223372036854775807 #define MOD 1000000007 #define MOD2 998244353 template <class T, class U> bool chmax(T &a, const U &b) { if (a < b) { a = b; return 1; } return 0; } template <class T, class U> bool chmin(T &a, const U ...
#include <bits/stdc++.h> using namespace std; #define INF 2147483647 #define LINF 9223372036854775807 #define MOD 1000000007 #define MOD2 998244353 template <class T, class U> bool chmax(T &a, const U &b) { if (a < b) { a = b; return 1; } return 0; } template <class T, class U> bool chmin(T &a, const U ...
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
367
package main import ( "bufio" "fmt" "os" "strings" ) var mod = 1000000007 func main() { r := bufio.NewReader(os.Stdin) var t string fmt.Fscan(r, &t) ans := make([]string, len(t)) if t[len(t)-1] == '?' { ans[len(t)-1] = "D" } else { ans[len(t)-1] = string(t[len(t)-1]) } for j := len(t) - 2; j >= 0; j...
package main import ( "bufio" "fmt" "os" "strings" ) var mod = 1000000007 func main() { r := bufio.NewReader(os.Stdin) var t string fmt.Fscan(r, &t) ans := make([]string, len(t)) if t[len(t)-1] == '?' { ans[len(t)-1] = "D" } else { ans[len(t)-1] = string(t[len(t)-1]) } for j := len(t) - 2; j >= 0; j...
[]
7
1,907
s = gets s.gsub('?','D') puts s
s = gets s = s.gsub('?','D') puts s
[["+", 36, 36, 36, 36, 0, 493, 0, 662, 0, 32], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 486, 22]]
4
17
<?php fscanf(STDIN,"%s",$t); $c = 0; for($i=0;$i<strlen($t);$i++){ if($t[$i+1]=='?'){ $t[$i+1]='D'; } } echo $t;
<?php fscanf(STDIN,"%s",$t); $c = 0; for($i=0;$i<strlen($t);$i++){ if($t[$i]=='?'){ $t[$i]='D'; } } echo $t;
[["-", 15, 23, 0, 16, 31, 69, 0, 16, 17, 72], ["-", 15, 23, 0, 16, 31, 69, 0, 16, 12, 612], ["-", 0, 1, 0, 11, 31, 69, 0, 16, 17, 72], ["-", 0, 1, 0, 11, 31, 69, 0, 16, 12, 612]]
6
74
import re string = input() string = re.sub("\?D", "PD", string) string = re.sub("\?\?", "PD", string) string = string.replace("?", "D") print(string)
import re string = input() string = re.sub("P\?", "PD", string) string = re.sub("\?\?\?", "DDD", string) string = string.replace("?", "D") print(string)
[["-", 0, 662, 12, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 662, 12, 652, 3, 4, 0, 557, 0, 6]]
5
57
#include <bits/stdc++.h> #define ll long long #define ld long double #define fs first #define sc second #define task "test" using namespace std; const ll N = 100 + 9; const ll inf = 1e9 + 7; typedef pair<ll, ll> LL; string s; ll n, i; int main() { ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); if (fopen(...
#include <bits/stdc++.h> #define ll long long #define ld long double #define fs first #define sc second #define task "test" using namespace std; const ll N = 100 + 9; const ll inf = 1e9 + 7; typedef pair<ll, ll> LL; string s; ll n, i; int main() { ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); if (fopen(...
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
1
164
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; for (int i = 0; i < str.length(); i++) { if (str[i] == '?') { str[i] == 'D'; } } cout << str << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; for (int i = 0; i < str.length(); i++) { if (str[i] == '?') { str[i] = 'D'; } } cout << str << endl; }
[["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32]]
1
67
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; #define debug(x) cout << #x << " = " << x << '\n' #define debug_arr(a, n) \ for (int i = 0; i < n; i++) ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; #define debug(x) cout << #x << " = " << x << '\n' #define debug_arr(a, n) \ for (int i = 0; i < n; i++) ...
[["+", 0, 338, 8, 9, 0, 57, 75, 76, 0, 95]]
1
184
#include <bits/stdc++.h> using namespace std; mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count()); typedef long long ll; typedef long double ld; int main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; for (auto &c : s) { if (c == '?') { c = 'P'; } ...
#include <bits/stdc++.h> using namespace std; mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count()); typedef long long ll; typedef long double ld; int main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; for (auto &c : s) { if (c == '?') { c = 'D'; } ...
[["-", 64, 9, 0, 1, 0, 11, 12, 103, 0, 125], ["+", 64, 9, 0, 1, 0, 11, 12, 103, 0, 125]]
1
100
#include <stdio.h> #include <string.h> int main() { char input[200001]; int i, len; scanf("%s", input); len = strlen(input); for (i = 0; i < len; i++) { if (input[i] == '?') { input[i] == 'D'; } } printf("%s", input); }
#include <stdio.h> #include <string.h> int main() { char input[200001]; int i, len; scanf("%s", input); len = strlen(input); for (i = 0; i < len; i++) { if (input[i] == '?') { input[i] = 'D'; } } printf("%s", input); }
[["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32]]
0
83
#include <bits/stdc++.h> #include <iostream> #define int long long #define mod 1000000007 #define pb(x) push_back(x) #define gcd(a, b) __gcd(a, b) #define all(v) v.begin(), v.end() #define lcm(a, b) (a * b) / gcd(a, b) #define bits(x) __builtin_popcountll(x) #define fast ...
#include <bits/stdc++.h> #include <iostream> #define int long long #define mod 1000000007 #define pb(x) push_back(x) #define gcd(a, b) __gcd(a, b) #define all(v) v.begin(), v.end() #define lcm(a, b) (a * b) / gcd(a, b) #define bits(x) __builtin_popcountll(x) #define fast ...
[["-", 0, 9, 0, 1, 0, 11, 12, 103, 0, 125], ["+", 0, 9, 0, 1, 0, 11, 12, 103, 0, 125]]
1
324
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; for (int i = 0; i < a.size(); i++) { if (a[i] == '?') a[i] == 'D'; } cout << a << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; for (int i = 0; i < a.size(); i++) { if (a[i] == '?') a[i] = 'D'; } cout << a << endl; return 0; }
[["-", 8, 9, 0, 57, 64, 1, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32]]
1
68
#pragma GCC optimize("O3") #include <algorithm> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> #include <unordered_set> using namespace std; using QWORD = uint64...
#pragma GCC optimize("O3") #include <algorithm> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> #include <unordered_set> using namespace std; using QWORD = uint64...
[["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32]]
1
1,395
#include <bits/stdc++.h> #define rep(i, x) for (int i = 0; i < x; i++) typedef long long ll; using namespace std; string T; void solve() { for (int i = 1; i < T.size(); i++) { if (T[i] == '?') { T[i] = 'D'; } } cout << T; } int main() { cin >> T; solve(); return 0; }
#include <bits/stdc++.h> #define rep(i, x) for (int i = 0; i < x; i++) typedef long long ll; using namespace std; string T; void solve() { for (int i = 0; i < T.size(); i++) { if (T[i] == '?') { T[i] = 'D'; } } cout << T; } int main() { cin >> T; solve(); return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
91
#include <bits/stdc++.h> using namespace std; using ll = long long int; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { string t; cin >> t; rep(i, t.size() - 1) { if (t[i] == '?') t[i] = 'D'; } cout << t << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long int; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { string t; cin >> t; rep(i, t.size()) { if (t[i] == '?') t[i] = 'D'; } cout << t << endl; }
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
75
#include <bits/stdc++.h> using namespace std; int main() { string T; cin >> T; for (int i = 0; i < T.size() - 1; i++) { if (T[i] == '?') { T[i] = 'D'; } } cout << T << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string T; cin >> T; for (int i = 0; i < T.size(); i++) { if (T[i] == '?') { T[i] = 'D'; } } cout << T << endl; return 0; }
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
72
a= input() c="" for i in range(1, len(a)): if a[i-1]=="?": c=c+"D" else: c=c+a[i-1] print(c)
a= input() c="" for i in range(0, len(a)): if a[i]=="?": c=c+"D" else: c=c+a[i] print(c)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 57, 15, 666, 0, 206, 206, 657, 17, 33], ["-", 0, 57, 15, 666, 0, 206, 206, 657, 12, 612], ["-", 0, 662, 12, 657, 12, 206, 206, 657, 17, 33], ["-", 0, 662, 12, 657, 12, 206, 206, 657, 12, 612]]
5
57
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String T = sc.next(); System.out.println(T.replaceAll("/?", "D")); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String T = sc.next(); System.out.println(T.replaceAll("\\?", "D")); } }
[["-", 3, 4, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 3, 4, 0, 492, 3, 4, 0, 5, 0, 44], ["+", 3, 4, 0, 492, 3, 4, 0, 5, 0, 491]]
3
64
print(input.replace("?", "D"))
print(input().replace("?", "D"))
[["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25]]
5
15
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; typedef long double ld; const double pi = acos(-1.0); const ll mod = pow(10, 9) + 7; const ll INF = pow(2, 31) - 1; typedef pair<int, int> P; typedef vector<int> vi; template <class T> bool chmax(T &a, c...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; typedef long double ld; const double pi = acos(-1.0); const ll mod = pow(10, 9) + 7; const ll INF = pow(2, 31) - 1; typedef pair<int, int> P; typedef vector<int> vi; template <class T> bool chmax(T &a, c...
[["-", 0, 9, 0, 57, 64, 1, 0, 16, 17, 60], ["+", 0, 9, 0, 57, 64, 1, 0, 11, 17, 32]]
1
276
#include <bits/stdc++.h> #define rep3(i, s, n, a) for (int i = (s); i < (int)(n); i += a) #define rep2(i, s, n) rep3(i, s, n, 1) #define rep(i, n) rep2(i, 0, n) using namespace std; using ll = long long; using P = pair<int, int>; int main() { string s; cin >> s; int s_len = s.size(); for (int i = s_len - 1; i...
#include <bits/stdc++.h> #define rep3(i, s, n, a) for (int i = (s); i < (int)(n); i += a) #define rep2(i, s, n) rep3(i, s, n, 1) #define rep(i, n) rep2(i, 0, n) using namespace std; using ll = long long; using P = pair<int, int>; int main() { string s; cin >> s; int s_len = s.size(); for (int i = s_len - 1; i...
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
180
#include <bits/stdc++.h> using namespace std; int main() { string data; cin >> data; for (int i = 0; i < (int)data.size(); i++) { if (data.substr(i, 1) == "?") { data.replace(i + 1, 1, "D"); } } cout << data << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string data; cin >> data; for (int i = 0; i < (int)data.size(); i++) { if (data.substr(i, 1) == "?") { data.replace(i, 1, "D"); } } cout << data << endl; return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
83
#include <bits/stdc++.h> using namespace std; template <typename T> T read() { T a; cin >> a; return a; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); auto s = read<string>(); for (auto c : s) cout << (c == '?' ? 'P' : c); return 0; }
#include <bits/stdc++.h> using namespace std; template <typename T> T read() { T a; cin >> a; return a; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); auto s = read<string>(); for (auto c : s) cout << (c == '?' ? 'D' : c); return 0; }
[["-", 0, 16, 12, 23, 0, 41, 64, 103, 0, 125], ["+", 0, 16, 12, 23, 0, 41, 64, 103, 0, 125]]
1
83
#include <algorithm> #include <iostream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <assert.h> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric...
#include <algorithm> #include <iostream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <assert.h> #include <bitset> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric...
[["-", 0, 57, 64, 1, 0, 11, 12, 103, 0, 125], ["+", 0, 57, 64, 1, 0, 11, 12, 103, 0, 125]]
1
1,738
#include <bits/stdc++.h> using namespace std; #define int long long int #define endl '\n' #define pb push_back #define PI 3.14159265 int M = 998244353; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s; cin >> s; for (int i = 0; i < s.length(); i++) { if (s[i] ==...
#include <bits/stdc++.h> using namespace std; #define int long long int #define endl '\n' #define pb push_back #define PI 3.14159265 int M = 998244353; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s; cin >> s; for (int i = 0; i < s.length(); i++) { if (s[i] ==...
[["-", 8, 9, 0, 57, 64, 1, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32]]
1
101
#include <bits/stdc++.h> using namespace std; signed main() { string t; cin >> t; for (int i = 0; i < t.size(); ++i) if (t[i] == '?') t[i] = 'D'; int r = 0; for (int i = 0; i < t.size(); ++i) { if (t[i] == 'D') { ++r; if (i > 0 && t[i - 1] == 'P') ++r; } } cout << r; ...
#include <bits/stdc++.h> using namespace std; signed main() { string t; cin >> t; for (int i = 0; i < t.size(); ++i) if (t[i] == '?') t[i] = 'D'; int r = 0; for (int i = 0; i < t.size(); ++i) { if (t[i] == 'D') { ++r; if (i > 0 && t[i - 1] == 'P') ++r; } } cout << t; ...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
122
#include <iostream> using namespace std; int main() { string s; cin >> s; int ans = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == '?') { s[i] = 'D'; } else { } cout << s; } return 0; }
#include <iostream> using namespace std; int main() { string s; cin >> s; int ans = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == '?') { s[i] = 'D'; } else { } } cout << s; return 0; }
[["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
1
76
def main(): H1, M1, H2, M2, K = (int(i) for i in input().split()) h = H2 - H1 m = max(M2 - M1, 0) ans = h*60 + m - K if ans > 0: print(ans) else: print(0) if __name__ == '__main__': main()
def main(): H1, M1, H2, M2, K = (int(i) for i in input().split()) h = H2 - H1 m = M2 - M1 ans = h*60 + m - K if ans > 0: print(ans) else: print(0) if __name__ == '__main__': main()
[["-", 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, 21], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 612], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
80
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h1 = sc.nextInt(); int m1 = sc.nextInt(); int h2 = sc.nextInt(); int m2 = sc.nextInt(); int k = sc.nextInt(); int ans1 = (h2 - h1) * 60; int ans2 = m2 - ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h1 = sc.nextInt(); int m1 = sc.nextInt(); int h2 = sc.nextInt(); int m2 = sc.nextInt(); int k = sc.nextInt(); int ans1 = (h2 - h1) * 60; int ans2 = m2 - ...
[["+", 64, 196, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 12, 22]]
3
134
#include <iostream> using namespace std; int main() { int h1, h2, m1, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; h1 = h1 * 60 + m1; h2 = h2 * 60 + m2; cout << h2 - h1 - 30 << endl; }
#include <iostream> using namespace std; int main() { int h1, h2, m1, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; h1 = h1 * 60 + m1; h2 = h2 * 60 + m2; cout << h2 - h1 - k << endl; }
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
61
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, K; cin >> A >> B >> C >> D >> K; cout << 60 * C + D - 60 * A + B - K << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, K; cin >> A >> B >> C >> D >> K; cout << (60 * C + D) - (60 * A + B) - K << endl; }
[["+", 31, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 16, 31, 23, 0, 25], ["+", 31, 16, 12, 16, 31, 16, 12, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 16, 12, 23, 0, 25]]
1
53
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, E; cin >> A >> B >> C >> D >> E; cout << ((C - A) * 60 - (D - B)) - E << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, E; cin >> A >> B >> C >> D >> E; cout << ((C - A) * 60 - (B - D)) - E << endl; }
[["-", 31, 23, 0, 16, 12, 23, 0, 16, 31, 22], ["-", 31, 23, 0, 16, 12, 23, 0, 16, 17, 33], ["+", 31, 23, 0, 16, 12, 23, 0, 16, 17, 33], ["+", 31, 23, 0, 16, 12, 23, 0, 16, 12, 22]]
1
57
H1, M1, H2, M2, K = map(int, input().split()) ans = 60*H2+M2 - 60*H1+M1 - K print(ans)
H1, M1, H2, M2, K = map(int, input().split()) ans = 60*H2+M2 - (60*H1+M1) - K print(ans)
[["+", 0, 662, 12, 657, 31, 657, 12, 23, 0, 24], ["+", 0, 662, 12, 657, 31, 657, 12, 23, 0, 25]]
5
41
h1,m1,h2,m2,k = map(int,input().split()) if m2 < m1: m2 += 60 h1 -= 1 time = (h2 - h1) * 60 + (m2 - m1) print(time - k)
h1,m1,h2,m2,k = map(int,input().split()) if m2 < m1: m2 += 60 h2 -= 1 time = (h2 - h1) * 60 + (m2 - m1) print(time - k)
[["-", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22]]
5
54
#include <bits/stdc++.h> using namespace std; #define int long long main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int h1, m1, h2, m2, k; while (cin >> h1 >> m1 >> h2 >> m2 >> k) { cout << (h2 - h1) * 60 - m1 - m2 - k << endl; } }
#include <bits/stdc++.h> using namespace std; #define int long long main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int h1, m1, h2, m2, k; while (cin >> h1 >> m1 >> h2 >> m2 >> k) { cout << (h2 - h1) * 60 - m1 + m2 - k << endl; } }
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 33], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 72]]
1
80
H1,M1,H2,M2,K = map(int,input().split()) print(60 * (H1 - H2) + M2 - M1 - K)
H1,M1,H2,M2,K = map(int,input().split()) print(60 * (H2 - H1) + M2 - M1 - K)
[["-", 31, 657, 31, 657, 12, 23, 0, 657, 31, 22], ["-", 31, 657, 31, 657, 12, 23, 0, 657, 17, 33], ["+", 31, 657, 31, 657, 12, 23, 0, 657, 17, 33], ["+", 31, 657, 31, 657, 12, 23, 0, 657, 12, 22]]
5
38
H1, H2, H3, H4, K = map(int, input().split()) up = H1*60 + H2 down = H3*60 - H4 print(down - up - K)
H1, H2, H3, H4, K = map(int, input().split()) up = H1*60 + H2 down = H3*60 + H4 print(down - up - K)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72]]
5
44
#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>; void ins() {} template <class T, class... Rest> void ins(T &v, Rest &...rest) { cin >> v; ins(rest...); }...
#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>; void ins() {} template <class T, class... Rest> void ins(T &v, Rest &...rest) { cin >> v; ins(rest...); }...
[["-", 31, 16, 12, 16, 31, 16, 31, 16, 17, 33], ["+", 31, 16, 12, 16, 31, 16, 31, 16, 17, 72]]
1
126
H1, M1, H2, M2, K = map(int, input().split()) print((H2 - H1) * 60 + abs(M1 - M2) - K)
H1, M1, H2, M2, K = map(int, input().split()) print((H2 - H1) * 60 + (M2 -M1) - K)
[["-", 3, 4, 0, 657, 31, 657, 12, 652, 63, 22], ["-", 31, 657, 12, 652, 3, 4, 0, 657, 31, 22], ["-", 31, 657, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 657, 31, 657, 12, 23, 0, 657, 17, 33], ["+", 0, 657, 31, 657, 12, 23, 0, 657, 12, 22]]
5
41
h1, m1, h2, m2, k = map(int, input().split()) hour = h2 - h1 minute = m2 - m1 time = (hour * 60) - minute print(time - k)
h1, m1, h2, m2, k = map(int, input().split()) hour = h2 - h1 minute = m2 - m1 time = (hour * 60) + minute print(time - k)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72]]
5
47
#include <algorithm> #include <cmath> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <math.h> #include <numeric> #include <string> #include <vector> #define ll long long #define PI 3.14159265358979323846 #define rep(i, n) for (ll i = 0; i < (ll)n; i++) using namespace std; dou...
#include <algorithm> #include <cmath> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <math.h> #include <numeric> #include <string> #include <vector> #define ll long long #define PI 3.14159265358979323846 #define rep(i, n) for (ll i = 0; i < (ll)n; i++) using namespace std; dou...
[["-", 0, 11, 12, 16, 31, 16, 31, 23, 0, 24], ["-", 0, 11, 12, 16, 31, 16, 31, 23, 0, 25], ["-", 0, 11, 12, 16, 31, 16, 12, 23, 0, 24], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 17, 72], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["-", 0, 11, 12, 16, 31, 16, 12, 23, 0, 25], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 33], ["+...
1
114
#include <stdio.h> int main() { int h1, m1, h2, m2, k, start = 0, finish = 0, lo = 0; scanf("%d%d%d%d%d", &h1, &m1, &h2, &m2, &k); start = h1 * 60 + m1; finish = h2 * 60; m2; lo = finish - start - k; printf("%d", lo); return 0; }
#include <stdio.h> int main() { int h1, m1, h2, m2, k, start = 0, finish = 0, lo = 0; scanf("%d%d%d%d%d", &h1, &m1, &h2, &m2, &k); start = h1 * 60 + m1; finish = h2 * 60 + m2; lo = finish - start - k; printf("%d", lo); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72]]
0
89
#include <bits/stdc++.h> #define int int64_t using namespace std; const int inf = LLONG_MAX / 2; int32_t main() { ios::sync_with_stdio(0); cin.tie(0); int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int ans = (h1 - h2) * 60 + (m1 - m2) - k; cout << ans; return 0; }
#include <bits/stdc++.h> #define int int64_t using namespace std; const int inf = LLONG_MAX / 2; int32_t main() { ios::sync_with_stdio(0); cin.tie(0); int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int ans = (h2 - h1) * 60 + (m2 - m1) - k; cout << ans; return 0; }
[["-", 31, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["-", 31, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["-", 51, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["-", 51, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 17, 33...
1
86
h1,m1,h2,m2,k=map(int,input().split()) ans2=h2*60+m2 ans1=h1*60+m1 print(ans2-ans1)
h1,m1,h2,m2,k=map(int,input().split()) ans2=h2*60+m2 ans1=h1*60+m1 print(ans2-ans1-k)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
42
#デフォルト import itertools from collections import defaultdict import collections import math import sys sys.setrecursionlimit(200000) mod = 1000000007 h1, m1, h2, m2, k = map(int, input().split()) minute = ((h2 * 60) + m2) - (h1 * 60) + m1 print(minute - k)
#デフォルト import itertools from collections import defaultdict import collections import math import sys sys.setrecursionlimit(200000) mod = 1000000007 h1, m1, h2, m2, k = map(int, input().split()) minute = ((h2 * 60) + m2) - ((h1 * 60) + m1) print(minute - k)
[["+", 12, 657, 12, 23, 0, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 25]]
5
69
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define MOD1 1000000007 #define MOD2 998244353 #define LIMIT1 200002 #define LIMIT2 500002 typedef long long ll; typedef long double ld; typedef const void cv; #define rep(i, n) for ((i) = 0; (i) < (n); (i)++) #define per(i, n) for ((i) = (n)-...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define MOD1 1000000007 #define MOD2 998244353 #define LIMIT1 200002 #define LIMIT2 500002 typedef long long ll; typedef long double ld; typedef const void cv; #define rep(i, n) for ((i) = 0; (i) < (n); (i)++) #define per(i, n) for ((i) = (n)-...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19]]
0
674
h1, m1, h2, m2, k = [int(i) for i in input().split()] awake = 60*h2+m2 - (60*h1+m1) - k print(k)
h1, m1, h2, m2, k = [int(i) for i in input().split()] awake = 60*h2+m2 - (60*h1+m1) - k print(awake)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
47
H1,M1,H2,M2,K=map(int,input().split()) if M1>M2: print(max((H2-H1-1)*60+(M1-M2)-K,0)) else: print(max((H2-H1)*60+(M2-M1)-K,0))
H1,M1,H2,M2,K=map(int,input().split()) if M1>M2: print(max((H2-H1-1)*60+(60-(M1-M2))-K,0)) else: print(max((H2-H1)*60+(M2-M1)-K,0))
[["+", 0, 657, 31, 657, 12, 23, 0, 657, 31, 612], ["+", 0, 657, 31, 657, 12, 23, 0, 657, 17, 33], ["+", 31, 657, 12, 23, 0, 657, 12, 23, 0, 24], ["+", 31, 657, 12, 23, 0, 657, 12, 23, 0, 25]]
5
77
#include <bits/stdc++.h> using namespace std; inline int ctoi(char c) { if (c < '0' || '9' < c) throw invalid_argument("ctoi error"); return c - '0'; } #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() tem...
#include <bits/stdc++.h> using namespace std; inline int ctoi(char c) { if (c < '0' || '9' < c) throw invalid_argument("ctoi error"); return c - '0'; } #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() tem...
[["+", 0, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 16, 31, 23, 0, 25], ["+", 0, 1, 0, 16, 12, 16, 12, 23, 0, 24], ["+", 0, 1, 0, 16, 12, 16, 12, 23, 0, 25]]
1
243
#include <iostream> using namespace std; int main() { int a1, a2, b1, b2, k; int output = 0; cin >> a1 >> a2 >> b1 >> b2 >> k; int time = (b1 - a1) * 60 + b2 - a2 - 1; output = time - k; cout << output; return 0; }
#include <iostream> using namespace std; int main() { int a1, a2, b1, b2, k; int output = 0; cin >> a1 >> a2 >> b1 >> b2 >> k; int time = (b1 - a1) * 60 + b2 - a2; output = time - k; cout << output; return 0; }
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
70
# -*- coding: utf-8 -*- a, b, c, d, e = map(int, input().split()) print((c-a)*60-(d-b)-e)
# -*- coding: utf-8 -*- a, b, c, d, e = map(int, input().split()) print((c-a)*60+(d-b)-e)
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 33], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 72]]
5
41
h1, m1, h2, m2, k = map(int, input().split()) wake_time = h2*60 + m2 - h1 *60 + m1; if wake_time > k: print(wake_time - k); else: print(0);
h1, m1, h2, m2, k = map(int, input().split()) wake_time = h2*60 + m2 - (h1 *60 + m1); if wake_time > k: print(wake_time - k); else: print(0);
[["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 25]]
5
55
import numpy as np h1, m1, h2, m2, k = np.array(list(map(int, input().split()))) h = h2 - h1 m = m2-m1 t = h*60 + m print(t)
import numpy as np h1, m1, h2, m2, k = np.array(list(map(int, input().split()))) h = h2 - h1 m = m2-m1 t = h*60 + m print(t-k)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
55
#include <algorithm> #include <bitset> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <iso646.h> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef vector...
#include <algorithm> #include <bitset> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <iso646.h> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef vector...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33]]
1
149
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> V; #define rep(cnt, e) for (ll cnt = 0; cnt < e; cnt++) typedef pair<ll, ll> P; const ll mod = 1e9 + 7; const ll INF = INT64_MAX; typedef tuple<ll, ll, ll> T; long long euclid(long long x, long long y) { long long a = max(x, y); ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> V; #define rep(cnt, e) for (ll cnt = 0; cnt < e; cnt++) typedef pair<ll, ll> P; const ll mod = 1e9 + 7; const ll INF = INT64_MAX; typedef tuple<ll, ll, ll> T; long long euclid(long long x, long long y) { long long a = max(x, y); ...
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 31, 13], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
244