Submission #23039164


Source Code Expand

#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
 
struct Edge {
  int to;
  long long w;
  Edge(int to, long long w) : to(to), w(w) {}
};
 
//using Graph = vector<vector<int> >;
//using Graph = vector<vector<Edge> >;
 
template<class T> void chmax(T& a, T b) {
  if(a < b) a = b;
}
template<class T> void chmin(T& a, T b) {
  if(a > b) a = b;
}
 
 
struct UnionFind {
  vector<long long> par, siz;
 
  UnionFind(long long n) : par(n, -1), siz(n, 1){}
 
  long long root(long long x) {
    if(par[x] == -1) return x;
    else return par[x] = root(par[x]);
  }
 
  bool issame(long long x, long long y) {
    return root(x) == root(y);
  }
 
  bool unite(long long x, long long 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;
  }
 
  long long size(long long x) {
    return siz[root(x)];
  }
};
 

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  if(a == b) {
    cout << c << endl;
    return 0;
  }
  else if(b == c) {
    cout << a << endl;
    return 0;
  } else if(a == c) {
    cout << b << endl;
    return 0;
  } 
  else {
    cout << 0 << endl;
    return 0;
  }
}

Submission Info

Submission Time
Task A - Chinchirorin
User Tommy3
Language C++ (GCC 9.2.1)
Score 100
Code Size 1417 Byte
Status AC
Exec Time 7 ms
Memory 3624 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 8
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt
Case Name Status Exec Time Memory
example_00.txt AC 7 ms 3444 KiB
example_01.txt AC 2 ms 3400 KiB
example_02.txt AC 2 ms 3452 KiB
test_00.txt AC 2 ms 3408 KiB
test_01.txt AC 2 ms 3596 KiB
test_02.txt AC 3 ms 3572 KiB
test_03.txt AC 2 ms 3396 KiB
test_04.txt AC 2 ms 3624 KiB