結果
問題 |
No.781 円周上の格子点の数え上げ
|
ユーザー |
|
提出日時 | 2019-08-18 14:41:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 493 bytes |
コンパイル時間 | 10,742 ms |
コンパイル使用メモリ | 174,032 KB |
実行使用メモリ | 112,804 KB |
最終ジャッジ日時 | 2024-10-01 14:05:13 |
合計ジャッジ時間 | 5,140 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 TLE * 3 -- * 8 |
ソースコード
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 (int i = 1; i <= sq; i++) { for (int 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; }