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 <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, p; cin >> a >> b >> c >> d; int t = d + (60 - b); int y = (c - a - 1) * 60; t = t + y; t = t - p; cout << t; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, p; cin >> a >> b >> c >> d >> p; int t = d + (60 - b); int y = (c - a - 1) * 60; t = t + y; t = t - p; cout << t; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
73
#include <bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int>>; #define rep(i, m, n) for (int(i) = (m); (i) < (n); ++(i)) #define rREP(i, m, n) for (int(i) = (n)-1; (i) >= (m); --(i)) #define all(x) (x).begin(), (x).end() #define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) ||...
#include <bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int>>; #define rep(i, m, n) for (int(i) = (m); (i) < (n); ++(i)) #define rREP(i, m, n) for (int(i) = (n)-1; (i) >= (m); --(i)) #define all(x) (x).begin(), (x).end() #define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) ||...
[["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 25]]
1
256
a,b,c,d,e = map(int,input().split()) x = abs(a - c) * 60 - e if x < 0: print(0) else: print(x)
a,b,c,d,e = map(int,input().split()) x = abs(a - c) * 60 - b + d - e if x < 0: print(0) else: print(x)
[["+", 0, 662, 12, 657, 31, 657, 31, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33]]
5
49
//#define NDEBUG #include "bits/stdc++.h" #include <array> #include <iostream> #include <random> #include <string> #include <unordered_map> #include <unordered_set> #ifdef _MSC_VER #include <ppl.h> //#include <boost/multiprecision/cpp_dec_float.hpp> //#include <boost/multiprecision/cpp_int.hpp> //#include <boost/ration...
//#define NDEBUG #include "bits/stdc++.h" #include <array> #include <iostream> #include <random> #include <string> #include <unordered_map> #include <unordered_set> #ifdef _MSC_VER #include <ppl.h> //#include <boost/multiprecision/cpp_dec_float.hpp> //#include <boost/multiprecision/cpp_int.hpp> //#include <boost/ration...
[["-", 49, 50, 51, 16, 12, 23, 0, 16, 17, 33], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 17, 72]]
1
1,932
#include <bits/stdc++.h> using namespace std; #define repl(i, l, r) for (ll i = (l); i < (r); i++) #define rep(i, n) repl(i, 0, n) #define fi first #define se second #define all(x) (x).begin(), (x).end() #define CST(x) cout << fixed << setprecision(x) using ll = long long; const ll MOD = 1000000007; const int inf = 1e9...
#include <bits/stdc++.h> using namespace std; #define repl(i, l, r) for (ll i = (l); i < (r); i++) #define rep(i, n) repl(i, 0, n) #define fi first #define se second #define all(x) (x).begin(), (x).end() #define CST(x) cout << fixed << setprecision(x) using ll = long long; const ll MOD = 1000000007; const int inf = 1e9...
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22]]
1
141
#include <bits/stdc++.h> using namespace std; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; cout << H1 * 60 + M1 - H2 * 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 << -(H1 * 60 + M1 - H2 * 60 - M2) - K << endl; }
[["+", 0, 16, 31, 16, 12, 16, 31, 91, 17, 33], ["+", 31, 16, 12, 16, 31, 91, 28, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 91, 28, 23, 0, 25]]
1
53
h1, m1, h2, m2, k = map(int, input().split()) h = h2 - h1 if m1>m2: h-=1 m = m2 - m1 + 60 else: m = m2 - m1 l = h*60 + m - k
h1, m1, h2, m2, k = map(int, input().split()) h = h2 - h1 if m1>m2: h-=1 m = m2 - m1 + 60 else: m = m2 - m1 l = h*60 + m - k print(l)
[["+", 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
58
h1, m1, h2, m2, k = map(int, input().split()) l = (60 * h2 + m2) -(60 * h1 + m2) ans = l - k print(ans)
h1, m1, h2, m2, k = map(int, input().split()) l = (60 * h2 + m2) -(60 * h1 + m1) ans = l - k print(ans)
[["-", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22]]
5
48
#include <stdio.h> int main() { int H1, M1, H2, M2, K; scanf("%d%d%d%d%d", &H1, &M1, &H2, &M2, &K); int l = H2 * 60 + M2 - H1 * 60 - M2 - K; printf("%d\n", l); 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 l = H2 * 60 + M2 - H1 * 60 - M1 - K; printf("%d\n", l); return 0; }
[["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 22], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 22]]
0
71
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; cout << 60 * (c - a) + b - d - e; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; cout << 60 * (c - a) + d - b - e; }
[["-", 0, 16, 12, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 16, 12, 16, 31, 16, 17, 33], ["+", 0, 1, 0, 16, 12, 16, 31, 16, 17, 33], ["+", 0, 1, 0, 16, 12, 16, 31, 16, 12, 22]]
1
51
#include <algorithm> #include <climits> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <stack> #include <unordered_map> #include <vector> #define _USE_MATH_DEFINES #include <assert.h> #include <cmath> #include <cstdlib> #include <deque> #include <iterator> #include <set> #include <unor...
#include <algorithm> #include <climits> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <stack> #include <unordered_map> #include <vector> #define _USE_MATH_DEFINES #include <assert.h> #include <cmath> #include <cstdlib> #include <deque> #include <iterator> #include <set> #include <unor...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
376
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int h1, m1, h2, m2, K; cin >> h1 >> m1 >> h2 >> m2 >> K; if (m1 > m2) { h2--; } cout << (h2 - h1) * 60 + (m2 - m1) - K << endl; return 0; }
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int h1, m1, h2, m2, K; cin >> h1 >> m1 >> h2 >> m2 >> K; if (m1 > m2) { h2--; m2 += 60; } cout << (h2 - h1) * 60 + (m2 - m1) - K << endl; return 0; }
[["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]]
1
78
i = list(map(int, input().split())) print((i[2]-i[0])*60-(i[3]-i[1])-i[4])
i = list(map(int, input().split())) print((i[2]-i[0])*60+(i[3]-i[1])-i[4])
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 33], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 72]]
5
50
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] num = new int[5]; for (int i = 0; i < 5; i++) { num[i] = sc.nextInt(); } int wake = (num[2] - num[0]) * 60 + num[1] + num[3]; int ans = wake - num[4]; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] num = new int[5]; for (int i = 0; i < 5; i++) { num[i] = sc.nextInt(); } int wake = (num[2] - num[0]) * 60 - num[1] + num[3]; int ans = wake - num[4]; ...
[["-", 0, 503, 49, 200, 51, 16, 31, 16, 17, 72], ["+", 0, 503, 49, 200, 51, 16, 31, 16, 17, 33]]
3
119
def resolve(): h1,m1,h2,m2,k = map(int,input().split()) T = h2*60 + m2 - (h1*60 - m1) print(T-k) resolve()
def resolve(): h1,m1,h2,m2,k = map(int,input().split()) T = h2*60 + m2 - (h1*60 + m1) print(T-k) resolve()
[["-", 0, 662, 12, 657, 12, 23, 0, 657, 17, 33], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 17, 72]]
5
51
string = input() nums = string.split(' ') hour = int(nums[2]) - int(nums[0]) minute = int(nums[1]) - int(nums[3]) time = hour * 60 + minute - int(nums[4]) print(time)
string = input() nums = string.split(' ') hour = int(nums[2]) - int(nums[0]) minute = int(nums[3]) - int(nums[1]) time = hour * 60 + minute - int(nums[4]) print(time)
[["-", 12, 657, 31, 652, 3, 4, 0, 206, 206, 612], ["+", 12, 657, 31, 652, 3, 4, 0, 206, 206, 612], ["-", 12, 657, 12, 652, 3, 4, 0, 206, 206, 612], ["+", 12, 657, 12, 652, 3, 4, 0, 206, 206, 612]]
5
68
// // nomura_a.cpp // learningCplusplus // // Created by Tran Duc Chinh on 2020/04/04. // Copyright © 2020 Tran Duc Chinh. All rights reserved. // #include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> using namespace std; typedef long long ll; ll mod = 998244353; ll INF = 10000...
// // nomura_a.cpp // learningCplusplus // // Created by Tran Duc Chinh on 2020/04/04. // Copyright © 2020 Tran Duc Chinh. All rights reserved. // #include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> using namespace std; typedef long long ll; ll mod = 998244353; ll INF = 10000...
[["+", 31, 16, 12, 16, 31, 16, 12, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 16, 12, 23, 0, 25]]
1
453
def solve(): H1, M1, H2, M2, K = map(int, input().split()) print((H2*60 + M2) - (H1*60 + M2) - K) if __name__ == '__main__': solve()
def solve(): H1, M1, H2, M2, K = map(int, input().split()) print((H2*60 + M2) - (H1*60 + M1) - K) if __name__ == '__main__': solve()
[["-", 0, 657, 31, 657, 12, 23, 0, 657, 12, 22], ["+", 0, 657, 31, 657, 12, 23, 0, 657, 12, 22]]
5
57
#include <bits/stdc++.h> using namespace std; int main() { int h1, h2, m1, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int min = (60 - m1) + (h2 - h1 - 1) * 60; cout << min - k << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int h1, h2, m1, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int min = (60 - m1) + (h2 - h1 - 1) * 60 + m2; cout << min - k << endl; }
[["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
62
#include <bits/stdc++.h> #define MAXN 100005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int, int> P; int a, b, c, d, k; int main() { scanf("%d%d%d%d%d", &a, &b, &c, &d, &k); printf("%d\n", (c - a) * 60 - (d - b) - k); retu...
#include <bits/stdc++.h> #define MAXN 100005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int, int> P; int a, b, c, d, k; int main() { scanf("%d%d%d%d%d", &a, &b, &c, &d, &k); printf("%d\n", (c - a) * 60 + (d - b) - k); retu...
[["-", 0, 2, 3, 4, 0, 16, 31, 16, 17, 33], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 17, 72]]
1
101
#include <bits/stdc++.h> #include <cmath> #include <string> using namespace std; #define ll long long int #define loop(i, n) for (int i = 0; i < n; i++) #define loops(i, s, n) for (int i = s; i < n; i++) #define pb push_back #define mp make_pair #define all(v) v.begin(), v.end() #define sz(x) ((int)(x).size()) #defin...
#include <bits/stdc++.h> #include <cmath> #include <string> using namespace std; #define ll long long int #define loop(i, n) for (int i = 0; i < n; i++) #define loops(i, s, n) for (int i = s; i < n; i++) #define pb push_back #define mp make_pair #define all(v) v.begin(), v.end() #define sz(x) ((int)(x).size()) #defin...
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22]]
1
132
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 1e9; const int MOD = 1e9 + 7; const ll LINF = 1e18; int main() { int h1, m1; cin >> h1 >> m1; int h2, m2; cin >> h2 >> m2; int k; cin >> k; int m = 0; if (h2 >= h1) { m += (h2 - h1) * 60; } else { m += ((h2...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 1e9; const int MOD = 1e9 + 7; const ll LINF = 1e18; int main() { int h1, m1; cin >> h1 >> m1; int h2, m2; cin >> h2 >> m2; int k; cin >> k; int m = 0; if (h2 >= h1) { m += (h2 - h1) * 60; } else { m += ((h2...
[["-", 0, 11, 12, 16, 31, 23, 0, 16, 31, 22], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 31, 22], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
145
const int LG = 21; const int FN = 400005; const long long MOD = 1e9 + 7; const long long INF = 1e9; const long long INFLL = 1e18; #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; #define forn(i, n) for (int(i) = 0; (i) ...
const int LG = 21; const int FN = 400005; const long long MOD = 1e9 + 7; const long long INF = 1e9; const long long INFLL = 1e18; #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; #define forn(i, n) for (int(i) = 0; (i) ...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
855
H1, M1, H2, M2, K = list(map(int,input().split())) a = 60*H1 + M1 b = 60*H2 + M2 print(b - a - p)
H1, M1, H2, M2, K = list(map(int,input().split())) a = 60*H1 + M1 b = 60*H2 + M2 print(b - a - K)
[["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
47
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <float.h> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <float.h> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #include <queue> #include...
[["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]]
1
654
import sys import numpy as np n, s, *aaa = map(int, sys.stdin.buffer.read().split()) MOD = 998244353 dp = np.zeros(s + 1, np.int64) dp[0] = 1 for a in aaa: ndp = dp * 2 % MOD if a > s: continue ndp[a:] += dp[:-a] dp = ndp % MOD print(dp[s])
import sys import numpy as np n, s, *aaa = map(int, sys.stdin.buffer.read().split()) MOD = 998244353 dp = np.zeros(s + 1, np.int64) dp[0] = 1 for a in aaa: ndp = dp * 2 % MOD if a <= s: ndp[a:] += dp[:-a] dp = ndp % MOD print(dp[s])
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["-", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117]]
5
96
n,s = map(int,input().split()) a = list(map(int,input().split())) mod = 998244353 dp = [[0] * (s+1) for _ in range(n+1)] dp[0][0] = 1 for i in range(1,n+1): for j in range(0,s+1): dp[i][j] += dp[i-1][j] if(j>=a[i-1]): dp[i][j] += dp[i-1][j-a[i-1]] dp[i][j] %= mod print(dp[-1][...
n,s = map(int,input().split()) a = list(map(int,input().split())) mod = 998244353 dp = [[0] * (s+1) for _ in range(n+1)] dp[0][0] = 1 for i in range(1,n+1): for j in range(0,s+1): dp[i][j] += dp[i-1][j] * 2 if(j>=a[i-1]): dp[i][j] += dp[i-1][j-a[i-1]] dp[i][j] %= mod print(dp[...
[["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 48], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 12, 612]]
5
165
# coding: utf-8 # Your code here! import sys readline = sys.stdin.readline read = sys.stdin.read n,s,*a = map(int,read().split()) MOD = 998244353 def mul(c,m,dp): #multiply (2+x^c) up to x^m for i in range(m,c-1,-1): dp[i] *= 2 dp[i] += dp[i-c] dp[i] %= MOD for i in range(c-1,-1,-1): ...
# coding: utf-8 # Your code here! import sys readline = sys.stdin.readline read = sys.stdin.read n,s,*a = map(int,read().split()) MOD = 998244353 def mul(c,m,dp): #multiply (2+x^c) up to x^m for i in range(m,c-1,-1): dp[i] *= 2 dp[i] += dp[i-c] dp[i] %= MOD for i in range(min(m,c-1),-1...
[["+", 0, 7, 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], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
158
#include <bits/stdc++.h> using namespace std; const long long MOD = 998244353; long long pow(long long x, long long n, long long mod) { long long ans = 1; while (n) { if (n % 2) ans *= x; x *= x; x %= mod; ans %= mod; n >>= 1; } return ans; } long long inv = pow(2, MOD - 2, MOD); l...
#include <bits/stdc++.h> using namespace std; const long long MOD = 998244353; long long pow(long long x, long long n, long long mod) { long long ans = 1; while (n) { if (n % 2) ans *= x; x *= x; x %= mod; ans %= mod; n >>= 1; } return ans; } long long inv = pow(2, MOD - 2, MOD); l...
[["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40]]
1
376
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> #define mkp make_pair #define mkt make_tuple #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const l...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> #define mkp make_pair #define mkt make_tuple #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const l...
[["+", 51, 4, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 51, 4, 0, 2, 3, 4, 0, 16, 12, 13]]
1
729
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "debug.h" #else #define DEBUG(...) #endif template <class T, class Op = multiplies<T>> constexpr T power(T a, long long n, Op op = Op(), T e = {1}) { assert(n >= 0); while (n) { if (n & 1) e = op(e, a); if (n >>= 1) a = op(a, ...
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "debug.h" #else #define DEBUG(...) #endif template <class T, class Op = multiplies<T>> constexpr T power(T a, long long n, Op op = Op(), T e = {1}) { assert(n >= 0); while (n) { if (n & 1) e = op(e, a); if (n >>= 1) a = op(a, ...
[["-", 0, 43, 49, 50, 51, 4, 0, 16, 31, 22], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 31, 22]]
1
558
#include <bits/stdc++.h> #define inf 1000000005 #define mod 1000000007 #define eps 1e-10 #define rep(i, n) for (int i = 0; i < (n); ++i) /*0からn-1までのrepeat*/ #define rrep(i, n) for (int i = 1; i <= (n); ++i) /*1からnまでのrepeat*/ #define drep(i, n) for (int i = (n)-1; i >= 0; --i) /*n-1から0までのrepeat*/ #define srep(i, s, t)...
#include <bits/stdc++.h> #define inf 1000000005 #define mod 1000000007 #define eps 1e-10 #define rep(i, n) for (int i = 0; i < (n); ++i) /*0からn-1までのrepeat*/ #define rrep(i, n) for (int i = 1; i <= (n); ++i) /*1からnまでのrepeat*/ #define drep(i, n) for (int i = (n)-1; i >= 0; --i) /*n-1から0までのrepeat*/ #define srep(i, s, t)...
[["-", 31, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["-", 31, 16, 31, 16, 12, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 12, 22]]
1
341
#include <bits/stdc++.h> using namespace std; int main() { int H1, H2; int M1, M2; int K; cin >> H1 >> M1 >> H2 >> M2 >> K; int A = H1 * 60 + M1; int B = H2 * 60 + M2 - K; if (A - B < 0) { cout << "0" << endl; return 0; } cout << B - A << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int H1, H2; int M1, M2; int K; cin >> H1 >> M1 >> H2 >> M2 >> K; int A = H1 * 60 + M1; int B = H2 * 60 + M2 - K; if (B - A < 0) { cout << "0" << endl; return 0; } cout << B - A << endl; return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
89
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; ll GetDigit(ll num) { return log10(num) + 1; } // numの桁数を求める int main() { int h1, h2, m1, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; if (m1 != 0) cout << (h2 - h1) * 60 + (60 - m1) + m2 - k ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; ll GetDigit(ll num) { return log10(num) + 1; } // numの桁数を求める int main() { int h1, h2, m1, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; if (m1 != 0) cout << (h2 - h1 - 1) * 60 + (60 - m1) + m2 ...
[["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13]]
1
114
#include <bits/stdc++.h> using namespace std; int read() { int s = 0; char c = getchar(), lc = '+'; while (c < '0' || '9' < c) lc = c, c = getchar(); while ('0' <= c && c <= '9') s = s * 10 + c - '0', c = getchar(); return lc == '-' ? -s : s; } void write(int x) { if (x < 0) { putchar('-'); ...
#include <bits/stdc++.h> using namespace std; int read() { int s = 0; char c = getchar(), lc = '+'; while (c < '0' || '9' < c) lc = c, c = getchar(); while ('0' <= c && c <= '9') s = s * 10 + c - '0', c = getchar(); return lc == '-' ? -s : s; } void write(int x) { if (x < 0) { putchar('-'); ...
[["-", 0, 2, 3, 4, 0, 16, 31, 16, 12, 22], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 12, 22]]
1
249
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int a = h2 * 60 + m2 - h1 * 60 - m1, ans; if (a = k) { ans = 0; } else { ans = a - k; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int a = h2 * 60 + m2 - h1 * 60 - m1, ans; if (a == k) { ans = 0; } else { ans = a - k; } cout << ans << endl; }
[["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
79
import sys sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) #空白あり def LI2(): return list(map(int,sys.stdin.readline().rstrip())) #空白なし def S(): return s...
import sys sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) #空白あり def LI2(): return list(map(int,sys.stdin.readline().rstrip())) #空白なし def S(): return s...
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 72], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 33]]
5
209
h1, m1, h2, m2, k = map(int, input().split()) H = h2 - h1 if m1 <= m2: M = m2 - m1 else: M = 60 - m1 + m2 # print(H) # print(M) print(H*60 + M - k)
h1, m1, h2, m2, k = map(int, input().split()) H = h2 - h1 if m1 <= m2: M = m2 - m1 else: M = 60 - m1 + m2 H -= 1 print(H*60 + M - k)
[["+", 75, 76, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 12, 612]]
5
58
H1, M1, H2, M2, K = map(int, input().split()) if M1<M2: H = H2-H1-1 M = 60+5-M1 else: H = H2-H1 M = M2-M1 time = H*60+M if time>=K: print(time-K) else: print(0)
H1, M1, H2, M2, K = map(int, input().split()) if M1>M2: H = H2-H1-1 M = 60+M2-M1 else: H = H2-H1 M = M2-M1 time = H*60+M if time>=K: print(time-K) else: print(0)
[["-", 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, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22]]
5
77
#include <stdio.h> int main() { int h1, h2, m1, m2, k; scanf("%d %d %d %d %d", &h1, &m1, &h2, &m2, &k); printf("%d\n", 60 * (h2 - 1) + m2 - m1 - k); return 0; }
#include <stdio.h> int main() { int h1, h2, m1, m2, k; scanf("%d %d %d %d %d", &h1, &m1, &h2, &m2, &k); printf("%d\n", 60 * (h2 - h1) + m2 - m1 - k); return 0; }
[["-", 31, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 12, 22]]
1
66
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int x1 = 60 * h1 + m1; int x2 = 60 * h2 + m2; int t = x2 - x1; if (t >= k) { cout << k << endl; } else { cout ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int x1 = 60 * h1 + m1; int x2 = 60 * h2 + m2; int t = x2 - x1; if (t >= k) { cout << t - k << endl; } else { c...
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["-", 0, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 12, 13]]
1
97
h1,m1,h2,m2,k = map(int ,input().split()) h = (h2-h1)*60 m = m2 -m1 print((h+m-1)//k*k)
h1,m1,h2,m2,k = map(int ,input().split()) h = (h2-h1)*60 m = m2-m1 print((h+m)-k)
[["-", 0, 657, 31, 657, 31, 23, 0, 657, 17, 33], ["-", 0, 657, 31, 657, 31, 23, 0, 657, 12, 612], ["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 676], ["-", 0, 652, 3, 4, 0, 657, 31, 657, 12, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33]]
5
50
import sys H1,M1,H2,M2,K = map(int, sys.stdin.readline().split()) print((H2 - H1) * 60 + M1 - M2 - K)
import sys H1,M1,H2,M2,K = map(int, sys.stdin.readline().split()) print((H2 - H1) * 60 + M2 - M1 - K)
[["-", 3, 4, 0, 657, 31, 657, 31, 657, 12, 22], ["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 33], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 33], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 22]]
5
44
#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 * 60 - K; return 0; }
#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; return 0; }
[["-", 0, 16, 12, 16, 31, 16, 12, 16, 17, 48], ["-", 0, 16, 12, 16, 31, 16, 12, 16, 12, 13]]
1
56
#include <algorithm> #include <cstdio> #include <iostream> #include <vector> using namespace std; int main(void) { int H1, M1, H2, M2, K; scanf("%d %d %d %d %d", &H1, &M1, &H2, &M2, &K); printf("%d\n", 60 * (H2 - H1 - 1) + (M2 - M1) - K); return 0; }
#include <algorithm> #include <cstdio> #include <iostream> #include <vector> using namespace std; int main(void) { int H1, M1, H2, M2, K; scanf("%d %d %d %d %d", &H1, &M1, &H2, &M2, &K); printf("%d\n", 60 * (H2 - H1) + (M2 - M1) - K); return 0; }
[["-", 31, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["-", 31, 16, 31, 16, 12, 23, 0, 16, 12, 13]]
1
81
/* author : nishi5451 created: 12.08.2020 11:39:54 */ #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int ans = (h2 - h1 - 1) * 60 + (m2 + 60 - m1); cout << ans <...
/* author : nishi5451 created: 12.08.2020 11:39:54 */ #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int ans = (h2 - h1 - 1) * 60 + (m2 + 60 - m1); cout << ans -...
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
79
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.StringTokenizer; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.StringTokenizer; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static...
[["-", 49, 200, 51, 16, 12, 23, 0, 16, 31, 22], ["-", 49, 200, 51, 16, 12, 23, 0, 16, 17, 33], ["+", 49, 200, 51, 16, 12, 23, 0, 16, 17, 33], ["+", 49, 200, 51, 16, 12, 23, 0, 16, 12, 22]]
3
336
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll a, b, c, d, e; cin >> a >> b >> c >> d >> e; cout << (c - a) * 60 - d + b - e << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll a, b, c, d, e; cin >> a >> b >> c >> d >> e; cout << (c - a) * 60 + d - b - e << endl; return 0; }
[["-", 31, 16, 12, 16, 31, 16, 31, 16, 17, 33], ["-", 31, 16, 12, 16, 31, 16, 31, 16, 12, 22], ["+", 31, 16, 12, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 33]]
1
61
h1,m1,h2,m2,K = map(int,input().split() ) H=h2-h1 M=m2-m1 if(M<0): m += 60 H -= 1 if(H<0): H += 24 M += H*60 ans =M - K print(ans)
h1,m1,h2,m2,K = map(int,input().split() ) H=h2-h1 M=m2-m1 if(M<0): M += 60 H -= 1 if(H<0): H += 24 M += H*60 ans =M - K print(ans)
[["-", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22]]
5
69
a,b,c,d,e=gets.split.map!{|i| i.to_i} ans=0 if b>d ans=(c-a-1)*60+60+d-b-e else ans=(c-a)*60+d-b end if ans>=0 puts ans else puts 0 end
a,b,c,d,e=gets.split.map!{|i| i.to_i} ans=0 if b>d ans=(c-a-1)*60+60+d-b-e else ans=(c-a)*60+d-b-e end if ans>=0 puts ans else puts 0 end
[["+", 0, 121, 75, 95, 0, 662, 12, 738, 17, 33], ["+", 0, 121, 75, 95, 0, 662, 12, 738, 12, 22]]
4
74
h1,m1,h2,m2,k = map(int(input())) a = 60(h2-h1) b = m2-m1 ##起きている合計時間 c = a+b ##勉強開始時間の最遅時間 d = c-k print(d)
h1,m1,h2,m2,k = map(int,input().split()) a = 60*(h2-h1) b = m2-m1 ##起きている合計時間 c = a+b ##勉強開始時間の最遅時間 d = c-k print(d)
[["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 48]]
5
48
#include <bits/stdc++.h> using namespace std; using ll = long long; #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 pb push_back #define eb emplace_back #define a first #def...
#include <bits/stdc++.h> using namespace std; using ll = long long; #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 pb push_back #define eb emplace_back #define a first #def...
[["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22]]
1
159
h1, m1, h2, m2, k = map(int, input().split()) # 時間を、0時0分からの経過時間に変換する。 start = (60 * h1) + m1 end = (60 * h2) + m2 - k print(start-end)
h1, m1, h2, m2, k = map(int, input().split()) # 時間を、0時0分からの経過時間に変換する。 start = (60 * h1) + m1 end = (60 * h2) + m2 - k print(end - start)
[["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
49
#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, 43, 49, 50, 51, 16, 31, 16, 31, 22], ["-", 0, 43, 49, 50, 51, 16, 31, 16, 17, 33], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 17, 33], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 22]]
1
116
#include <iostream> using namespace std; int main() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; int min = 0; if (d < b) { min += 60 - d + b; min += (c - a - 1) * 60; } else { min += d - b; min += (c - a) * 60; } int diff = min - e; if (diff <= 0) cout << 0 << endl; else ...
#include <iostream> using namespace std; int main() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; int min = 0; if (d < b) { min += 60 - b + d; min += (c - a - 1) * 60; } else { min += d - b; min += (c - a) * 60; } int diff = min - e; if (diff <= 0) cout << 0 << endl; else ...
[["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
113
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; int time = 0; cin >> h1 >> m1 >> h2 >> m2 >> k; if (m1 <= m2) { time = (h2 - h1) * 60 + (m2 - m1) - k; } else { time = (h2 - h1 - 1) * 60 + (m1 - m2) - k; } if (time >= 0) { cout << time << endl; } else { ...
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; int time = 0; cin >> h1 >> m1 >> h2 >> m2 >> k; if (m1 <= m2) { time = (h2 - h1) * 60 + (m2 - m1) - k; } else { time = (h2 - h1 - 1) * 60 + (m2 + 60 - m1) - k; } if (time >= 0) { cout << time << endl; } else {...
[["-", 12, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 31, 16, 12, 23, 0, 16, 31, 16, 17, 72], ["+", 31, 16, 12, 23, 0, 16, 31, 16, 12, 13], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 12, 22]]
1
114
#include <bits/stdc++.h> // Begin Header {{{ #define lli long long int #define rep(i, n) for (lli i = 0; i < n; i++) #define loop(i, j, n) for (lli i = j; i < n; i++) #define all(x) (x).begin(), (x).end() constexpr int INF = 0x3f3f3f3f; const long long mod = 1e9 + 7; const double PI = acos(-1); using namespace std; usi...
#include <bits/stdc++.h> // Begin Header {{{ #define lli long long int #define rep(i, n) for (lli i = 0; i < n; i++) #define loop(i, j, n) for (lli i = j; i < n; i++) #define all(x) (x).begin(), (x).end() constexpr int INF = 0x3f3f3f3f; const long long mod = 1e9 + 7; const double PI = acos(-1); using namespace std; usi...
[["+", 49, 50, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 49, 50, 51, 16, 31, 16, 31, 23, 0, 25], ["+", 49, 50, 51, 16, 31, 16, 12, 23, 0, 24], ["+", 49, 50, 51, 16, 31, 16, 12, 23, 0, 25]]
1
145
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, K; cin >> a >> b >> c >> d >> K; int M = c - a; int N = d - b; int i; if (N >= 0) { i = 60 * M + N; } else if (N < 0) { i = 60 * (M - 1) + N; } if (i - K >= 0) { cout << i - K << endl; } else if (i - K < 0) { ...
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, K; cin >> a >> b >> c >> d >> K; int M = c - a; int N = d - b; int i; if (N >= 0) { i = 60 * M + N; } else if (N < 0) { i = 60 * M + N; } if (i - K >= 0) { cout << i - K << endl; } else if (i - K < 0) { cout <...
[["-", 0, 11, 12, 16, 31, 16, 12, 23, 0, 24], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["-", 0, 11, 12, 16, 31, 16, 12, 23, 0, 25]]
1
126
(a,b,c,d,e)=map(int,input().split()) if a==c: t=d-b if e<=t: print(t-e) else: print(0) if c>a: if b>d: t=60-b+d if e<=t: print(t-e) else: print(0) if b<=d: t=(c-a)*60+d-b if e<=t: prin...
(a,b,c,d,e)=map(int,input().split()) if a==c: t=d-b if e<=t: print(t-e) else: print(0) if c>a: if b>d: t=60*(c-a)-b+d if e<=t: print(t-e) else: print(0) if b<=d: t=(c-a)*60+d-b if e<=t: ...
[["+", 0, 662, 12, 657, 31, 657, 31, 657, 17, 48], ["+", 12, 657, 31, 657, 31, 657, 12, 23, 0, 24], ["+", 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, 12, 22], ["+", 12, 657, 31, 657, 31, 657, 12, 23, 0, 25]]
5
120
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <math.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; int fast = H1 * 60 + M...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <math.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; int fast = H1 * 60 + M...
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 33], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 33], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22]]
1
91
h1, m1, h2, m2, k = gets.split.map(&:to_i) tatal_min = (h2 - h1) * 60 + (m2 - m1) ans = total_min - k puts ans
h1, m1, h2, m2, k = gets.split.map(&:to_i) total_min = (h2 - h1) * 60 + (m2 - m1) ans = total_min - k puts ans
[["-", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22]]
4
41
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int ans; if (h2 < h1 || (h1 == h2 && m2 < m1)) { h2 += 24; } ans = max(0, 60 * h2 + m2 - 60 * h1 + m1 - k); cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; int ans; if (h2 < h1 || (h1 == h2 && m2 < m1)) { h2 += 24; } ans = max(0, 60 * h2 + m2 - (60 * h1 + m1) - k); cout << ans << endl; }
[["+", 3, 4, 0, 16, 31, 16, 12, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 16, 12, 23, 0, 25]]
1
87
h1, m1, h2, m2, k = gets.strip.split.map(&:to_i) p (h2-h1)*60+m2-m2-k
h1, m1, h2, m2, k = gets.strip.split.map(&:to_i) p (h2-h1)*60+m2-m1-k
[["-", 0, 652, 3, 4, 0, 738, 31, 738, 12, 22], ["+", 0, 652, 3, 4, 0, 738, 31, 738, 12, 22]]
4
35
h1, m1, h2, m2, k = map(int, input().split()) print(min(0, (h2*60+m2) - (h1*60+m1) - k))
h1, m1, h2, m2, k = map(int, input().split()) print(max(0, (h2*60+m2) - (h1*60+m1) - k))
[["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22]]
5
47
H1,M1,H2,H2,K = map(int,input().split()) print((H2-H1)*60+(M2-M1)-K)
H1,M1,H2,M2,K = map(int,input().split()) print((H2-H1)*60+(M2-M1)-K)
[["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22]]
5
40
#include <bits/stdc++.h> #define rep(i, n) for (int i = (0); i < (n); i++) using namespace std; typedef long long ll; 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> #define rep(i, n) for (int i = (0); i < (n); i++) using namespace std; typedef long long ll; 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; ...
[["-", 49, 50, 51, 16, 12, 23, 0, 16, 12, 22], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 12, 22]]
1
161
H1, M1, H2, M2, K = map(int, input().split()) hk = K//60 mk = K%60 ans = (H2 - hk)*60 + (M2 - mk) - (H1*60 + M2) print(max(ans, 0))
H1, M1, H2, M2, K = map(int, input().split()) hk = K//60 mk = K%60 ans = (H2 - hk)*60 + (M2 - mk) - (H1*60 + M1) print(max(ans, 0))
[["-", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22]]
5
64
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using ll = long long; using namespace std; constexpr int MOD = 1e9 + 7; constexpr ll ...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using ll = long long; using namespace std; constexpr int MOD = 1e9 + 7; constexpr ll ...
[["-", 49, 50, 51, 16, 31, 16, 31, 16, 17, 33], ["+", 49, 50, 51, 16, 31, 16, 31, 16, 17, 72]]
1
111
import sys """ H1時M1分起床 H2時M2分就寝 K分勉強 """ H1, M1, H2, M2, K = map(int, sys.stdin.read().split()) awake_time = H1 *60 + M1 sleep_time = H2 *60 + M1 start_limit_time = sleep_time - K can_study_time = start_limit_time - awake_time print(can_study_time)
import sys """ H1時M1分起床 H2時M2分就寝 K分勉強 """ H1, M1, H2, M2, K = map(int, sys.stdin.read().split()) awake_time = H1 *60 + M1 sleep_time = H2 *60 + M2 start_limit_time = sleep_time - K can_study_time = start_limit_time - awake_time print(can_study_time)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]]
5
59
#include <bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using P = pair<ll, ll>; template <typename T> using pq = priority_queue<T>; template <typename T> using minpq = priority_queue<T, vector<T>, greater<T>>; template <typename T, ty...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using vvl = vector<vl>; using vb = vector<bool>; using P = pair<ll, ll>; template <typename T> using pq = priority_queue<T>; template <typename T> using minpq = priority_queue<T, vector<T>, greater<T>>; template <typename T, ty...
[["-", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 48]]
1
490
#!/usr/bin/env python3 H1, M1, H2, M2, K = map(int, input().split()) ans = 0 if M1 <= M2: ans = (H2-H1) * 60 + M2 - M1 - K else: ans = (H2-H1) * 60 + (60-M1) + M2 - K if ans < 0: print(0) else: print(ans)
#!/usr/bin/env python3 H1, M1, H2, M2, K = map(int, input().split()) ans = 0 if M1 <= M2: ans = (H2-H1) * 60 + M2 - M1 - K else: ans = (H2-H1-1) * 60 + (60-M1) + M2 - K if ans < 0: print(0) else: print(ans)
[["+", 31, 657, 31, 657, 31, 23, 0, 657, 17, 33], ["+", 31, 657, 31, 657, 31, 23, 0, 657, 12, 612]]
5
82
h1, m1, h2, m2, k = list(map(int, readline().split())) x = (h2 - h1) * 60 + (m2 - m1) # 起きている時間の長さ(分) print(x - k)
h1, m1, h2, m2, k = map(int, input().split()) x = (h2 - h1) * 60 + (m2 - m1) # 起きている時間の長さ(分) print(x - k)
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22], ["+", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
47
#include <bits/stdc++.h> using namespace std; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; int minutes = abs(H2 - H1) * 60 + abs(M2 - M1); // cout << minutes - K << "\n"; int res = minutes - K > 0 ? minutes - K : 0; cout << res << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; int minutes = abs(H2 - H1) * 60 + M2 - M1; // cout << minutes << endl; // cout << minutes - K << "\n"; int res = minutes - K > 0 ? minutes - K : 0; cout << res << "\n"; return 0; }
[["-", 0, 43, 49, 50, 51, 16, 12, 2, 63, 22], ["-", 49, 50, 51, 16, 12, 2, 3, 4, 0, 24], ["-", 49, 50, 51, 16, 12, 2, 3, 4, 0, 25]]
1
81
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long ll; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; cout << H2 * 60 + M2 - H1 * 60 - M2 - K << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; typedef long long ll; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; cout << H2 * 60 + M2 - H1 * 60 - M1 - K << endl; return 0; }
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22]]
1
69
#include <bits/stdc++.h> //#define int long long int using namespace std; typedef long long int ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll H1, m1, H2, m2, k; cin >> H1 >> m1 >> H2 >> m2 >> k; cout << m2 - m1 + H2 - H1 - k; }
#include <bits/stdc++.h> //#define int long long int using namespace std; typedef long long int ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll H1, m1, H2, m2, k; cin >> H1 >> m1 >> H2 >> m2 >> k; cout << m2 - m1 + (H2 - H1) * 60 - k; }
[["+", 12, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 0, 16, 12, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 16, 12, 16, 31, 16, 12, 16, 12, 13]]
1
68
package main import ( "bufio" "bytes" "fmt" "io" "os" "strconv" ) var DEBUG = true func main() { defer Flush() H1 := readi() M1 := readi() H2 := readi() M2 := readi() K := readi() println(H2*60 + M2 - H1*60 + M1 - K) } // ----------------------------------------------------------------------------- /...
package main import ( "bufio" "bytes" "fmt" "io" "os" "strconv" ) var DEBUG = true func main() { defer Flush() H1 := readi() M1 := readi() H2 := readi() M2 := readi() K := readi() println(H2*60 + M2 - (H1*60 + M1) - K) } // ----------------------------------------------------------------------------- ...
[["+", 3, 4, 0, 16, 31, 16, 12, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 16, 12, 23, 0, 25]]
7
1,844
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <math.h> #include <string> using namespace std; int main() { int h1, h2, m1, m2; int k; cin >> h1 >> m1 >> h2 >> m2 >> k; h1 = h1 * 60 + m1; h2 = h2 * 60 + m2; int temp = h2 - h1; int flag = (h2 - h1) - k; if (flag < k) { pri...
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <math.h> #include <string> using namespace std; int main() { int h1, h2, m1, m2; int k; cin >> h1 >> m1 >> h2 >> m2 >> k; h1 = h1 * 60 + m1; h2 = h2 * 60 + m2; int temp = h2 - h1; int flag = (h2 - h1) - k; if (flag < 0) { pri...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
108
a, b, c, d, k = map(int, input().split()); x = 60*a + b y = 60*c + b print(y-x-k);
a, b, c, d, k = map(int, input().split()); x = 60*a + b y = 60*c + d print(y-x-k);
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]]
5
46
a, b, c, d, k = map(int, input().split()); x = 60*a + b y = 60*c + b if y>x: print(y-x-k); else: print(1440+y-x-k);
a, b, c, d, k = map(int, input().split()); x = 60*a + b y = 60*c + d if y>x: print(y-x-k); else: print(1440+y-x-k);
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]]
5
64
lines=gets.split(' ') line=[] lines.each do |b| line <<b.to_i end p line H1=line[0] M1=line[1] H2=line[2] M2=line[3] K=line[4] sleep=60*H2+M2 wake=60*H1+M1 p sleep-wake-K
lines=gets.split(' ') line=[] lines.each do |b| line <<b.to_i end H1=line[0] M1=line[1] H2=line[2] M2=line[3] K=line[4] sleep=60*H2+M2 wake=60*H1+M1 p sleep-wake-K
[["-", 36, 36, 36, 36, 0, 42, 0, 768, 0, 769], ["+", 36, 36, 36, 36, 0, 42, 0, 768, 0, 769]]
4
27
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; cout << max(0, (h2 * 60 + m2) - (h1 * 60 + m1) - 30) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int h1, m1, h2, m2, k; cin >> h1 >> m1 >> h2 >> m2 >> k; cout << max(0, (h2 * 60 + m2) - (h1 * 60 + m1) - k) << endl; return 0; }
[["-", 31, 16, 12, 2, 3, 4, 0, 16, 12, 13], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 12, 22]]
1
65
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, E; cin >> A >> B >> C >> D >> E; int hour = 0; int minutes = 0; hour = C - A; minutes = D - B; int goukei = 0; hour = hour * 60; goukei = hour - E; cout << goukei << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, E; cin >> A >> B >> C >> D >> E; int hour = 0; int minutes = 0; hour = C - A; minutes = D - B; int goukei = 0; hour = hour * 60; goukei = (hour + minutes) - E; cout << goukei << endl; }
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
80
H1, M1, H2, M2, K = map(int, input().split()) H = (H2 - H1) * 60 M = M2 - M1 res = (H+M) - K if res >= K: print(res) else: print(0)
H1, M1, H2, M2, K = map(int, input().split()) H = (H2 - H1) * 60 M = M2 - M1 res = (H+M) if res >= K: print(res - K) else: print(0)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
60
h1,m1,h2,m2,k=map(int,input().split()) if h1==h2: print(m2-m1-k) else: print((60-m1)+(h2-h1-1)*60-k)
h1,m1,h2,m2,k=map(int,input().split()) if h1==h2: print(m2-m1-k) else: print((60-m1)+(h2-h1-1)*60-k+m2)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
57
h1,m1,h2,m2,k = map(int,input().split()) dm = m2 - m1 if h2 < h1: h2 +=24 if dm < 0: h2 -= 1 dm = 60 - dm print((h2 - h1)*60 + dm - k)
h1,m1,h2,m2,k = map(int,input().split()) dm = m2 - m1 if h2 < h1: h2 +=24 if dm < 0: h2 -= 1 dm = 60 + dm print((h2 - h1)*60 + dm - k)
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72]]
5
62
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, s, n) for (int i = (s); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() //#define _GLIBCXX_DEBUG int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; cout << (H2 - H1) * 60 - (M2 - M1) - K << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, s, n) for (int i = (s); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() //#define _GLIBCXX_DEBUG int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; cout << (H2 - H1) * 60 + (M2 - M1) - K << endl; }
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 33], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 72]]
1
78
h1, m1, h2, m2, k = gets.split.map(&:to_i) h_diff = h2 - h1 m_diff = m2 - m1 total_min = h_diff * 60 - m_diff ans_min = total_min - k p ans_min
h1, m1, h2, m2, k = gets.split.map(&:to_i) h_diff = h2 - h1 m_diff = m2 - m1 total_min = h_diff * 60 + m_diff ans_min = total_min - k p ans_min
[["-", 36, 36, 0, 493, 0, 662, 12, 738, 17, 33], ["+", 36, 36, 0, 493, 0, 662, 12, 738, 17, 72]]
4
43
#include <bits/stdc++.h> #include <iostream> #include <sstream> using namespace std; #define int long long #define pb push_back #define mp make_pair #define F first #define S second signed main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); // freopen("input.txt", "r", stdin); // freopen("out...
#include <bits/stdc++.h> #include <iostream> #include <sstream> using namespace std; #define int long long #define pb push_back #define mp make_pair #define F first #define S second signed main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); // freopen("input.txt", "r", stdin); // freopen("out...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 85], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
110
/* nuttela - Soham Chakrabarti */ #include <bits/stdc++.h> using namespace std; #define io \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define all(v) v.begin(), v.end() #define pb push_back #def...
/* nuttela - Soham Chakrabarti */ #include <bits/stdc++.h> using namespace std; #define io \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define all(v) v.begin(), v.end() #define pb push_back #def...
[["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]]
1
183
h1, m1, h2, m2, k = map(int, input().split()) ans = (h2 - h1) * 60 - (m2 -m1) - k print(ans)
h1, m1, h2, m2, k = map(int, input().split()) ans = (h2 - h1) * 60 + (m2 -m1) - k print(ans)
[["-", 0, 1, 0, 662, 12, 657, 31, 657, 17, 33], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 72]]
5
43
#include <iostream> #include <string> using namespace std; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; int Htemp = H2 - H1; int HhenkanM = Htemp * 60; int Ans = HhenkanM + M2 - M1; cout << Ans << endl; }
#include <iostream> #include <string> using namespace std; int main() { int H1, M1, H2, M2, K; cin >> H1 >> M1 >> H2 >> M2 >> K; int Htemp = H2 - H1; int HhenkanM = Htemp * 60; int Ans = HhenkanM + M2 - M1 - K; cout << Ans << endl; }
[["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]]
1
66
h1, m1, h2, m2, k = map(int, input().split()) print((h2 * 60 + m2 - 1 - h1 * 60 - m1) // k * k)
h1, m1, h2, m2, k = map(int, input().split()) print((h2 * 60 + m2 - k - h1 * 60 - m1))
[["-", 31, 23, 0, 657, 31, 657, 31, 657, 12, 612], ["+", 0, 23, 0, 657, 31, 657, 31, 657, 12, 22], ["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 676], ["-", 0, 652, 3, 4, 0, 657, 31, 657, 12, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]]
5
44
H1, M1, H2, M2, K = map(int, input().split()) A=60*H2+M1 - K r=A-60*H1-M1 if(0<=r): print(r) else: print("0")
H1, M1, H2, M2, K = map(int, input().split()) A=60*H2+M2 - K r=A-60*H1-M1 if(0<=r): print(r) else: print("0")
[["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22]]
5
59
H1, M1, H2, M2, K = map(int, input().split()) if H1 > H2 or (H1 == H2 and M1 >= M2): H2 += 24 diff_min = H2*60 + M2 - (H1*60 + M1) if diff_min - K < 0: print(0) else: diff_min - K
H1, M1, H2, M2, K = map(int, input().split()) if H1 > H2 or (H1 == H2 and M1 >= M2): H2 += 24 diff_min = H2*60 + M2 - (H1*60 + M1) if diff_min - K < 0: print(0) else: print(diff_min - K)
[["+", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
71
import java.util.*; 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(); if ((h2 - h1) * 60 + (m2 - m1) - k >= 0) { Syste...
import java.util.*; 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(); if ((h2 - h1) * 60 + (m2 - m1) - k >= 0) { Syste...
[["-", 0, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["-", 0, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 12, 22]]
3
137
h1, m1, h2, m2, k = map(int, input().split()) start = m2 + 60*h1 end = m2 + 60*h2 print(end-start-k)
h1, m1, h2, m2, k = map(int, input().split()) start = m1 + 60*h1 end = m2 + 60*h2 print(end-start-k)
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22]]
5
44
#include <bits/stdc++.h> using namespace std; using I = long long; using U = unsigned long long; using F = long double; template <typename T> using Vec = vector<T>; template <typename K, typename V> using HashMap = unordered_map<K, V>; template <typename T> using HashSet = unordered_set<T>; template <typename T> usi...
#include <bits/stdc++.h> using namespace std; using I = long long; using U = unsigned long long; using F = long double; template <typename T> using Vec = vector<T>; template <typename K, typename V> using HashMap = unordered_map<K, V>; template <typename T> using HashSet = unordered_set<T>; template <typename T> usi...
[["-", 49, 50, 51, 16, 12, 69, 341, 342, 0, 13], ["+", 49, 50, 51, 16, 12, 69, 341, 342, 0, 13]]
1
283
#include <bits/stdc++.h> #include <iostream> #define int double #define vi vector<int> #define vvi vector<vi> #define fo(i, a, b) for (int i = a; i < b; i++) #define start() \ int t; \ ...
#include <bits/stdc++.h> #include <iostream> #define int double #define vi vector<int> #define vvi vector<vi> #define fo(i, a, b) for (int i = a; i < b; i++) #define start() \ int t; \ ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
154
#include <bits/stdc++.h> #include <ext/rope> #define min3(a, b, c) min(a, min(b, c)) #define max3(a, b, c) max(a, max(b, c)) #define min4(a, b, c, d) min(min(a, b), min(c, d)) #define max4(a, b, c, d) max(max(a, b), max(c, d)) #define count_one(a) \ __builti...
#include <bits/stdc++.h> #include <ext/rope> #define min3(a, b, c) min(a, min(b, c)) #define max3(a, b, c) max(a, max(b, c)) #define min4(a, b, c, d) min(min(a, b), min(c, d)) #define max4(a, b, c, d) max(max(a, b), max(c, d)) #define count_one(a) \ __builti...
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72]]
1
218
#include <bits/stdc++.h> #define rep(i, n) for (int(i) = 0; (i) < (n); i++) #define ll long long using namespace std; int main() { ll H1 = 0, M1 = 0, H2 = 0, M2 = 0, K = 0, H = 0; cin >> H1 >> M1 >> H2 >> M2 >> K; if (M1 <= M2) { cout << (H2 - H1) * 60 + (M2 - M1) - K; } else { cout << (H2 - H1 - 1) * ...
#include <bits/stdc++.h> #define rep(i, n) for (int(i) = 0; (i) < (n); i++) #define ll long long using namespace std; int main() { ll H1 = 0, M1 = 0, H2 = 0, M2 = 0, K = 0, H = 0; cin >> H1 >> M1 >> H2 >> M2 >> K; if (M1 <= M2) { cout << (H2 - H1) * 60 + (M2 - M1) - K; } else { cout << (H2 - H1 - 1) * ...
[["+", 12, 16, 31, 16, 12, 23, 0, 16, 31, 13], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 31, 16, 12, 23, 0, 16, 12, 23, 0, 24], ["+", 31, 16, 12, 23, 0, 16, 12, 23, 0, 25]]
1
109