結果

問題 No.202 1円玉投げ
ユーザー char134217728char134217728
提出日時 2017-08-20 11:30:52
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 372 ms / 5,000 ms
コード長 852 bytes
コンパイル時間 1,260 ms
コンパイル使用メモリ 154,800 KB
実行使用メモリ 9,812 KB
最終ジャッジ日時 2023-08-23 23:34:09
合計ジャッジ時間 7,676 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 261 ms
9,628 KB
testcase_01 AC 225 ms
9,584 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 13 ms
4,380 KB
testcase_06 AC 232 ms
7,952 KB
testcase_07 AC 266 ms
8,444 KB
testcase_08 AC 258 ms
8,476 KB
testcase_09 AC 139 ms
6,388 KB
testcase_10 AC 52 ms
4,740 KB
testcase_11 AC 110 ms
5,880 KB
testcase_12 AC 117 ms
5,920 KB
testcase_13 AC 58 ms
4,868 KB
testcase_14 AC 15 ms
4,376 KB
testcase_15 AC 134 ms
6,332 KB
testcase_16 AC 372 ms
9,672 KB
testcase_17 AC 232 ms
9,600 KB
testcase_18 AC 231 ms
9,624 KB
testcase_19 AC 124 ms
6,112 KB
testcase_20 AC 213 ms
7,652 KB
testcase_21 AC 124 ms
6,120 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 3 ms
4,376 KB
testcase_28 AC 2 ms
4,376 KB
testcase_29 AC 2 ms
4,376 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 2 ms
4,380 KB
testcase_32 AC 3 ms
4,376 KB
testcase_33 AC 3 ms
4,376 KB
testcase_34 AC 4 ms
4,380 KB
testcase_35 AC 259 ms
9,812 KB
testcase_36 AC 199 ms
9,624 KB
testcase_37 AC 292 ms
8,944 KB
testcase_38 AC 265 ms
9,656 KB
testcase_39 AC 2 ms
4,380 KB
testcase_40 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:31:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
 main(){
      ^

ソースコード

diff #

#include <bits/stdc++.h>
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define FORR(i,a,b) for (int i=(a);i>=(b);i--)
#define pb push_back

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef set<int> si;
const int inf = 1e9;
const int mod = 1e9+7;

map<pii, pii> m;
int co = 0;
void put(int x, int y){
  int _x, _y, __x, __y;
  _x = x / 10;
  _y = y / 10;
  pii t, t2;
  FOR(i, -2, 3)FOR(j, -2, 3){
    t = pii(_x + i, _y + j);
    if(m.find(t) == m.end())continue;
    t = m[t];
    if( (t.first - x)*(t.first - x) + (t.second - y)*(t.second - y) < 400 )return;
  }
  co++;
  m[pii(_x, _y)] = pii(x, y);
  return;
}
main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  FOR(i, 0, n){
    int x, y, _x, _y;
    cin >> x >> y;
    put(x, y);
  }
  cout << co << endl;
  return 0;
}
0