結果
問題 | No.202 1円玉投げ |
ユーザー | beet |
提出日時 | 2019-04-25 18:01:45 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 698 bytes |
コンパイル時間 | 2,163 ms |
コンパイル使用メモリ | 207,360 KB |
実行使用メモリ | 11,216 KB |
最終ジャッジ日時 | 2023-08-24 00:01:27 |
合計ジャッジ時間 | 37,354 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 4,164 ms
9,708 KB |
testcase_01 | AC | 3,108 ms
9,568 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 121 ms
4,376 KB |
testcase_06 | AC | 2,814 ms
8,000 KB |
testcase_07 | AC | 3,278 ms
8,452 KB |
testcase_08 | AC | 3,302 ms
8,540 KB |
testcase_09 | AC | 1,601 ms
6,384 KB |
testcase_10 | AC | 551 ms
4,760 KB |
testcase_11 | AC | 1,245 ms
6,216 KB |
testcase_12 | AC | 1,306 ms
6,084 KB |
testcase_13 | AC | 626 ms
5,104 KB |
testcase_14 | AC | 146 ms
4,380 KB |
testcase_15 | AC | 1,546 ms
6,284 KB |
testcase_16 | TLE | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} //INSERT ABOVE HERE signed main(){ Int n; cin>>n; using P = pair<Int, Int>; set<P> sp; vector<P> dz; for(Int i=-100;i<=100;i++) for(Int j=-100;j<=100;j++) if(i*i+j*j<400) dz.emplace_back(i,j); Int cnt=0; for(Int i=0;i<n;i++){ Int x,y; cin>>x>>y; Int flg=0; for(auto p:dz) flg|=sp.count(P(x+p.first,y+p.second)); if(flg) continue; cnt++; sp.emplace(x,y); } cout<<cnt<<endl; return 0; }