結果

問題 No.202 1円玉投げ
ユーザー hogeover30hogeover30
提出日時 2015-05-16 04:48:22
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 3,413 ms / 5,000 ms
コード長 262 bytes
コンパイル時間 1,123 ms
コンパイル使用メモリ 150,044 KB
実行使用メモリ 8,292 KB
最終ジャッジ日時 2023-08-23 22:54:02
合計ジャッジ時間 21,340 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 994 ms
8,032 KB
testcase_01 AC 422 ms
8,008 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 8 ms
4,376 KB
testcase_06 AC 408 ms
6,848 KB
testcase_07 AC 495 ms
7,152 KB
testcase_08 AC 519 ms
7,196 KB
testcase_09 AC 180 ms
5,796 KB
testcase_10 AC 43 ms
4,380 KB
testcase_11 AC 127 ms
5,228 KB
testcase_12 AC 134 ms
5,292 KB
testcase_13 AC 50 ms
4,772 KB
testcase_14 AC 10 ms
4,380 KB
testcase_15 AC 168 ms
5,548 KB
testcase_16 AC 185 ms
8,292 KB
testcase_17 AC 2,626 ms
8,044 KB
testcase_18 AC 2,575 ms
8,052 KB
testcase_19 AC 151 ms
5,416 KB
testcase_20 AC 345 ms
6,660 KB
testcase_21 AC 150 ms
5,460 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 8 ms
4,380 KB
testcase_27 AC 9 ms
4,376 KB
testcase_28 AC 3 ms
4,380 KB
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 3 ms
4,376 KB
testcase_31 AC 2 ms
4,380 KB
testcase_32 AC 2 ms
4,376 KB
testcase_33 AC 3 ms
4,380 KB
testcase_34 AC 4 ms
4,380 KB
testcase_35 AC 3,401 ms
8,060 KB
testcase_36 AC 393 ms
8,092 KB
testcase_37 AC 579 ms
7,464 KB
testcase_38 AC 3,413 ms
8,160 KB
testcase_39 AC 2 ms
4,376 KB
testcase_40 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
 #import<bits/stdc++.h>
  ^~~~~~
main.cpp:2:36: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
 using namespace std;int x,y,r;main(){set<pair<int,int>>a;auto i=end(a),j=i;for(cin>>x;cin>>x>>y;i==j&&(a.emplace(x,y),++r))for(i=a.lower_bound({x-20,y-20}),j=a.upper_bound({x+40,y+40});i!=j&&hypot(x-i->first,y-i->second)>=20;++i);cout<<r;}
                                    ^

ソースコード

diff #

#import<bits/stdc++.h>
using namespace std;int x,y,r;main(){set<pair<int,int>>a;auto i=end(a),j=i;for(cin>>x;cin>>x>>y;i==j&&(a.emplace(x,y),++r))for(i=a.lower_bound({x-20,y-20}),j=a.upper_bound({x+40,y+40});i!=j&&hypot(x-i->first,y-i->second)>=20;++i);cout<<r;}
0