結果
| 問題 |
No.781 円周上の格子点の数え上げ
|
| コンテスト | |
| ユーザー |
leaf_1415
|
| 提出日時 | 2019-01-11 21:40:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 469 bytes |
| コンパイル時間 | 437 ms |
| コンパイル使用メモリ | 59,888 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2024-11-30 05:07:04 |
| 合計ジャッジ時間 | 2,718 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 7 |
ソースコード
#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;
}
leaf_1415