Submission #120609

#TimeUsernameProblemLanguageResultExecution timeMemory
120609imsifileChessboard Nonogram (FXCUP4_nonogram)C++17
Compilation error
0 ms0 KiB
#include "nonogram.h" using namespace std; int r1[111]; void SolveNonogram(int N, int M, vector<vector<int>> Rclue, vector<vector<int>> Cclue) { for(int i=0, x=0; i<M; i++){ for(int j=0; j<Rclue[0][i]; j++) r1[x++]=1; x++; if(!Rclue[0][i]) break; } for(int j=0; j<M; j++){ for(int i=0, x=1-r1[j]; i<N; i++){ for(int t=0; t<Cclue[j][i]; t++) Fill(++x, j+1); x++; if(!Cclue[j][i]) break; } } }

Compilation message (stderr)

nonogram.cpp: In function 'void SolveNonogram(int, int, std::vector<std::vector<int> >, std::vector<std::vector<int> >)':
nonogram.cpp:6:6: error: ambiguating new declaration of 'void SolveNonogram(int, int, std::vector<std::vector<int> >, std::vector<std::vector<int> >)'
 void SolveNonogram(int N, int M, vector<vector<int>> Rclue, vector<vector<int>> Cclue) {
      ^~~~~~~~~~~~~
In file included from nonogram.cpp:1:0:
nonogram.h:3:31: note: old declaration 'std::vector<std::vector<int> > SolveNonogram(int, int, std::vector<std::vector<int> >, std::vector<std::vector<int> >)'
 std::vector<std::vector<int>> SolveNonogram(int N, int M, std::vector<std::vector<int>> Rclue, std::vector<std::vector<int>> Cclue);
                               ^~~~~~~~~~~~~