結果
| 問題 | No.781 円周上の格子点の数え上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-19 20:16:11 |
| 言語 | C++17(clang) (clang++ 22.1.2 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 2,000 ms |
| コード長 | 409 bytes |
| 記録 | |
| コンパイル時間 | 7,424 ms |
| コンパイル使用メモリ | 172,684 KB |
| 実行使用メモリ | 42,624 KB |
| 最終ジャッジ日時 | 2026-05-17 07:04:50 |
| 合計ジャッジ時間 | 6,117 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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";
}