結果
| 問題 |
No.781 円周上の格子点の数え上げ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-18 15:06:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 566 bytes |
| コンパイル時間 | 1,491 ms |
| コンパイル使用メモリ | 169,668 KB |
| 実行使用メモリ | 137,364 KB |
| 最終ジャッジ日時 | 2024-10-01 14:06:40 |
| 合計ジャッジ時間 | 6,082 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 13 RE * 4 TLE * 1 -- * 3 |
ソースコード
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll x,y;
std::cin >> x>>y;
// unordered_map<ll,ll> cou;
vector<ll> cou(16500000,0);
ll sq = (int)sqrt(y);
for (ll i = 1; i <= sq; i++) {
for (ll j = 0; j <= sq; j++) {
cou[i*i+j*j]++;
// 1+1;
}
// std::cout << i << std::endl;
}
ll result = -1;
for (ll i = x; i <= y; i++) {
std::cout << i << std::endl;
result = max(result,cou[i]);
}
std::cout << result*4 << std::endl;
}