結果
| 問題 | No.781 円周上の格子点の数え上げ |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-01-19 20:16:11 |
| 言語 | C++17(clang) (clang++ 22.1.8 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 75 ms / 2,000 ms |
| + 204µs | |
| コード長 | 409 bytes |
| 記録 | |
| コンパイル時間 | 7,877 ms |
| コンパイル使用メモリ | 164,032 KB |
| 実行使用メモリ | 42,368 KB |
| 最終ジャッジ日時 | 2026-09-28 15:42:37 |
| 合計ジャッジ時間 | 3,664 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / 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";
}