結果
問題 | No.2962 Sum Bomb Bomber |
ユーザー |
|
提出日時 | 2024-11-16 16:55:48 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,107 bytes |
コンパイル時間 | 6,008 ms |
コンパイル使用メモリ | 309,340 KB |
実行使用メモリ | 25,964 KB |
平均クエリ数 | 191.00 |
最終ジャッジ日時 | 2024-11-16 16:56:31 |
合計ジャッジ時間 | 14,695 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 1 WA * 63 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:34:30: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow] 34 | int min_cost=1e18; | ^~~~ main.cpp:64:30: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow] 64 | int min_cost=1e18; | ^~~~
ソースコード
#include<bits/stdc++.h>using namespace std;#include<atcoder/all>using namespace atcoder;using mint=atcoder::modint998244353;#pragma GCC optimize("O3")#pragma GCC optimize("unroll-loops")signed main(){int N;cin>>N;int x=-1,y=-1;{int l=-1e8,r=1e8;while(r-l>2){int nl=(2*l+r)/3,nr=(l+2*r)/3;cout<<1<<" "<<nl<<" "<<0<<endl;int retl;cin>>retl;cout<<1<<" "<<nr<<" "<<0<<endl;int retr;cin>>retr;if(retl>retr){r=nr;}else{l=nl;}}int min_cost=1e18;for(int i=l;i<=r;i++){cout<<1<<" "<<l<<" "<<0<<endl;int ret;cin>>ret;if(min_cost>ret){min_cost=ret;x=i;}}}{int l=-1e8,r=1e8;while(r-l>2){int nl=(2*l+r)/3,nr=(l+2*r)/3;cout<<1<<" "<<0<<" "<<nl<<endl;int retl;cin>>retl;cout<<1<<" "<<0<<" "<<nr<<endl;int retr;cin>>retr;if(retl>retr){r=nr;}else{l=nl;}}int min_cost=1e18;for(int i=l;i<=r;i++){cout<<1<<" "<<0<<" "<<l<<endl;int ret;cin>>ret;if(min_cost>ret){min_cost=ret;y=i;}}}cout<<2<<" "<<x<<" "<<y<<endl;}