Submission #00141
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include<bits/stdc++.h> using namespace std; #define int int64_t #define itn int #define fi first #define se second signed main(){ int t,n; cin>>t; for ( int i=0;i<t;i++){ int ans=0,sum=0; cin>>n; sum=(n/2); int h=sum+1,l=0; while (h-l>1){ int m=(h+l)/2; if (m*m>sum) h=m; else l=m; } cout<<l<< "\n" ; } return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0004 - Laying of Tiles |
ユーザー名 | ei1941 |
投稿日時 | 2021-04-07 14:58:56 |
言語 | C++17 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 389 Byte |
最大実行時間 | 29 ms |
最大メモリ使用量 | 732 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 18 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | WA | 26 ms | 476 KB |
1
|
in02.txt | WA | 19 ms | 452 KB |
1
|
in03.txt | WA | 21 ms | 296 KB |
1
|
in04.txt | WA | 22 ms | 396 KB |
1
|
in05.txt | WA | 21 ms | 500 KB |
1
|
in06.txt | WA | 26 ms | 348 KB |
1
|
in07.txt | WA | 20 ms | 448 KB |
1
|
in08.txt | WA | 16 ms | 548 KB |
1
|
in09.txt | WA | 26 ms | 520 KB |
1
|
in10.txt | WA | 21 ms | 492 KB |
1
|
in11.txt | WA | 23 ms | 336 KB |
1
|
in12.txt | WA | 21 ms | 440 KB |
1
|
in13.txt | WA | 23 ms | 408 KB |
1
|
in14.txt | AC | 23 ms | 504 KB |
1
|
in15.txt | WA | 23 ms | 476 KB |
1
|
in16.txt | AC | 22 ms | 580 KB |
1
|
in17.txt | WA | 28 ms | 684 KB |
1
|
in18.txt | WA | 27 ms | 656 KB |
1
|
in19.txt | AC | 29 ms | 628 KB |
1
|
in20.txt | AC | 21 ms | 732 KB |
1
|
sample01.txt | AC | 24 ms | 704 KB |
1
|
sample02.txt | AC | 25 ms | 676 KB |
1
|