結果

問題 No.781 円周上の格子点の数え上げ
ユーザー leaf_1415leaf_1415
提出日時 2019-01-11 21:40:53
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 469 bytes
コンパイル時間 560 ms
コンパイル使用メモリ 59,180 KB
実行使用メモリ 11,916 KB
最終ジャッジ日時 2023-08-20 04:58:11
合計ジャッジ時間 3,478 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
11,584 KB
testcase_01 AC 65 ms
11,588 KB
testcase_02 AC 70 ms
11,644 KB
testcase_03 AC 66 ms
11,652 KB
testcase_04 AC 66 ms
11,592 KB
testcase_05 AC 65 ms
11,592 KB
testcase_06 AC 67 ms
11,596 KB
testcase_07 AC 66 ms
11,576 KB
testcase_08 WA -
testcase_09 AC 65 ms
11,580 KB
testcase_10 AC 65 ms
11,636 KB
testcase_11 AC 65 ms
11,784 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 65 ms
11,640 KB
testcase_15 AC 64 ms
11,648 KB
testcase_16 AC 65 ms
11,592 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 < 1000005) 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;
}
0