Submission #70757567


Source Code Expand

#include <bits/stdc++.h>

#include <atcoder/all>

using namespace std;
using namespace atcoder;

#define int long long
#define ALL(x) (x).begin(), (x).end()
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))

typedef pair<int, int> PI;
typedef pair<int, pair<int, int>> PII;
static const int INF = 1010000000000000017LL;
static const double eps = 1e-12;
static const double pi = 3.14159265358979323846;
static const int dx[4] = {1, -1, 0, 0};
static const int dy[4] = {0, 0, 1, -1};
static const int ddx[8] = {1, -1, 0, 0, 1, 1, -1, -1};
static const int ddy[8] = {0, 0, 1, -1, 1, -1, 1, -1};

template <class T>
inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T>
inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

int H, B;

signed main() {
    cin >> H >> B;
    cout << max(H - B, 0ll) << endl;
}

Submission Info

Submission Time
Task A - Robot Balance
User tsuyosshi
Language C++23 (GCC 15.2.0)
Score 100
Code Size 1002 Byte
Status AC
Exec Time 1 ms
Memory 3628 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 12
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3380 KiB
00_sample_01.txt AC 1 ms 3628 KiB
00_sample_02.txt AC 1 ms 3468 KiB
01_random_03.txt AC 1 ms 3420 KiB
01_random_04.txt AC 1 ms 3468 KiB
01_random_05.txt AC 1 ms 3492 KiB
01_random_06.txt AC 1 ms 3536 KiB
01_random_07.txt AC 1 ms 3628 KiB
01_random_08.txt AC 1 ms 3536 KiB
01_random_09.txt AC 1 ms 3408 KiB
01_random_10.txt AC 1 ms 3536 KiB
01_random_11.txt AC 1 ms 3492 KiB