結果
問題 | No.1033 乱数サイ |
ユーザー |
|
提出日時 | 2022-02-12 23:05:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 6,396 bytes |
コンパイル時間 | 938 ms |
コンパイル使用メモリ | 104,804 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 02:21:09 |
合計ジャッジ時間 | 1,643 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
//include//------------------------------------------#include <vector>#include <list>#include <map>#include <set>#include <deque>#include <stack>#include <bitset>#include <algorithm>#include <functional>#include <numeric>#include <utility>#include <sstream>#include <iostream>#include <iomanip>#include <cstdio>#include <cmath>#include <cstdlib>#include <cctype>#include <string>#include <cstring>#include <ctime>#include<queue>#include<complex>using namespace std;//conversion//------------------------------------------inline long long toint(string s) {long long v; istringstream sin(s);sin>>v;return v;}template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}//math//-------------------------------------------template<class T> inline T sqr(T x) {return x*x;}//typedef//------------------------------------------typedef long long ll;typedef long long LL;typedef vector<int > vi;typedef vector<long long > VLL;typedef vector<long long > vll;typedef vector<string > ves;typedef vector<char > vech;typedef pair<long long , long long> pll;typedef pair<long long , long long> PLL;typedef map<ll , ll >mll;typedef map<int , int >mii;typedef map<char , int >mci;typedef map<char , ll >mcl;typedef vector<pair<ll , ll> > vpll;//container util//------------------------------------------#define ALL(a) (a).begin(),(a).end()#define RALL(a) (a).rbegin(), (a).rend()#define VECMAX(x) *max_element(ALL(x))#define VECMIN(x) *min_element(ALL(x))#define PB push_back#define MP make_pair#define SZ(a) int((a).size())#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)#define EXIST(s,e) ((s).find(e)!=(s).end())#define SORT(c) sort((c).begin(),(c).end())//repetition//------------------------------------------#define FOR(i,a,b) for(long long i=(a);i<(b);++i)#define REP(i,n) FOR(i,0,n)//#define MULTIPLE(i,n,k) for(int i = (k) ; i<(n) ; i+=k+1)//倍数ループ//constant//------------------------------------------const double EPS = 1e-10;const double PI = acos(-1.0);//clear memory#define CLR(a) memset((a), 0 ,sizeof(a))//debug#define dump(x) cerr << #x << " = " << (x) << endl;#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;#define SIZEOF(x) sizeof(x)/sizeof(x[0])const long long INF = 4e18;const long long NINF = 1 - INF;#define ENDL cout << endl;#define CIN(a) REP(i,a.size())cin >> a[i];//二次元座標の点を表す構造体。xとyをメンバに持つstruct POINT{double x;double y;};ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }/*nCr , 値が大きいとオーバーフローするn<=kなら1 (0C1や1C5= 1)*/ll nCr(ll n, ll r){if ( r * 2 > n ) r = n - r;ll dividend = 1;ll divisor = 1;for ( unsigned int i = 1; i <= r; ++i ) {dividend *= (n-i+1);divisor *= i;}return dividend / divisor;}//firstが最大値(最小値) , second が indextemplate<class T>pair<T , ll> maxP(vector<T> a , ll size){pair <T , ll> p;ll ind = 0;T mx = NINF;REP(i,size){if(mx<a[i]){mx = a[i];ind = i;}}p.first = mx;p.second = ind;return p;}template<class T>pair<T , ll> minP(vector<T> a , ll size){pair <T , ll> p;T mn = INF;ll ind = 0;REP(i,size){if(mn > a[i]){mn = a[i];ind = i;}}p.first = mn;p.second = ind;return p;}template<class T>T sumL(vector<T> a , ll size){T sum = 0;REP(i,size){sum += a[i];}return sum;}//sort済みのvll ; a のleft ~ rightにtがいくつあるかll counT(VLL a ,ll left , ll right , ll t ){//sort(a.begin(),a.end());return upper_bound(a.begin() + left , a.begin() + right,t)-lower_bound(a.begin() + left , a.begin() + right, t);}//切り上げll kiriage(ll a , ll b){return a/b + (a%b!=0);}#define COUNT(a,b) counT((a),0,a.size(),(b))#define MAX(x) maxP(x,x.size())#define MIN(x) minP(x,x.size())#define SUM(x) sumL(x,x.size())//-------要素を見つける-----------ll search(vll &a , ll n ){//a内のnのindexを返すstd::vector<ll>::iterator iter = std::find(a.begin(), a.end(), n);size_t index = distance(a.begin(), iter);return index;}//桁数int getdigit(ll n){return log10(n)+1;}// toBinary[i]は,binaを二進数で表したときの下からi桁目のbitが入ってるvll toBinary(ll bina){vll ans;for (ll i = 0; bina>0 ; i++){ans.push_back(bina%2);bina = bina/2;}return ans;}//-----------MAIN:困った時メモ------------////// Sqrは2乗 sqrtはルート , 二次元座標の点は struct POINT でも表せる(メンバはx , y)// 小さい順ならpriority_queue<ll, vll, greater<ll> > と書く// ゲーム:grundy数 , グラフ:LCA,eulerTour,// 最大流がScalingMaxFlow , 最小費用流がPrimalDual<flow_t , cost_t>// めぐる式二分探索 , 半分前列挙// bitDP , 最小全域木でコストやグラフを求める , オイラーツアー , 0-1BFS// オイラーツアーはDFS , 全域木はDFS , 三分探索// 区間スケジューリング問題(右端が小さい順にソート)// 定数倍(log)を落とすことで通ることもたまにある(setやmapに注意)// 度数 = ラジアン × 180 ÷ 円周率// 競技プログラミングでは「数が少ない方を考えると考察が進む場合がある」という典型テクニックがあります。// std::mapをループするときは、for(pair<type,type> x(要素): MAP)// 期待値の線形性, 平均値は期待値の特殊な場合// 二次元累積和の計算 : s[i+1][j+1] = s[i][j+1] + s[i+1][j] - s[i][j] + a[i][j];// (a,b) -> (c,d)の二次元累積和 : s[c][d] - s[a][d] - s[b][c] + s[a][b]// multisetは便利 , 値の重複、upperbound、追加削除がlogN , *rbeginで最大値,*beginで最小値#define ENDL cout << endl;ll n , m;ll h , w , k;string s;vll A ,B;map<ll , ll>p;ll v , e;int main(){double n , k;cin >> n >> k;cout.precision(10);cout <<n/2 <<endl;return 0;}