結果
問題 | No.678 2Dシューティングゲームの必殺ビーム |
ユーザー | %20 |
提出日時 | 2018-04-27 23:49:35 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 379 bytes |
コンパイル時間 | 165 ms |
コンパイル使用メモリ | 29,952 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 22:30:58 |
合計ジャッジ時間 | 932 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | AC | 2 ms
5,376 KB |
testcase_02 | AC | 2 ms
5,376 KB |
testcase_03 | AC | 2 ms
5,376 KB |
testcase_04 | AC | 6 ms
5,376 KB |
testcase_05 | AC | 9 ms
5,376 KB |
testcase_06 | AC | 10 ms
5,376 KB |
testcase_07 | AC | 4 ms
5,376 KB |
testcase_08 | AC | 13 ms
5,376 KB |
testcase_09 | AC | 6 ms
5,376 KB |
testcase_10 | AC | 4 ms
5,376 KB |
testcase_11 | AC | 9 ms
5,376 KB |
testcase_12 | AC | 9 ms
5,376 KB |
testcase_13 | AC | 8 ms
5,376 KB |
testcase_14 | AC | 9 ms
5,376 KB |
testcase_15 | AC | 7 ms
5,376 KB |
testcase_16 | AC | 7 ms
5,376 KB |
testcase_17 | AC | 6 ms
5,376 KB |
コンパイルメッセージ
main.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:4:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d%d%d",&N,&L,&R); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int m[2181][1281],f[189]; main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 4 | scanf("%d%d%d",&N,&L,&R); | ^~~~~ main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:8:19: warning: implicit declaration of function 'fmax' [-Wimplicit-function-declaration] 8 | l=fmax(0,l); | ^~~~ main.c:1:1: note: include '<math.h>' or provide a declaration of 'fmax' +++ |+#include <math.h> 1 | int m[2181][1281],f[189]; main.c:8:19: warning: incompatible implicit declaration of built-in function 'fmax' [-Wbuiltin-declaration-mismatch] 8 | l=fmax(0,l); | ^~~~ main.c:8:19: note: include '<math.h>' or provide a declaration of 'fmax' main.c:9:19: warning: implicit declaration of function 'fmin' [-Wimplicit-function-declaration] 9 | r=fmin(r,R); | ^~~~ main.c:9:19: note: include '<math.h>' or provide a declaration of 'fmin' main.c:9:19: warning: incompatible implicit declaration of built-in function 'fmin' [-Wbuiltin-declaration-mismatch] main.c:9:19: note: include '<math.h>' or provide a declaration of 'fmin' main.c:23:17: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 23 | printf("%d\n",f[i]); | ^~~~~~ main.c:23:17: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:23:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbu
ソースコード
int m[2181][1281],f[189]; main(){ int N,L,R; scanf("%d%d%d",&N,&L,&R); for(int i=1;i<=N;++i){ int l,r,d; scanf("%d%*d%d%d",&l,&r,&d); l=fmax(0,l); r=fmin(r,R); for(int x=l;x<=r;++x){ m[d][x]=i; } } for(int x=L;x<=R;++x){ for(int y=2180;y>=0;--y){ if(m[y][x]){ f[m[y][x]]|=1; break; } } } for(int i=1;i<=N;++i){ printf("%d\n",f[i]); } }