Submission #1368382

#TimeUsernameProblemLanguageResultExecution timeMemory
1368382faricaCasino (JOI26_casino)C++20
2 / 100
298 ms844 KiB
#include "Azzurro.h"
#include <bits/stdc++.h>

using namespace std;

namespace {
    // グローバル変数と内部関数は無名名前空間内で宣言すること
    // All global variables and internal functions should be declared in an unnamed namespace
    int variable_example = 0;
    int function_example(void) { return 0; }
}

std::vector<std::vector<int>> Azzurro(int N, int L, std::string S) {
    std::vector<std::vector<int>> x(N, std::vector<int>(N, 0));
    for(int i=0; i<N; ++i) {
        for(int j=0; j<N; ++j) {
            if(S[i+j]=='A') x[i][j] = 1;
        }
    }
    return x;
}
#include "Bordeaux.h"
#include <bits/stdc++.h>

using namespace std;

namespace {
    // グローバル変数と内部関数は無名名前空間内で宣言すること
    // All global variables and internal functions should be declared in an unnamed namespace
    int variable_example = 0;
    int function_example(void) { return 0; }
}

std::string Bordeaux(int N, int L, std::vector<std::vector<int>> T) {
    std::string s(L, 'A');
    vector<int>vec(15, 0);
    for(int i=0; i<N; ++i) {
        for(int j=0; j<N; ++j) vec[i+j] += T[i][j];
    }
    s[0] = (!vec[0] ? 'A' : 'B');
    s[13] = (!vec[14] ? 'A' : 'B');
    for(int i=2; i<=13; ++i) {
        if(vec[i] == i) s[i-1] = 'A';
        else s[i-1] = 'B';
    }
	return s;
}
#Result Execution timeMemoryGrader output
Fetching results...