結果

問題 No.781 円周上の格子点の数え上げ
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-12-31 13:39:23
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 510 bytes
コンパイル時間 6,490 ms
コンパイル使用メモリ 175,688 KB
実行使用メモリ 81,596 KB
最終ジャッジ日時 2023-12-31 13:39:33
合計ジャッジ時間 7,676 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
6,676 KB
testcase_01 AC 30 ms
6,676 KB
testcase_02 AC 30 ms
6,676 KB
testcase_03 AC 29 ms
6,676 KB
testcase_04 AC 30 ms
6,676 KB
testcase_05 AC 30 ms
6,676 KB
testcase_06 AC 30 ms
6,676 KB
testcase_07 AC 31 ms
6,676 KB
testcase_08 AC 311 ms
81,596 KB
testcase_09 AC 286 ms
81,596 KB
testcase_10 AC 30 ms
6,676 KB
testcase_11 AC 29 ms
6,676 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 32 ms
9,928 KB
testcase_15 AC 29 ms
6,676 KB
testcase_16 AC 30 ms
6,676 KB
testcase_17 AC 145 ms
50,888 KB
testcase_18 AC 142 ms
50,888 KB
testcase_19 AC 145 ms
52,936 KB
testcase_20 AC 145 ms
52,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>


using namespace std;
using namespace atcoder;
#define rep(i,m,n) for (int i = (int)(m); i < (int)(n); i++)
#define ll long long

int main(){

    ll x,y;
    cin >> x >> y ;
    ll m[10000001];
    rep(i,-3163,3163){
        rep(j,-3163,3163){
            ll v = i*i + j*j;
            if (v<=y){
            m[i*i + j*j] += 1;
            }}
    }
    ll ans = 0;
    rep(i,x,y+1){
        ans = max(ans,m[i]);
    };
    cout << ans << endl;
    return 0;

}
0