結果
問題 | No.202 1円玉投げ |
ユーザー | TLwiegehtt |
提出日時 | 2015-07-21 03:29:59 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,131 bytes |
コンパイル時間 | 823 ms |
コンパイル使用メモリ | 25,072 KB |
実行使用メモリ | 45,528 KB |
最終ジャッジ日時 | 2023-08-23 23:05:49 |
合計ジャッジ時間 | 3,253 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
24,744 KB |
testcase_01 | AC | 32 ms
45,528 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 0 ms
4,380 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 23 ms
8,604 KB |
testcase_17 | AC | 30 ms
43,224 KB |
testcase_18 | AC | 30 ms
43,232 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 1 ms
4,376 KB |
testcase_23 | AC | 2 ms
6,016 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | AC | 9 ms
42,784 KB |
testcase_27 | AC | 9 ms
44,924 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | AC | 9 ms
42,756 KB |
testcase_31 | AC | 1 ms
4,380 KB |
testcase_32 | AC | 9 ms
42,916 KB |
testcase_33 | WA | - |
testcase_34 | AC | 1 ms
4,376 KB |
testcase_35 | AC | 29 ms
43,236 KB |
testcase_36 | AC | 24 ms
10,376 KB |
testcase_37 | WA | - |
testcase_38 | AC | 31 ms
43,276 KB |
testcase_39 | AC | 0 ms
4,376 KB |
testcase_40 | WA | - |
ソースコード
#include <stdio.h> #define CMAX (100000) #define WMAX (32) #define HMAX (32) int field[HMAX+2][WMAX+2][10000]; int fCnt[HMAX+2][WMAX+2]; int coin[CMAX+2]; int main(void){ int i,j,k,n; int cCnt=0; scanf("%d", &n); for(i=0;i<n;i++){ int nx, ny; scanf("%d %d", &nx, &ny); coin[i] = nx*100000+ny; } for(i=0;i<n;i++){ int noHit=1; int nx, ny; int px, py; nx = coin[i] / 100000; ny = coin[i] % 100000; px = nx/(20000/WMAX); py = ny/(20000/HMAX); for(j=-1;j<=1;j++){ for(k=-1;k<=1;k++){ int s; int fx = px+k; int fy = py+j; if(fx < 0 || (WMAX-1) < fx){continue;} if(fy < 0 || (HMAX-1) < fy){continue;} for(s=0;s<fCnt[fy][fx];s++){ int tx = field[fy][fx][k] / 100000; int ty = field[fy][fx][k] % 100000; int len = (nx-tx)*(nx-tx)+(ny-ty)*(ny-ty); if( len < 20*20){ noHit = 0; j=k=10; break; } } } } if(noHit == 1){ field[py][px][fCnt[py][px]] = nx*100000+ny; // printf("%d add %d\n", i, nx*100000+ny); fCnt[py][px] += 1; cCnt += 1; } } printf("%d\n", cCnt); return 0; }