Untitled
unknown
plain_text
2 years ago
939 B
6
Indexable
class queue { static int[] Data = new int[400]; static int front, rear; public queue() { this.front = this.rear = -1; } void reset() { front = rear = -1; } public void enQueue(int value) { Data[++rear] = value; } int deQueue() { return Data[++front]; } boolean isEmpty() { if (this.front == this.rear) { return true; } return false; } } public class Bai4 { static int n, m, cnt_exit; static char[][] arr = new char[20][20]; static int[] spinR = { 0, 0, 1, -1 }; static int[] spinC = { 1, -1, 0, 0 }; static int cr, cc, nr, nc, r, c; static boolean ans = false; public static void main(String[] args) throws FileNotFoundException { System.setIn(new FileInputStream("Text")); Scanner scanner = new Scanner(System.in); queue rqueue = new queue(); queue cqueue = new queue(); int tc = scanner.nextInt(); for (int Case = 1; Case <= tc; Case++) {
Editor is loading...