Skip to content

Commit

Permalink
Baekjoon #1966 프린터 큐 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
allrightDJ0108 committed Mar 28, 2024
1 parent b095c6e commit b3d9ed0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CodingTestStudy1.0/src/Implementation/Problem1966.java
Expand Up @@ -6,8 +6,6 @@
public class Problem1966 {

static int T, N, M;
static Queue<Integer> q = new LinkedList<>();


public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
Expand All @@ -19,18 +17,20 @@ public static void main(String args[]) throws IOException {
N = Integer.parseInt(str.nextToken());
M = Integer.parseInt(str.nextToken());

int[] arr = new int[N];//우선순위를 저장
int[] arr = new int[N]; //우선순위를 저장
Queue<Integer> q = new LinkedList<>();

str = new StringTokenizer(br.readLine());
for (int i=0; i<N; i++){
arr[i] = Integer.parseInt(str.nextToken());
q.add(i);
}

func(arr);
func(arr, q);
}
}

static void func(int[] arr){
static void func(int[] arr, Queue<Integer> q){

int cnt = 1;
int[] visited = new int[arr.length];
Expand Down
Binary file not shown.

0 comments on commit b3d9ed0

Please sign in to comment.