結果
問題 | No.413 +5,000,000pts |
ユーザー |
|
提出日時 | 2016-10-07 19:59:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 609 bytes |
コンパイル時間 | 580 ms |
コンパイル使用メモリ | 68,836 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-11-21 19:53:48 |
合計ジャッジ時間 | 1,220 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 |
ソースコード
#include <iostream> #include <cmath> #define repeat(i,n) for (int i = 0; (i) < (n); ++(i)) typedef long long ll; using namespace std; ll calc(ll d) { return (ll)((-1 + sqrt(1 + 4*d)) / 2.0); } ll sq(ll x) { return x * x; } bool check(ll t, ll d) { return sq(t)+t <= d and sq(t+1)+(t+1) > d; } int main() { const int n = 1e5; ll t = 999999999; for (int i = 0; i < n; ++ i) { repeat (dd,100) { ll d = sq(t)+t-dd; if (check(calc(d), d)) continue; cout << d << endl; if (++ i >= n) break; } -- t; } return 0; }