結果
| 問題 | No.1256 連続整数列 |
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2020-10-16 21:24:39 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 239µs | |
| コード長 | 448 bytes |
| 記録 | |
| コンパイル時間 | 861 ms |
| コンパイル使用メモリ | 187,420 KB |
| 実行使用メモリ | 9,352 KB |
| 最終ジャッジ日時 | 2026-07-12 12:23:15 |
| 合計ジャッジ時間 | 2,487 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 40 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int A;
cin >> A;
A *= 2;
vector<int> f;
for (int i = 1; i * i <= A; i++){
if (A % i == 0){
f.push_back(i);
f.push_back(A / i);
}
}
bool ok = false;
for (int x : f){
int y = A / x - 1;
if (x % 2 == y % 2 && y >= 3){
ok = true;
}
//r+l=x
//r-l=y
}
if (ok){
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
SSRS