Submission #148267

# Submission time Handle Problem Language Result Execution time Memory
148267 2019-08-31T19:18:15 Z 요까할 로뭘 은명팀 1(#3666, mario05092929) Chessboard Nonogram (FXCUP4_nonogram) C++17
25 / 100
6 ms 464 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;
        if(i % 2) reverse(r[i].begin(),r[i].end());
        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;
}
# Verdict Execution time Memory Grader output
1 Correct 6 ms 384 KB Output is correct
2 Correct 6 ms 384 KB Output is correct
3 Correct 6 ms 432 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 6 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 384 KB Output is correct
2 Correct 6 ms 384 KB Output is correct
3 Correct 6 ms 432 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 6 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 6 ms 464 KB Output is correct
8 Correct 6 ms 256 KB Output is correct
9 Incorrect 5 ms 384 KB Output isn't correct
10 Halted 0 ms 0 KB -