結果

問題 No.5002 stick xor
ユーザー mlpj56dmlpj56d
提出日時 2018-05-25 23:34:58
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,048 bytes
コンパイル時間 2,143 ms
実行使用メモリ 1,504 KB
スコア 0
最終ジャッジ日時 2018-05-25 23:35:02
ジャッジサーバーID
(参考情報)
judge8 /
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<iostream>
using namespace std;

int N,K;
int d[60][60];
int main (){
    cin >> N >> K;
    int L[K];
    int dark = 0;
    for(int i=0; i<K; i++){
        cin >> L[i];
    }
    for(int i=0; i<N; i++){
        for(int j=0; j<N; j++){
            char a;
            cin >> a;
            a = a - '0';
            d[i][j] = a;
            if( a == 1) dark++;
            else dark += i + j;
        }
    }
    int chunibyou = 0;
    for(int i=0; i<K; i++){
        int y1,y2,x1,x2;
        for(int j=0; j<N; j++){
            chunibyou += dark;
            if( j % 2 == 0 ){
                y1 = 1;
                y2 = L[i];
                x1 = chunibyou % N + 1;
                x2 = chunibyou % N + 1;
            } else {
                y1 = chunibyou % N + 1;
                y2 = chunibyou % N + 1;
                x1 = L[i];
                x2 = 1;
            }
        }
        if( y1 == y2 || x1 == x2){
            cout << y1 << " " << x1 << " " << y2 << " " << x2 << endl;
        }
    }
    return 0;
}
0