結果
問題 | No.1700 floor X |
ユーザー | Ankit |
提出日時 | 2021-10-08 23:37:57 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 7,157 bytes |
コンパイル時間 | 965 ms |
コンパイル使用メモリ | 86,760 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-23 07:55:02 |
合計ジャッジ時間 | 2,374 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,816 KB |
testcase_01 | AC | 4 ms
6,940 KB |
testcase_02 | AC | 4 ms
6,944 KB |
testcase_03 | AC | 4 ms
6,944 KB |
testcase_04 | AC | 4 ms
6,940 KB |
testcase_05 | AC | 3 ms
6,940 KB |
testcase_06 | AC | 4 ms
6,944 KB |
testcase_07 | AC | 4 ms
6,940 KB |
testcase_08 | AC | 4 ms
6,940 KB |
testcase_09 | AC | 4 ms
6,944 KB |
testcase_10 | AC | 4 ms
6,940 KB |
testcase_11 | AC | 4 ms
6,944 KB |
testcase_12 | AC | 4 ms
6,940 KB |
testcase_13 | AC | 4 ms
6,944 KB |
testcase_14 | AC | 4 ms
6,940 KB |
testcase_15 | AC | 4 ms
6,944 KB |
testcase_16 | AC | 4 ms
6,940 KB |
testcase_17 | AC | 4 ms
6,944 KB |
testcase_18 | AC | 4 ms
6,944 KB |
testcase_19 | AC | 4 ms
6,940 KB |
testcase_20 | AC | 4 ms
6,944 KB |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | WA | - |
testcase_44 | WA | - |
コンパイルメッセージ
main.cpp:97: warning: "in" redefined 97 | #define in int | main.cpp:12: note: this is the location of the previous definition 12 | #define in include | main.cpp:117: warning: "re" redefined 117 | #define re remove | main.cpp:114: note: this is the location of the previous definition 114 | #define re return |
ソースコード
// User name:- Ankit singh // Codechef id:- ankitsingh3003 // Codeforces Id:- ankit_singh_programs // Email- ankitsingh300307@gmail.com (if you want to contact me) // About Me // Just a newbie Competetve programmer and I am IOI aspirant #define in include #include <iostream> #include <algorithm> #include <vector> #include <map> #include <string> #include <cmath> #include<numeric> #include <fstream> // New Imports:- using namespace std; // Definitions // Copied from GFG geeks for geeks typedef long long LL; typedef pair<int, int> pii; typedef pair<LL, LL> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<LL> vl; typedef vector<vl> vvl; double EPS = 1e-9; long long inf = 1000000000000000005LL; double PI = acos(-1); int dirx[8] = { -1, 0, 0, 1, -1, -1, 1, 1 }; int diry[8] = { 0, 1, -1, 0, -1, 1, -1, 1 }; #ifdef TESTING #define DEBUG fprintf(stderr, "====TESTING====\n") #define VALUE(x) cerr << "The value of " << #x << " is " << x << endl #define debug(...) fprintf(stderr, __VA_ARGS__) #else #define DEBUG #define VALUE(x) #define debug(...) #endif #define FOR(a, b, c) for (int(a) = (b); (a) < (c); ++(a)) #define FORN(a, b, c) for (int(a) = (b); (a) <= (c); ++(a)) #define FORD(a, b, c) for (int(a) = (b); (a) >= (c); --(a)) #define FORSQ(a, b, c) for (int(a) = (b); (a) * (a) <= (c); ++(a)) #define FORC(a, b, c) for (char(a) = (b); (a) <= (c); ++(a)) #define FOREACH(a, b) for (auto&(a) : (b)) #define REP(i, n) FOR(i, 0, n) #define F(i, n) FORN(i, 1, n) #define MAX(a, b) a = max(a, b) #define MIN(a, b) a = min(a, b) #define SQR(x) ((LL)(x) * (x)) #define RESET(a, b) memset(a, b, sizeof(a)) #define fi first #define se second #define mp make_pair #define pb push_back #define ALL(v) v.begin(), v.end() #define ALLA(arr, sz) arr, arr + sz #define SIZE(v) (int)v.size() #define SORT(v) sort(ALL(v)) #define REVERSE(v) reverse(ALL(v)) #define SORTA(arr, sz) sort(ALLA(arr, sz)) #define REVERSEA(arr, sz) reverse(ALLA(arr, sz)) #define PERMUTE next_permutation #define TC(t) while (t--) // My definitions // My definitions #define lo long long #define in int #define ma main #define fl float #define st string #define ch char #define do double #define co cout #define ci cin #define fo for #define wh while #define so sort #define tr true #define fa false #define su substr #define le length #define el else #define ve vector #define re return #define si size #define er erase #define re remove #define ad add #define ll long long ll mod=pow(10,9)+7; //ll mod2= //ll func(){ // //} inline ll fact(ll n){ ll r=1; for(ll i=1;i<=n;++i){ r*=i; r%=mod;} return r; } inline ll ncr(ll n,ll k){ return fact(n)/(fact(k)*fact(n-k)); } inline ll fib(ll n){ if(n==0) return 0; if(n==1) return 1; ll k; if(n%2==1){ k=(n+1)/2; return (fib(k-1)*fib(k-1))+(fib(k)*fib(k)); } else{ k=n/2; return (fib(k-1)+fib(k))*fib(k); } n%=mod; } ll fastmod(ll n,ll b){ ll a=n/b; a*=b; return (n-a); } ll plg(ll n,ll b){ b%=mod; ll a=n/2; if(n==0) return 1; else if(n==1) return b; else{ ll c=1; if(n%2==1){ c=plg(a,b); c%=mod; c*=c; c%=mod; c*=b; c%=mod; } else{ c=plg(a,b); c%=mod; c*=c; c%=mod; } return c; } } void print(vector<ll> arr){ for(ll i=0;i<arr.si();++i)cout<<arr[i]<<" "; } void print(vector<pair<ll,ll>> arr){ for(ll i=0;i<arr.si();++i) { if(i>0) cout<<"\n"; cout<<arr[i].fi<<" " <<arr[i].se; } } void print(vector<vector<ll>> arr){ for(ll i=0;i<arr.si();++i){ if(i>0) cout<<"\n"; for(ll j=0;j<arr[i].si();++j) cout<<arr[i][j]<<" "; } } void print(bool n){ string s; s=(n==0?"NO":"YES"); cout<<s; } void printlow(ll n){ cout<<(n==0?"no":"yes"); } void printcap(bool n){ string s; s=n==0?"No":"Yes"; cout<<s; } void print(ll arr[],ll n){ for(ll i=0;i<n;++i) cout<<arr[i]<<" "; } // Code int main(){ // Fast Code Helper ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); // Code long long t; t=1; //ll ran=pow(10,5); // ll data[ran]; // for(ll i=0;i<ran;++i){ // //} ll ti=1; cin>>t; /* string filei= string fileo= ofstream out(fileo); instream in(filei); */ while(t--){ ll a,b,c,n,i,j,q; ll m; ll r=0; string s,s1,s2; ll x,y; ll o=0; ll r1,r2; ll k; r1=r2=0; // Input cin>>n; ll low=1; ll high=n; if(n>1) {high/=2; // it can be proved that if n>1 range of square is 1..floor(n/2) } while(1){ ll mid=low+high; mid/=2; if(((mid*mid)==n)) { r=mid; break; } else if((mid*mid)<n and ((mid+1)*(mid+1))>n){ r=mid; break; } // mid*=mid; else if((mid*mid)>n){ high=mid-1; } else{ low=mid+1; } } // ll arr[n]; // // for(ll i=0;i<n;++i) cin>>arr[i]; // vector<ll> arr(n); // ll ran=26; // cin>>k; // file input // // // ll arr[n]; // for(ll i=0;i<n;++i) cin>>arr[i]; // in>>n; // for(ll i=0;i<n;++i) in>>arr[i]; // sort(arr,arr+n); //vector<vector<ll>> arr; //for(ll i=0;i<n;++i){ // cin>>a>>b; // // vector<ll> ar{a,b}; // // arr.pb(ar); // //} //for(ll i=0;i<n;++i){ // in>>a>>b; // // vector<ll> ar{a,b}; // // arr.pb(ar); // //} // vector<ll> d; // // n=s.le(); // // // i=0; // // while(i<n){ // // if(s[i]==){ // // } // // } // ll ar1[n]; // ll ar2[n]; // // // // for(ll i=0;i<n;++i) cin>>ar1[i]; // // // for(ll i=0;i<n;++i) cin>>ar2[i]; // for(ll i=0;i<n;++i) in>>ar1[i]; // // // for(ll i=0;i<n;++i) in>>ar2[i]; // sort(ar2,ar2+n); // sort(ar2,ar2+n); // sort(arr,arr+n,greater<ll>()); // sort(arr.begin(),arr.end()); // sort(arr.begin(),arr.end(),greater<ll>()); // // long long ar[n]; // for(int i=0;i<n;++i){ // // } // // for(int i=0;i<n;++i){ // // if(){ // // } // // } // // WRITE NEW CODE HERE // Remember - Dont write Cumbersome code Write clean and beautiful code // Be fast But also be Cool // And no harbari Else just WA // // for(ll i=0;i<d.size();++i){ // if(d[i]==){ // // } //else{ // //} // // // } // Printing // Kickstart Output formating // cout<<"Case #"<<ti<<": "; //for(ll i=0;i<n;++i) cout<<arr[i]<<" "; //cout<<s<<"\n"; // cout<<r<<'\n'; // cout<<r; cout<<"\n"; // cout<<r1<<" "<<r2<<"\n"; // // file printing // Printing // Kickstart Output formating // out<<"Case #"<<ti<<": "; //for(ll i=0;i<n;++i) out<<arr[i]<<" "; //out<<s<<"\n"; // out<<r<<'\n'; // // out<<r; //out<<"\n"; // out<<r1<<" "<<r2<<"\n"; // ++ti; } return 0; }