結果
問題 | No.1337 Fair Otoshidama |
ユーザー |
|
提出日時 | 2023-06-19 02:39:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 3,299 bytes |
コンパイル時間 | 1,928 ms |
コンパイル使用メモリ | 201,224 KB |
最終ジャッジ日時 | 2025-02-14 22:51:32 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> Pll; typedef pair<ld, ld> Pdd; template<typename T> using MaxHeap = priority_queue<T>; template<typename T> using MinHeap = priority_queue<T, vector<T>, greater<T>>; #define REP(i, n) for(int i = 0; i < n; i++) #define REPR(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define FORR(i, m, n) for(int i = m; i >= n; i--) #define INF (ll)1e17 #define ALL(v) v.begin(), v.end() #define SZ(x) ((int)(x).size()) #define y0 y3487465 #define y1 y8687969 #define j0 j1347829 #define j1 j234892 #define next asdnext #define prev asdprev #define bit(n) (1LL<<(n)) #define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ); #define cauto const auto& #define pb push_back #define mp make_pair #define debug(v) if (debug_mode) cerr << v << "\t"; #define debugln(v) if (debug_mode) cerr << v << "\n"; #define debugP(v) if (debug_mode) cerr << "(" << v.first << ", " << v.second << ")\t"; #define dump(x) if (debug_mode) cerr << #x << " = " << (x) << "\t"; #define SP << " " << #define TB << "\t" << #ifdef _LOCAL bool debug_mode = true; #else bool debug_mode = false; #endif void show(const vector<ll>& arr, bool show_index = false, ll w = 4) { if (!debug_mode) return; ll max_value = 0; REP(i, SZ(arr)) { if (abs(INF - arr[i]) >= 1e5) max_value = max(max_value, arr[i]); } w = max(w, SZ(to_string(max_value))+1LL); if (show_index) { REP(i, arr.size()) { cout << right << setw(w) << i; } cout << endl; } REP(i, arr.size()){ if (abs(INF - arr[i]) < 1e5) { cout << right << setw(w) << (arr[i] == INF ? "INF" : "inf"); } else { cout << right << setw(w) << arr[i]; } } cout << endl; } void show(const vector<vector<ll>>& arr, ll w = 4) { if (!debug_mode) return; int M = arr.size(), N = arr[0].size(); ll max_value = 0; REP(i, M) REP(j, N) { if (abs(INF - arr[i][j]) >= 1e5) max_value = max(max_value, arr[i][j]); } w = max(w, SZ(to_string(max_value))+1LL); cout << right << setw(w) << "#"; REP(i, SZ(arr[0])) { cout << right << setw(w) << i; } cout << endl; REP(i, SZ(arr)) { cout << right << setw(w) << i; REP(j, SZ(arr[0])) { if (abs(INF - arr[i][j]) < 1e5) { cout << right << setw(w) << (arr[i][j] == INF ? "INF" : "inf"); } else { cout << right << setw(w) << arr[i][j]; } } cout << endl; } cout << endl; } void show(const vector<vector<vector<ll>>>& arr, ll w = 4) { if (!debug_mode) return; REP(i, arr.size()) { cout << "i: " << to_string(i) << endl; show(arr[i], w); } cout << endl; } inline vector<vector<vector<ll>>> make_vector(ll i, ll j, ll k) { vector<vector<vector<ll>>> v(i, vector<vector<ll>>(j, vector<ll>(k, 0))); return v; } inline vector<vector<ll>> make_vector(ll i, ll j) { vector<vector<ll>> v(i, vector<ll>(j, 0)); return v; } int main() { ll X, Y, Z; cin >> X >> Y >> Z; cout << ((X+Y+Z) % 3 == 0 ? "Yes" : "No") << endl; return 0; }