結果

問題 No.202 1円玉投げ
ユーザー hogeover30hogeover30
提出日時 2015-05-16 00:33:45
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 634 ms / 5,000 ms
コード長 294 bytes
コンパイル時間 1,251 ms
コンパイル使用メモリ 155,564 KB
実行使用メモリ 9,880 KB
最終ジャッジ日時 2023-08-23 22:52:29
合計ジャッジ時間 8,602 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 162 ms
8,128 KB
testcase_01 AC 420 ms
9,880 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 12 ms
4,380 KB
testcase_06 AC 500 ms
8,808 KB
testcase_07 AC 584 ms
8,992 KB
testcase_08 AC 571 ms
9,024 KB
testcase_09 AC 250 ms
7,340 KB
testcase_10 AC 66 ms
5,584 KB
testcase_11 AC 184 ms
6,880 KB
testcase_12 AC 194 ms
6,904 KB
testcase_13 AC 80 ms
5,720 KB
testcase_14 AC 14 ms
4,380 KB
testcase_15 AC 238 ms
7,340 KB
testcase_16 AC 71 ms
8,232 KB
testcase_17 AC 151 ms
8,088 KB
testcase_18 AC 150 ms
8,088 KB
testcase_19 AC 212 ms
7,088 KB
testcase_20 AC 409 ms
8,328 KB
testcase_21 AC 210 ms
7,324 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 2 ms
4,376 KB
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 3 ms
4,380 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 3 ms
4,376 KB
testcase_35 AC 117 ms
8,048 KB
testcase_36 AC 128 ms
8,164 KB
testcase_37 AC 634 ms
9,316 KB
testcase_38 AC 121 ms
8,100 KB
testcase_39 AC 2 ms
4,376 KB
testcase_40 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
 #import<bits/stdc++.h>
  ^~~~~~
main.cpp:3:40: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
 using namespace std;int n,x,y,f,r;main(){map<int,set<int>> a;for(cin>>n;cin>>x>>y;!f?a[x].insert(y),++r:(f=0))F(i,a,x)F(j,i->second,y)f|=(x-i->first)*(x-i->first)+(y-*j)*(y-*j)<400;cout<<r<<endl;}
                                        ^

ソースコード

diff #

#import<bits/stdc++.h>
#define F(i,a,x)for(auto i=a.lower_bound(x-20);i!=a.upper_bound(x+40);++i)
using namespace std;int n,x,y,f,r;main(){map<int,set<int>> a;for(cin>>n;cin>>x>>y;!f?a[x].insert(y),++r:(f=0))F(i,a,x)F(j,i->second,y)f|=(x-i->first)*(x-i->first)+(y-*j)*(y-*j)<400;cout<<r<<endl;}
0