![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FIfy5O%2FbtrLj86vwro%2FHyMgEAwiUqFgQ7dnfXar5K%2Fimg.png)
PS/알고리즘 문제풀이
*배열* arr3 (java, 알고리즘)
배열을 선언한 뒤 풀어야 하는 arr3문제이다. 핵심 이중 배열을 선언하여, 위치를 나타낸다. 처음에 풀 때는 첫 번째 줄에 배열의 값을 저장한 뒤, 이후 나머지 줄의 배열을 규칙적으로 대입해주었는데, 더욱 쉬운 방법이 있다. 정답 코드 import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n =sc.nextInt(); int[][] arr = new int[105][105]; int x,y; int count=1; for (int i=0;i