結果
問題 | No.1700 floor X |
ユーザー |
![]() |
提出日時 | 2021-10-08 22:33:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 919 bytes |
コンパイル時間 | 1,447 ms |
コンパイル使用メモリ | 167,192 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-03 10:31:52 |
合計ジャッジ時間 | 3,052 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 44 |
ソースコード
#include <bits/stdc++.h> //eolibraries #define lnf 3999999999999999999 #define inf 999999999 #define fi first #define se second #define pb push_back #define all(c) (c).begin(),(c).end() #define sz(c) (int)(c).size() #define make_unique(a) sort(all(a)),a.erase(unique(all(a)),a.end()); #define rep(i,n) for(int i=0;i<n;i++) #define drep(i,n) for(int i=n-1;i>=0;i--) #define crep(i,x,n) for(int i=x;i<n;i++) #define vec(...) vector<__VA_ARGS__> #define _3ioVv0Q ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0) //eodefine using namespace std; typedef long long i64; typedef long double ld; using pii=pair<int,int>; using tpii=pair<int,pii>; using vi=vec(i64); const int mxn=12000; int main(){ _3ioVv0Q; int t; cin>>t; rep(cs,t){ i64 n; cin>>n; i64 l=0,r=sqrt(n)+3,c=-1; while(l<=r){ i64 m=(l+r)/2; if(m*m<=n){ c=m; l=m+1; }else{ r=m-1; } } cout<<c<<"\n"; } // return 0; }