답안 #148266

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
148266 2019-08-31T19:17:54 Z 연구맨(#3667, foja001) 체스판 네모네모로직 (FXCUP4_nonogram) C++17
25 / 100
6 ms 472 KB
#include "nonogram.h"
#include <bits/stdc++.h>
using namespace std;

std::vector<std::vector<int>> SolveNonogram(int n, int m, std::vector<std::vector<int>> r, std::vector<std::vector<int>> c) {
    vector<vector<int> > a(n);
    for(int i = 0;i < n;i++)
    {
        int k = 0,cn;
        for(int j : r[i])
        {
            for(cn = 0;cn < j;k++,cn++)
            {
                a[i].push_back(1);
            }
            if(k != m) a[i].push_back(0);
            k++;
        }
        if(i % 2) reverse(a[i].begin(),a[i].end());
    }
    return a;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 6 ms 472 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 5 ms 408 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 6 ms 472 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 5 ms 408 KB Output is correct
6 Correct 6 ms 384 KB Output is correct
7 Correct 5 ms 408 KB Output is correct
8 Incorrect 5 ms 384 KB Output isn't correct
9 Halted 0 ms 0 KB -