結果
| 問題 |
No.781 円周上の格子点の数え上げ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-15 10:18:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 330 bytes |
| コンパイル時間 | 1,717 ms |
| コンパイル使用メモリ | 175,472 KB |
| 実行使用メモリ | 14,016 KB |
| 最終ジャッジ日時 | 2024-07-06 22:40:25 |
| 合計ジャッジ時間 | 5,408 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}