結果
| 問題 |
No.781 円周上の格子点の数え上げ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-18 14:42:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 491 bytes |
| コンパイル時間 | 1,828 ms |
| コンパイル使用メモリ | 172,892 KB |
| 実行使用メモリ | 107,048 KB |
| 最終ジャッジ日時 | 2024-10-01 14:05:19 |
| 合計ジャッジ時間 | 5,722 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 TLE * 1 -- * 12 |
ソースコード
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;
ll sq = (int)sqrt(y);
for (ll i = 1; i <= sq; i++) {
for (ll j = 0; j <= sq; j++) {
cou[i*i+j*j]++;
// std::cout << i<<" "<<j << std::endl;
}
}
ll result = -1;
for (int i = x; i <= y; i++) {
result = max(result,cou[i]);
}
std::cout << result*4 << std::endl;
}