結果
| 問題 | No.839 Keep Distance and Nobody Explodes |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-15 05:52:57 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 171 bytes |
| 記録 | |
| コンパイル時間 | 91 ms |
| コンパイル使用メモリ | 29,632 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-03-08 16:20:06 |
| 合計ジャッジ時間 | 1,942 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | I,i,j,k,A[300][300];
| ^
main.c: In function ‘main’:
main.c:3:13: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
3 | for(scanf("%d",&N);i<N/2;i+=++j/N,j%=N)A[i][k=i%2?N+~j:j]=++I,A[i+N/2][(k+N/2)%N]=++I;
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | I,i,j,k,A[300][300];
main.c:4:37: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
4 | for(i=j=0;i<N;i+=++j/N,j%=N)printf("%d ",A[i][j]);
| ^~~~~~
main.c:4:37: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
I,i,j,k,A[300][300];
main(N){
for(scanf("%d",&N);i<N/2;i+=++j/N,j%=N)A[i][k=i%2?N+~j:j]=++I,A[i+N/2][(k+N/2)%N]=++I;
for(i=j=0;i<N;i+=++j/N,j%=N)printf("%d ",A[i][j]);
}