結果
問題 |
No.1169 Row and Column and Diagonal
|
ユーザー |
|
提出日時 | 2025-01-11 13:22:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 317 bytes |
コンパイル時間 | 770 ms |
コンパイル使用メモリ | 58,240 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-01-11 13:22:10 |
合計ジャッジ時間 | 5,904 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | WA * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d",&n); | ~~~~~^~~~~~~~~
ソースコード
#include<iostream> #define rep(i,n) for(i=0;i<(int)(n);i++) using namespace std; typedef long long ll; typedef unsigned long long ull; int n; int main(){ int i,j; scanf("%d",&n); rep(i,n){ rep(j,n-1)printf("%d ",(2*(i+1)+j+n)%n+1); printf("%d\n",(2*(i+1)+j+n)%n+1); } return 0; }