結果

問題 No.781 円周上の格子点の数え上げ
ユーザー xxxasdfghjkxxxasdfghjk
提出日時 2019-02-23 17:37:46
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 389 bytes
コンパイル時間 2,682 ms
コンパイル使用メモリ 143,112 KB
実行使用メモリ 42,736 KB
最終ジャッジ日時 2023-08-20 11:51:52
合計ジャッジ時間 5,960 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 143 ms
42,464 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 142 ms
42,464 KB
testcase_08 WA -
testcase_09 AC 149 ms
42,456 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int mem[10000001];
int main(){
    int x,y,res=0;
    cin >> x >> y;
    for(int i=0;i<10000001;i++)mem[i] = 0;
    for(int i=0;i<4001;i++)for(int j=0;j<4001;j++){
        if(i*i+j*j <= 10000001)
            mem[i*i+j*j]++;
    }
    for(int i=x;i<=y;i++)res = max(res,mem[i]);
    cout << res << endl;
    return 0;
}
0