結果
問題 |
No.781 円周上の格子点の数え上げ
|
ユーザー |
|
提出日時 | 2019-12-07 15:26:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 512 bytes |
コンパイル時間 | 1,583 ms |
コンパイル使用メモリ | 174,588 KB |
実行使用メモリ | 78,500 KB |
最終ジャッジ日時 | 2024-12-25 20:35:54 |
合計ジャッジ時間 | 12,779 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 TLE * 3 |
ソースコード
#include <bits/stdc++.h> typedef long long ll; using namespace std; #define all(x) (x).begin(), (x).end() #define MOD 1000000007 int main() { ll x, y; cin >> x >> y; map<ll, ll> mp; for(int i = -3163; i <= 3163; i++) { for(int j = -3163; j <= 3163; j++) { if(x <= i * i + j * j && i * i + j * j <= y) { mp[i * i + j * j]++; } } } ll ans = 0; for(auto e : mp) { ans = max(ans, e.second); } cout << ans << endl; }