結果
| 問題 | No.781 円周上の格子点の数え上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-15 10:18:45 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 330 bytes |
| 記録 | |
| コンパイル時間 | 1,127 ms |
| コンパイル使用メモリ | 189,136 KB |
| 実行使用メモリ | 106,752 KB |
| 最終ジャッジ日時 | 2026-03-28 12:43:26 |
| 合計ジャッジ時間 | 4,596 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 TLE * 1 -- * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin>>x>>y;
map<int, int> cnt;
for (int i=0; i<=min(sqrt(y), 1e4); i++) {
for (int j=1; j<=min(sqrt(y), 1e4); j++) {
++cnt[i*i + j*j];
}
}
int ans = 0;
for (int i=x; i<=y; i++) {
ans = max(cnt[i], ans);
}
cout<<4*ans<<endl;
}