結果

問題 No.202 1円玉投げ
ユーザー kentahamakentahama
提出日時 2015-05-04 12:10:39
言語 C90
(gcc 11.4.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 555 bytes
コンパイル時間 753 ms
コンパイル使用メモリ 24,168 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-23 22:20:16
合計ジャッジ時間 76,493 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 TLE -
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 0 ms
4,380 KB
testcase_05 AC 22 ms
4,380 KB
testcase_06 AC 3,173 ms
4,380 KB
testcase_07 AC 3,874 ms
4,376 KB
testcase_08 AC 3,900 ms
4,376 KB
testcase_09 AC 1,299 ms
4,380 KB
testcase_10 AC 249 ms
4,380 KB
testcase_11 AC 902 ms
4,380 KB
testcase_12 AC 954 ms
4,376 KB
testcase_13 AC 301 ms
4,380 KB
testcase_14 AC 29 ms
4,376 KB
testcase_15 AC 1,230 ms
4,380 KB
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 AC 1,093 ms
4,376 KB
testcase_20 AC 2,645 ms
4,376 KB
testcase_21 AC 1,084 ms
4,376 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 1 ms
4,376 KB
testcase_26 AC 1 ms
4,380 KB
testcase_27 AC 1 ms
4,376 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 1 ms
4,376 KB
testcase_30 AC 2 ms
4,376 KB
testcase_31 AC 1 ms
4,376 KB
testcase_32 AC 2 ms
4,380 KB
testcase_33 AC 1 ms
4,376 KB
testcase_34 AC 1 ms
4,376 KB
testcase_35 TLE -
testcase_36 TLE -
testcase_37 AC 4,488 ms
4,376 KB
testcase_38 TLE -
testcase_39 AC 0 ms
4,380 KB
testcase_40 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

typedef struct point {
  int x;
  int y;
} point_t;

point_t p[100000];
int pnum;

int N;
int count;

int collision(point_t p, point_t q) {
  return (p.x - q.x) * (p.x - q.x) + (p.y - q.y) * (p.y - q.y) < 20 * 20;
}

int main(void) {
  scanf("%d", &N);
  int i, j;

  for (i = 0; i < N; i++) {
    point_t buf;
    scanf("%d %d", &buf.x, &buf.y);
    for (j = 0; j < pnum; j++) {
      if (collision(buf, p[j])) {
        break;
      }
    }
    if (j == pnum) {
      p[pnum++] = buf;
    }
  }
  printf("%d\n", pnum);
  return 0;
}
0