Submission #13749760


Source Code Expand

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
#include<stdio.h>
#include <cstdint>
#include <stdlib.h> 
#include <time.h>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define drep(i,n,m) for(int i = n;i >= m;i--)
#define rrep(i,n) REP(i,1,n+1)
#define all(a) a.begin(), a.end()
#define fi first
#define se second
#define RNG(x, a, n) &((x)[a]), &((x)[n])
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
typedef long long ll;
typedef pair<ll, ll> Pll;
typedef pair<int, int> PII;
typedef vector<ll> Vl;
typedef vector<int> VI;
typedef tuple<int, int, int> TT;
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define rall(v) v.rbegin(), v.rend()
#define dmp(x,y) make_pair(x,y)
#define dmt(x, y, z) make_tuple(x, y, z)
#define pb(x) push_back(x)
#define pf(x) push_front(x)
const int MAX = 500000;
const int inf = 1000000007;
const ll mod = 1000000007;
const long double PI = (acos(-1));
const long double EPS = 0.0000000001;

int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, 1, 0, -1 };




int sh, sm, eh, em, k;

int main() {

	cin >> sh >> sm >> eh >> em >> k;

	em -= k;

	if (em < 0) {
		eh--;
		em += 60;
	}

	cout << (eh - sh) * 60 + (em - sm) << endl;

}

Submission Info

Submission Time
Task A - Study Scheduling
User tatiuo
Language C++ (GCC 9.2.1)
Score 100
Code Size 1645 Byte
Status AC
Exec Time 2 ms
Memory 3636 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 13
Set Name Test Cases
Sample s1.txt, s2.txt
All 0.txt, 1.txt, 10.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, s1.txt, s2.txt
Case Name Status Exec Time Memory
0.txt AC 2 ms 3384 KiB
1.txt AC 2 ms 3588 KiB
10.txt AC 2 ms 3636 KiB
2.txt AC 2 ms 3568 KiB
3.txt AC 2 ms 3588 KiB
4.txt AC 2 ms 3388 KiB
5.txt AC 2 ms 3576 KiB
6.txt AC 2 ms 3592 KiB
7.txt AC 2 ms 3592 KiB
8.txt AC 2 ms 3632 KiB
9.txt AC 2 ms 3592 KiB
s1.txt AC 2 ms 3544 KiB
s2.txt AC 2 ms 3432 KiB