Submission #22609813
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
int main () {
int A, B, C;
cin >> A >> B >> C;
vector<int> vec(3);
vec.at(0) = A;
vec.at(1) = B;
vec.at(2) = C;
sort(vec.begin(), vec.end());
if(vec.at(2) - vec.at(1) == vec.at(1) - vec.at(0)){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Tiny Arithmetic Sequence |
| User | Awes |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 404 Byte |
| Status | AC |
| Exec Time | 9 ms |
| Memory | 3632 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 | 3500 KiB |
| 001.txt | AC | 2 ms | 3500 KiB |
| 002.txt | AC | 2 ms | 3600 KiB |
| 003.txt | AC | 1 ms | 3500 KiB |
| 004.txt | AC | 2 ms | 3600 KiB |
| 005.txt | AC | 2 ms | 3632 KiB |
| 006.txt | AC | 2 ms | 3580 KiB |
| example0.txt | AC | 2 ms | 3632 KiB |
| example1.txt | AC | 2 ms | 3632 KiB |
| example2.txt | AC | 2 ms | 3604 KiB |