結果
| 問題 | 
                            No.839 Keep Distance and Nobody Explodes
                             | 
                    
| コンテスト | |
| ユーザー | 
                             IKyopro
                         | 
                    
| 提出日時 | 2019-06-14 23:00:32 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 498 bytes | 
| コンパイル時間 | 557 ms | 
| コンパイル使用メモリ | 61,932 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-11-14 12:53:40 | 
| 合計ジャッジ時間 | 2,341 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 2 WA * 28 | 
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int N;
vector<vector<int>> A(310,vector<int>(310,0));
int main(){
    cin >> N;
    for(int j=1;j<=N;j++){
        for(int i=1;i<=N;i++){
            if(j%2==1) A[i][j] = N*(i-1)+j;
            else{
                if(i<=N/2) A[i+N/2][j] = j+N*(i-1);
                else A[i-N/2][j] = j+N*(i-1);
            }
        }
    }
    for(int i=1;i<=N;i++){
        for(int j=1;j<=N;j++) cout << A[i][j] << " ";
        cout << endl;
    }
}
            
            
            
        
            
IKyopro