NYOJ题目839合并
生活随笔
收集整理的這篇文章主要介紹了
NYOJ题目839合并
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
---------------------------
AC代碼:
1 import java.util.Scanner; 2 3 public class Main { 4 5 public static void main(String[] args) { 6 7 8 Scanner sc=new Scanner(System.in); 9 10 int times=sc.nextInt(); 11 while(times-->0){ 12 13 int n=sc.nextInt(); 14 int book[]=new int[100]; 15 16 for(int i=0;i<n*2;i++){ 17 book[sc.nextInt()]=1; 18 } 19 20 for(int i=0;i<book.length;i++){ 21 if(book[i]==1) System.out.print(i+" "); 22 } 23 System.out.println(); 24 25 } 26 27 } 28 29 }?
題目來源: http://acm.nyist.net/JudgeOnline/problem.php?pid=839
轉載于:https://www.cnblogs.com/cc11001100/p/5825069.html
總結
以上是生活随笔為你收集整理的NYOJ题目839合并的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 如何申请招行腾讯圣斗士星矢联名信用卡?有
- 下一篇: 夺命雷公狗---node.js---20