結果
| 問題 |
No.413 +5,000,000pts
|
| ユーザー |
|
| 提出日時 | 2016-12-19 17:10:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 136 ms / 5,000 ms |
| コード長 | 998 bytes |
| コンパイル時間 | 717 ms |
| コンパイル使用メモリ | 88,444 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-12-14 09:00:04 |
| 合計ジャッジ時間 | 1,397 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
using namespace std;
typedef long long int ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PI;
const ll mod = 1e9 + 7;
ll calc(ll d) {
return (ll)((-1 + sqrt(1 + 4*d)) / 2.0);
}
const ll lim = 1e8;
int main(void){
int pos = 0;
ll i = 0;
while (i < lim && pos < 100000) {
ll d = lim - i - 1;
d *= d + 1;
REP(j, 0, 10) {
ll t = calc(d);
if (t * t + t <= d && (t + 1) * (t + 2) > d) {
} else {
cout << d << endl;
pos++;
}
d--;
}
++i;
}
}