提出 #60940879


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
#define reps(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) reps(i, 0, n)
#define Rreps(i, n, e) for (int i = n - 1; i >= e; --i)
#define Rrep(i, n) Rreps(i, n, 0)
#define ALL(a) a.begin(), a.end()

using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;

ll N, M, H, W, Q, K, A, B;
string S;
using P = pair<ll, ll>;
const ll INF = (1LL << 60);

template <class T>
bool chmin(T &a, const T b)
{
    if (a > b)
    {
        a = b;
        return true;
    }
    else
        return false;
}
template <class T>
bool chmax(T &a, const T b)
{
    if (a < b)
    {
        a = b;
        return true;
    }
    else
        return false;
}
template <class T>
void my_printv(std::vector<T> v, bool endline = true)
{
    if (!v.empty())
    {
        for (std::size_t i{}; i < v.size() - 1; ++i)
            std::cout << v[i] << " ";
        std::cout << v.back();
    }
    if (endline)
        std::cout << std::endl;
}

int main()
{
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    vec a(3);
    rep(i, 3) cin >> a[i];
    sort(ALL(a));
    bool ok = (a[0] == a[2]) or (a[0] + a[1] == a[2]);

    cout << (ok ? "Yes" : "No") << endl;
}

提出情報

提出日時
問題 A - Equally
ユーザ carrot46
言語 C++ 20 (gcc 12.2)
得点 100
コード長 1273 Byte
結果 AC
実行時間 1 ms
メモリ 3592 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 18
セット名 テストケース
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_01.txt, 01_random_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, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt
ケース名 結果 実行時間 メモリ
00_sample_01.txt AC 1 ms 3504 KiB
00_sample_02.txt AC 1 ms 3416 KiB
00_sample_03.txt AC 1 ms 3328 KiB
01_random_01.txt AC 1 ms 3396 KiB
01_random_02.txt AC 1 ms 3424 KiB
01_random_03.txt AC 1 ms 3432 KiB
01_random_04.txt AC 1 ms 3420 KiB
01_random_05.txt AC 1 ms 3472 KiB
01_random_06.txt AC 1 ms 3592 KiB
01_random_07.txt AC 1 ms 3584 KiB
01_random_08.txt AC 1 ms 3456 KiB
01_random_09.txt AC 1 ms 3544 KiB
01_random_10.txt AC 1 ms 3416 KiB
01_random_11.txt AC 1 ms 3468 KiB
01_random_12.txt AC 1 ms 3348 KiB
01_random_13.txt AC 1 ms 3452 KiB
01_random_14.txt AC 1 ms 3456 KiB
01_random_15.txt AC 1 ms 3508 KiB