結果
問題 | No.781 円周上の格子点の数え上げ |
ユーザー | m-44 |
提出日時 | 2019-09-15 10:18:45 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 330 bytes |
コンパイル時間 | 1,646 ms |
コンパイル使用メモリ | 173,220 KB |
実行使用メモリ | 89,264 KB |
最終ジャッジ日時 | 2023-09-21 04:02:33 |
合計ジャッジ時間 | 5,697 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 2 ms
4,376 KB |
testcase_06 | AC | 9 ms
4,376 KB |
testcase_07 | AC | 21 ms
5,024 KB |
testcase_08 | TLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
ソースコード
#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; }