結果
| 問題 |
No.413 +5,000,000pts
|
| ユーザー |
tossy
|
| 提出日時 | 2016-09-20 00:02:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 5,000 ms |
| コード長 | 818 bytes |
| コンパイル時間 | 859 ms |
| コンパイル使用メモリ | 84,164 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-11-17 10:05:34 |
| 合計ジャッジ時間 | 1,349 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define fi first
#define se second
#define INF 2147483600
long calc(long d) {
return (long)((-1 + sqrt(1 + 4*d)) / 2.0);
}
int main(){
int cnt=0;
long n=999999999;
while(cnt<100000 && n>=0){
long m = n*n+n;
long r = m-1;
while(calc(r) == n){
printf("%ld\n", r);
r--;
cnt++;
}
n--;
}
return 0;
}
tossy