結果
問題 |
No.991 N×Mマス計算(構築)
|
ユーザー |
![]() |
提出日時 | 2020-04-22 22:27:54 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 14 ms / 2,000 ms |
コード長 | 189 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 29,568 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 06:48:58 |
合計ジャッジ時間 | 2,835 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 |
コンパイルメッセージ
main.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int] 2 | main(k,w,c,x,i){k=1e9;w=1e5;c=32;scanf("%d",&x);printf("%d %d %d\n* ",x/w+1,w,k);R(x%w,k)R(w-1-x%w,1)c=10;R(1,(x-w+1+x%w+k)%k)R(x/w,k)R(1,1)} | ^~~~ main.c: In function 'main': main.c:2:1: warning: type of 'k' defaults to 'int' [-Wimplicit-int] main.c:2:1: warning: type of 'w' defaults to 'int' [-Wimplicit-int] main.c:2:1: warning: type of 'c' defaults to 'int' [-Wimplicit-int] main.c:2:1: warning: type of 'x' defaults to 'int' [-Wimplicit-int] main.c:2:1: warning: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:2:34: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 2 | main(k,w,c,x,i){k=1e9;w=1e5;c=32;scanf("%d",&x);printf("%d %d %d\n* ",x/w+1,w,k);R(x%w,k)R(w-1-x%w,1)c=10;R(1,(x-w+1+x%w+k)%k)R(x/w,k)R(1,1)} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #define R(n,v) for(i=n;i--;)printf("%d%c",v,c); main.c:2:34: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 2 | main(k,w,c,x,i){k=1e9;w=1e5;c=32;scanf("%d",&x);printf("%d %d %d\n* ",x/w+1,w,k);R(x%w,k)R(w-1-x%w,1)c=10;R(1,(x-w+1+x%w+k)%k)R(x/w,k)R(1,1)} | ^~~~~ main.c:2:34: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:2:49: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 2 | main(k,w,c,x,i){k=1e9;w=1e5;c=32;scanf("%d",&x);printf("%d %d %d\n* ",x/w+1,w,k);R(x%w,k)R(w-1-x%w,1)c=10;R(1,(x-w+1+x%w+k)%k)R(x/w,k)R(1,1)} | ^~~~~~ main.c:2:49: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:2:49: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:2:49: note: include '<stdio.h>' or provide a de
ソースコード
#define R(n,v) for(i=n;i--;)printf("%d%c",v,c); main(k,w,c,x,i){k=1e9;w=1e5;c=32;scanf("%d",&x);printf("%d %d %d\n* ",x/w+1,w,k);R(x%w,k)R(w-1-x%w,1)c=10;R(1,(x-w+1+x%w+k)%k)R(x/w,k)R(1,1)}