結果
| 問題 | No.781 円周上の格子点の数え上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-12-31 13:39:23 |
| 言語 | C++17(clang) (17.0.6 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 510 bytes |
| 記録 | |
| コンパイル時間 | 10,605 ms |
| コンパイル使用メモリ | 177,920 KB |
| 実行使用メモリ | 81,652 KB |
| 最終ジャッジ日時 | 2024-09-27 17:05:26 |
| 合計ジャッジ時間 | 11,971 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 2 |
ソースコード
#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;
}