結果

問題 No.781 円周上の格子点の数え上げ
ユーザー CleyLCleyL
提出日時 2023-03-28 15:22:33
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 330 bytes
コンパイル時間 696 ms
コンパイル使用メモリ 80,956 KB
実行使用メモリ 57,304 KB
最終ジャッジ日時 2023-10-20 09:40:55
合計ジャッジ時間 4,883 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
8,696 KB
testcase_01 AC 27 ms
4,348 KB
testcase_02 AC 26 ms
4,348 KB
testcase_03 AC 26 ms
4,348 KB
testcase_04 AC 26 ms
4,348 KB
testcase_05 AC 26 ms
4,348 KB
testcase_06 AC 26 ms
4,348 KB
testcase_07 AC 26 ms
4,348 KB
testcase_08 AC 26 ms
4,348 KB
testcase_09 AC 26 ms
4,348 KB
testcase_10 AC 28 ms
4,348 KB
testcase_11 AC 32 ms
4,348 KB
testcase_12 TLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>
using namespace std;
int main(){
  map<int,int> A;
  int x,y;cin>>x>>y;
  for(int i = 1; 4000 > i; i++){
    for(int j = 0; 4000 > j; j++){
      if(x <= i*i+j*j && i*i+j*j <= y)A[i*i+j*j]++;
    }
  }
  int ans = 0;
  for(auto x: A){
    ans = max(ans,x.second);
  }
  cout << ans*4 << endl;
}
0