Submission #23755734
Source Code Expand
#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <algorithm>
using namespace std;
using ll = long long;
using ld = long double;
#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[x] = y;
siz[x] += siz[y];
return true;
}
int size(int x) {
return siz[root(x)];
}
};
int main() {
vector<int> a(3);
rep(i, 3) cin >> a[i];
sort(a.begin(), a.end());
cout << a[1] + a[2] << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Repression |
| User | Tommy3 |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 1150 Byte |
| Status | AC |
| Exec Time | 5 ms |
| Memory | 3620 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, example0.txt, example1.txt, example2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 5 ms | 3588 KiB |
| 001.txt | AC | 2 ms | 3468 KiB |
| 002.txt | AC | 3 ms | 3488 KiB |
| 003.txt | AC | 3 ms | 3588 KiB |
| 004.txt | AC | 2 ms | 3572 KiB |
| 005.txt | AC | 2 ms | 3548 KiB |
| 006.txt | AC | 2 ms | 3620 KiB |
| example0.txt | AC | 3 ms | 3532 KiB |
| example1.txt | AC | 2 ms | 3536 KiB |
| example2.txt | AC | 2 ms | 3492 KiB |