結果
問題 | No.781 円周上の格子点の数え上げ |
ユーザー | xxxasdfghjk |
提出日時 | 2019-02-23 17:43:18 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 505 bytes |
コンパイル時間 | 1,383 ms |
コンパイル使用メモリ | 143,752 KB |
実行使用メモリ | 42,724 KB |
最終ジャッジ日時 | 2023-08-20 11:52:00 |
合計ジャッジ時間 | 5,210 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 138 ms
42,472 KB |
testcase_01 | AC | 142 ms
42,500 KB |
testcase_02 | AC | 136 ms
42,496 KB |
testcase_03 | AC | 138 ms
42,400 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 132 ms
42,408 KB |
testcase_08 | WA | - |
testcase_09 | AC | 133 ms
42,444 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 | - |
ソースコード
#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=1;j<4001;j++){ if(i*i+j*j <= 10000001){ if(i == 0 || j == i) mem[i*i+j*j] += 4; else mem[i*i+j*j] += 8; } } for(int i=x;i<=y;i++)res = max(res,mem[i]); cout << res << endl; return 0; }