Submission #23460845


Source Code Expand

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <unordered_set>
#include <map>
#include <algorithm>
using namespace std;
using ll = long long;
#define rep(i, n) for(int i=0;i<(int)n;i++)

struct Edge {
  int to; // 隣接頂点番号
  long long w; // 重み
  Edge(int to, long long w) : to(to), w(w) {}
};
// using Graph = vector<vector<Edge> >
// using Graph = vector<vector<int> > 

struct UnionFind {
  vector<int> par, siz;

  UnionFind(int n) : par(n, -1), siz(n, 1) {}

  int root(int x) {
    if(par[x] == -1) return x;
    else return par[x] = root(par[x]);
  }

  bool issame(int x, int y) {
    return root(x) == root(y);
  }

  bool unite(int x, int y) {
    x = root(x); y = root(y);
    if(x == y) return false;

    if(siz[x] < siz[y]) swap(x, y);

    par[y] = x;
    siz[x] += siz[y];
    return true;
  }

  int size(int x) {
    return siz[root(x)];
  }
};

long long factorial(long long n) {
  if(n <= 0) return 1;

  long long fact = 0;
  for(long long i=1;i<=n;i++) fact *= i;
  return n;
}

long long aCb(long long a, long long b) {
  if(a < b) return 0;
  return factorial(a) / (factorial(a-b) * factorial(b));
}

int main() {
  ll A, B, C;
  cin >> A >> B >> C;

  ll pA = abs(A), pB = abs(B);

  if(C % 2 == 0) {
    if(pA == pB) cout << "=";
    if(pA > pB) cout << ">";
    if(pA < pB) cout << "<";
  } else {
    if(A == B) cout << "=";
    if(A > B) cout << ">";
    if(A < B) cout << "<";
  }
}

Submission Info

Submission Time
Task C - POW
User Tommy3
Language C++ (GCC 9.2.1)
Score 300
Code Size 1555 Byte
Status AC
Exec Time 7 ms
Memory 3636 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 28
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, random_26.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hand_01.txt AC 7 ms 3592 KiB
random_01.txt AC 3 ms 3524 KiB
random_02.txt AC 2 ms 3524 KiB
random_03.txt AC 2 ms 3388 KiB
random_04.txt AC 2 ms 3448 KiB
random_05.txt AC 2 ms 3580 KiB
random_06.txt AC 2 ms 3636 KiB
random_07.txt AC 2 ms 3596 KiB
random_08.txt AC 2 ms 3448 KiB
random_09.txt AC 2 ms 3440 KiB
random_10.txt AC 2 ms 3592 KiB
random_11.txt AC 3 ms 3564 KiB
random_12.txt AC 2 ms 3520 KiB
random_13.txt AC 2 ms 3620 KiB
random_14.txt AC 3 ms 3632 KiB
random_15.txt AC 2 ms 3432 KiB
random_16.txt AC 2 ms 3588 KiB
random_17.txt AC 2 ms 3576 KiB
random_18.txt AC 2 ms 3436 KiB
random_21.txt AC 2 ms 3436 KiB
random_22.txt AC 2 ms 3408 KiB
random_23.txt AC 2 ms 3432 KiB
random_24.txt AC 5 ms 3516 KiB
random_25.txt AC 2 ms 3592 KiB
random_26.txt AC 2 ms 3444 KiB
sample_01.txt AC 2 ms 3588 KiB
sample_02.txt AC 2 ms 3444 KiB
sample_03.txt AC 2 ms 3564 KiB