結果
| 問題 | No.781 円周上の格子点の数え上げ | 
| コンテスト | |
| ユーザー |  titia | 
| 提出日時 | 2019-01-11 22:56:28 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 660 bytes | 
| コンパイル時間 | 1,670 ms | 
| コンパイル使用メモリ | 194,544 KB | 
| 最終ジャッジ日時 | 2025-01-06 20:24:37 | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 20 WA * 1 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
  int X,Y;
  cin >> X>>Y;
  int N=10000000;
  int u=3162;
  vector<int> LIST(N+1);
  for (int i=1;i<u+1;i++){
    LIST.at(i*i)+=4;
  }
  for (int i=1;i<u+1;i++){
    for (int j=i+1;j<u+1;j++){
        if (i*i+j*j<=10000000){
            if (i!=j){
                LIST.at(i*i+j*j)+=8;
            }else
            {
                LIST.at(i*i+j*j)+=4;
            }
        }
    }
  }
  int ANS=0;
  for (int i=X;i<Y+1;i++){
    if (LIST.at(i)>ANS){
        ANS=LIST.at(i);
    }
  }
  //cout<<u <<endl;
  //cout<<X <<Y <<N <<endl;
  cout<<ANS<<endl;
}
            
            
            
        