답안 #678659

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
678659 2023-01-06T09:54:20 Z Dan4Life 벽 칠하기 (APIO20_paint) C++17
0 / 100
2 ms 2644 KB
#include "paint.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define SZ(a) (int)a.size()
using vi = vector<int>;
const int maxn = (int)1e5+10;
const int maxm = (int)5e4+10;

const int INF = (int)1e9;

int n, m, k, c[maxn];
set<int> S[maxm];

bool works(int x, int y){
	for(int l = 0; l < n; l++){
		if(!S[x].count(c[y])) return false;
		x++, y++;
		if(x>=m) x-=m;
		if(y>=n-m+1) y-=n-m+1;
	}
	return true;
}

int minimumInstructions(int N, int M, int K, vi C, vi A, vector<vi> B) {
	n = N, m = M, k = K;
	for(int i = 0; i < n; i++) c[i] = C[i];
	if(m<n) return -1;
	return 1;
	
	for(int i = 0; i < m; i++){
		for(auto u : B[i]){
			S[i].insert(u);
		}
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Incorrect 2 ms 2632 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Incorrect 2 ms 2632 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Incorrect 2 ms 2632 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Incorrect 2 ms 2632 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2644 KB Output is correct
2 Incorrect 2 ms 2632 KB Output isn't correct
3 Halted 0 ms 0 KB -