Submission #398631

#TimeUsernameProblemLanguageResultExecution timeMemory
398631promaPainting Walls (APIO20_paint)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int minimumInstructions (int N, int M, int K, vector <int> C, vector <int> A, vector <vector<int>> B) { if (N != M) { return -1; } for (int i = 0; i < M; i ++) { if (A[i] != 1) { return -1; } if (B[i][0] == C[0]) { int flag = 0; for (int l = 1; l < M; l ++) { if (B[(i + l) % M][0] != C[l]) { flag = 1; break; } } if (!flag) { return 1; } } } return -1; } /* void solve () { int N, M, K; vector <int> C, A; vector <vector<int>> B; cin >> N >> M >> K; C.resize(N); A.resize(M); B.resize(M); for (int i = 0; i < N; i ++) { cin >> C[i]; } for (int i = 0; i < M; i ++) { cin >> A[i]; B[i].resize(A[i]); for (int j = 0; j < A[i]; j ++) { cin >> B[i][j]; } } cout << minimumInstructions(N, M, K, C, A, B) << endl; } */ int main () { // solve(); return 0; }

Compilation message (stderr)

/tmp/ccXIvOsF.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccAKAW1B.o:paint.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status