Submission #22645993
Source Code Expand
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
vector<int> A(3);
cin >> A[0] >> A[1] >> A[2];
sort(A.begin(), A.end());
if(A[2] - A[1] == A[1] - A[0]) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Tiny Arithmetic Sequence |
| User | Tommy3 |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 293 Byte |
| Status | AC |
| Exec Time | 9 ms |
| Memory | 3568 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 | 9 ms | 3464 KiB |
| 001.txt | AC | 2 ms | 3564 KiB |
| 002.txt | AC | 2 ms | 3436 KiB |
| 003.txt | AC | 2 ms | 3516 KiB |
| 004.txt | AC | 2 ms | 3512 KiB |
| 005.txt | AC | 2 ms | 3520 KiB |
| 006.txt | AC | 2 ms | 3568 KiB |
| example0.txt | AC | 2 ms | 3448 KiB |
| example1.txt | AC | 2 ms | 3408 KiB |
| example2.txt | AC | 3 ms | 3380 KiB |