結果
| 問題 |
No.781 円周上の格子点の数え上げ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-19 20:16:11 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 161 ms / 2,000 ms |
| コード長 | 409 bytes |
| コンパイル時間 | 2,944 ms |
| コンパイル使用メモリ | 162,488 KB |
| 実行使用メモリ | 42,496 KB |
| 最終ジャッジ日時 | 2024-11-23 14:00:00 |
| 合計ジャッジ時間 | 4,081 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int cnt[10000100];
int main(void){
int x, y;
cin >> x >> y;
int ans = 0;
for(int i = 0; i * i <= y; i++){
for(int j = 1; i * i + j * j <= y; j++){
if(i * i + j * j >= x){
cnt[i * i + j * j]++;
ans = max(ans, cnt[i * i + j * j]);
}
}
}
cout << 4 * ans << "\n";
}