結果
| 問題 |
No.781 円周上の格子点の数え上げ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-12 15:44:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,437 bytes |
| コンパイル時間 | 2,086 ms |
| コンパイル使用メモリ | 170,724 KB |
| 実行使用メモリ | 82,896 KB |
| 最終ジャッジ日時 | 2024-12-21 07:34:59 |
| 合計ジャッジ時間 | 7,131 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 RE * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long // aaaaaaaaaaaaaaaaaa
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define SIZE(buff) (sizeof(buff)/sizeof(buff[0]))
typedef vector<int> VI;
typedef vector<vector<int> > VVI;
typedef long long ll;
typedef pair<int,int> PII;
const ll mod=1000000007;
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}
template<typename T, typename U>ostream& operator << (ostream& os, pair<T, U>& pair_var)
{os << "(" << pair_var.first << ", " << pair_var.second << ")";return os;}
// head
int q,m,n,k,res,tmp,tmp2;
int a[16][16] = {};
int b[200010] = {};
vector<pair<int,int>> v[305];
deque<PII> que;
//int dp[305][305][305] = {};
string s;
int ans[10000001] = {};
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
std::cin >>n>>m;
rep(i,0,(int)sqrt(m)+1){
rep(j,1,(int)sqrt(m)+1){
ans[i*i+j*j] += 1;
}
}
res = 0;
rep(i,n,m+1){
res = max(res,ans[i]);
}
cout<<res*4<<endl;
}