Submission #22640618
Source Code Expand
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std;
void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
∧_∧
∧_∧ (´<_` ) Welcome to My Coding Space!
( ´_ゝ`) / ⌒i @hamayanhamayan0
/ \ | |
/ / ̄ ̄ ̄ ̄/ |
__(__ニつ/ _/ .| .|____
\/____/ (u ⊃
---------------------------------------------------------------------------------------------------*/
int A[3];
//---------------------------------------------------------------------------------------------------
void _main() {
rep(i, 0, 3) cin >> A[i];
rep(i, 0, 3) {
int lft = 0;
rep(j, 0, 3) if (i != j) lft += A[j];
int rht = A[i] * 2;
if (lft == rht) {
cout << "Yes" << endl;
return;
}
}
cout << "No" << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Tiny Arithmetic Sequence |
| User | hamayanhamayan |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 1646 Byte |
| Status | AC |
| Exec Time | 8 ms |
| Memory | 3660 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 | 8 ms | 3516 KiB |
| 001.txt | AC | 2 ms | 3524 KiB |
| 002.txt | AC | 3 ms | 3516 KiB |
| 003.txt | AC | 2 ms | 3660 KiB |
| 004.txt | AC | 2 ms | 3544 KiB |
| 005.txt | AC | 2 ms | 3572 KiB |
| 006.txt | AC | 2 ms | 3460 KiB |
| example0.txt | AC | 3 ms | 3532 KiB |
| example1.txt | AC | 2 ms | 3600 KiB |
| example2.txt | AC | 2 ms | 3588 KiB |