結果
| 問題 | No.781 円周上の格子点の数え上げ | 
| コンテスト | |
| ユーザー |  leaf_1415 | 
| 提出日時 | 2019-01-11 21:41:26 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 305 ms / 2,000 ms | 
| コード長 | 470 bytes | 
| コンパイル時間 | 545 ms | 
| コンパイル使用メモリ | 61,096 KB | 
| 実行使用メモリ | 81,664 KB | 
| 最終ジャッジ日時 | 2024-11-30 05:09:05 | 
| 合計ジャッジ時間 | 8,047 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 21 | 
ソースコード
#include <iostream>
#include <vector>
#define llint long long
using namespace std;
llint x, y;
vector<llint> vec;
llint cnt[10000005];
int main(void)
{
	cin >> x >> y;
	
	for(int i = 0; i*i <= 10000000; i++) vec.push_back(i*i);
	
	llint N = 3500;
	for(int i = -N; i <= N; i++){
		for(int j = -N; j <= N; j++){
			if(i*i+j*j < 10000005) cnt[i*i+j*j]++;
		}
	}
	
	llint ans = 0;
	for(int i = x; i <= y; i++) ans = max(ans, cnt[i]);
	cout << ans << endl;
	
	return 0;
}
            
            
            
        