結果
| 問題 | No.1987 Sandglass Inconvenience |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-24 22:30:35 |
| 言語 | C++17(clang) (clang++ 22.1.2 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 730 bytes |
| 記録 | |
| コンパイル時間 | 7,638 ms |
| コンパイル使用メモリ | 154,324 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-08 20:31:38 |
| 合計ジャッジ時間 | 6,869 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 4 |
ソースコード
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
ll a, b, c, x;
cin >> a >> b >> c >> x;
ll A[3] = {-a, 0, a};
ll B[3] = {-b, 0, b};
ll C[3] = {-c, 0, c};
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 3; j++) {
for(int k = 0; k < 3; k++) {
ll num = A[i] + B[j] + C[k];
if(num == 0) {
continue;
}
if(x % num == 0) {
cout << "Yes\n";
return 0;
}
}
}
}
cout << "No\n";
return 0;
}