結果
| 問題 |
No.5008 [Cherry Alpha] Discrete Pendulum with Air Resistance
|
| コンテスト | |
| ユーザー |
👑 potato167
|
| 提出日時 | 2022-10-14 22:27:12 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 2,440 bytes |
| コンパイル時間 | 1,833 ms |
| 実行使用メモリ | 6,952 KB |
| スコア | 0 |
| 最終ジャッジ日時 | 2022-10-14 22:27:21 |
| 合計ジャッジ時間 | 8,910 ms |
|
ジャッジサーバーID (参考情報) |
judge11 / judge8 |
| 純コード判定しない問題か言語 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using std::cout;
using std::cin;
using std::endl;
using ll=long long;
using ld=long double;
ll ILL=2167167167167167167;
const int INF=2100000000;
const ll mod=1e9+7;
#define rep(i,a) for (int i=0;i<a;i++)
#define all(p) p.begin(),p.end()
template<class T> using _pq = priority_queue<T, vector<T>, greater<T>>;
template<class T> ll LB(vector<T> &v,T a){return lower_bound(v.begin(),v.end(),a)-v.begin();}
template<class T> ll UB(vector<T> &v,T a){return upper_bound(v.begin(),v.end(),a)-v.begin();}
template<class T> bool chmin(T &a,const T &b){if(a>b){a=b;return 1;}else return 0;}
template<class T> bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}else return 0;}
template<class T> void So(vector<T> &v) {sort(v.begin(),v.end());}
template<class T> void Sore(vector<T> &v) {sort(v.begin(),v.end(),[](T x,T y){return x>y;});}
void yneos(bool a){if(a) cout<<"Yes\n"; else cout<<"No\n";}
template<class T> void vec_out(vector<T> &p){for(int i=0;i<(int)(p.size());i++){if(i) cout<<" ";cout<<p[i];}cout<<"\n";}
template<class T> T min(vector<T> &a){assert(!a.empty());T ans=a[0];for(auto &x:a) chmin(ans,x);return ans;}
template<class T> T max(vector<T> &a){assert(!a.empty());T ans=a[0];for(auto &x:a) chmax(ans,x);return ans;}
//https://ei1333.github.io/library/other/xor-shift.cpp.html
struct XorShift {
private:
constexpr static double R = 1.0 / 0xffffffff;
uint64_t x;
public:
explicit XorShift(uint64_t seed = 88172645463325252ull) : x(seed) {}
template< typename T = uint64_t >
inline T get() { // [0, 2^64)
x ^= x << 7ull;
x ^= x >> 9ull;
return x;
}
inline uint32_t get(uint32_t r) { // [0, r)
return ((uint64_t) get< uint32_t >() * r) >> 32ull;
}
inline uint32_t get(uint32_t l, uint32_t r) { // [l, r)
return l + get(r - l);
}
inline double probability() { // [0.0, 1.0]
return get< uint32_t >() * R;
}
};
template<class T>
void shuffle_vector(vector<T> &p,XorShift &table){
int L=p.size();
for(int i=0;i<L;i++){
int ind=table.get(i,L);
swap(p[ind],p[i]);
}
return ;
}
void solve();
// oddloop
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t=1;
//cin>>t;
rep(i,t) solve();
}
void solve(){
XorShift table(167);
rep(i,50){
int B=table.get(10000000,100000000);
int M=table.get(9000000,B);
int E=table.get((B-M)/4,B-M+10);
cout<<B<<" "<<M<<" "<<E<<"\n";
}
}
potato167