結果
問題 | No.2962 Sum Bomb Bomber |
ユーザー | rieaaddlreiuu |
提出日時 | 2024-12-04 01:29:20 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 110 ms / 2,000 ms |
コード長 | 894 bytes |
コンパイル時間 | 1,484 ms |
コンパイル使用メモリ | 167,752 KB |
実行使用メモリ | 25,208 KB |
平均クエリ数 | 97.09 |
最終ジャッジ日時 | 2024-12-04 01:29:33 |
合計ジャッジ時間 | 10,207 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
25,208 KB |
testcase_01 | AC | 84 ms
25,208 KB |
testcase_02 | AC | 110 ms
25,080 KB |
testcase_03 | AC | 65 ms
24,824 KB |
testcase_04 | AC | 84 ms
24,824 KB |
testcase_05 | AC | 68 ms
24,824 KB |
testcase_06 | AC | 70 ms
24,440 KB |
testcase_07 | AC | 81 ms
25,208 KB |
testcase_08 | AC | 85 ms
24,824 KB |
testcase_09 | AC | 82 ms
25,208 KB |
testcase_10 | AC | 82 ms
24,440 KB |
testcase_11 | AC | 64 ms
24,824 KB |
testcase_12 | AC | 67 ms
24,440 KB |
testcase_13 | AC | 73 ms
24,824 KB |
testcase_14 | AC | 84 ms
24,824 KB |
testcase_15 | AC | 70 ms
24,440 KB |
testcase_16 | AC | 62 ms
24,440 KB |
testcase_17 | AC | 72 ms
24,568 KB |
testcase_18 | AC | 66 ms
24,824 KB |
testcase_19 | AC | 67 ms
24,428 KB |
testcase_20 | AC | 61 ms
24,824 KB |
testcase_21 | AC | 71 ms
25,208 KB |
testcase_22 | AC | 77 ms
24,952 KB |
testcase_23 | AC | 74 ms
24,952 KB |
testcase_24 | AC | 95 ms
24,824 KB |
testcase_25 | AC | 62 ms
25,208 KB |
testcase_26 | AC | 76 ms
25,208 KB |
testcase_27 | AC | 82 ms
24,824 KB |
testcase_28 | AC | 70 ms
24,952 KB |
testcase_29 | AC | 66 ms
24,952 KB |
testcase_30 | AC | 80 ms
24,568 KB |
testcase_31 | AC | 62 ms
24,824 KB |
testcase_32 | AC | 81 ms
25,208 KB |
testcase_33 | AC | 65 ms
25,208 KB |
testcase_34 | AC | 77 ms
25,208 KB |
testcase_35 | AC | 100 ms
25,208 KB |
testcase_36 | AC | 82 ms
24,440 KB |
testcase_37 | AC | 65 ms
24,824 KB |
testcase_38 | AC | 80 ms
24,824 KB |
testcase_39 | AC | 81 ms
25,080 KB |
testcase_40 | AC | 82 ms
24,824 KB |
testcase_41 | AC | 66 ms
24,824 KB |
testcase_42 | AC | 62 ms
24,812 KB |
testcase_43 | AC | 74 ms
24,824 KB |
testcase_44 | AC | 73 ms
25,208 KB |
testcase_45 | AC | 68 ms
24,568 KB |
testcase_46 | AC | 101 ms
24,440 KB |
testcase_47 | AC | 68 ms
25,064 KB |
testcase_48 | AC | 85 ms
24,824 KB |
testcase_49 | AC | 74 ms
24,824 KB |
testcase_50 | AC | 80 ms
24,440 KB |
testcase_51 | AC | 62 ms
24,428 KB |
testcase_52 | AC | 63 ms
25,196 KB |
testcase_53 | AC | 61 ms
24,556 KB |
testcase_54 | AC | 71 ms
24,812 KB |
testcase_55 | AC | 70 ms
25,196 KB |
testcase_56 | AC | 70 ms
24,812 KB |
testcase_57 | AC | 87 ms
24,812 KB |
testcase_58 | AC | 74 ms
24,812 KB |
testcase_59 | AC | 76 ms
24,812 KB |
testcase_60 | AC | 83 ms
24,428 KB |
testcase_61 | AC | 77 ms
24,812 KB |
testcase_62 | AC | 83 ms
24,812 KB |
testcase_63 | AC | 79 ms
24,812 KB |
testcase_64 | AC | 78 ms
25,196 KB |
ソースコード
#include<bits/stdc++.h> using namespace std; long long d(long long x,long long y){ long long result; cout << "1 " << x << " " << y << endl; cin >> result; return result; } int main(){ long long min_x,min_y; long long N; long long d_1,d_2,d_3; cin >> N; long long left = -200000000,right = 200000000; long long mid = 0; while(1){ mid = (left+right)/2; d_1 = d(mid-1,0); d_2 = d(mid,0); d_3 = d(mid+1,0); if(d_1 < d_2){ right = mid + 1; } if(d_2 > d_3){ left = mid - 1; } if(d_1 >= d_2 && d_2 <= d_3){ break; } } min_x = mid; left = -200000000,right = 200000000; while(1){ mid = (left+right)/2; d_1 = d(0,mid-1); d_2 = d(0,mid); d_3 = d(0,mid+1); if(d_1 < d_2){ right = mid + 1; } if(d_2 > d_3){ left = mid - 1; } if(d_1 >= d_2 && d_2 <= d_3){ break; } } min_y = mid; cout << "2 " << min_x << " " << min_y << endl; }