這個網誌中的熱門文章
C# 井字遊戲
作者:
Dragonyue
-
開始畫面。 遊戲畫面。 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace CSharp_井字遊戲 { public partial class Form1 : Form { public Form1() { InitializeComponent(); Symbol1_tb.TextChanged += SymbolTextChenge; Symbol2_tb.TextChanged += SymbolTextChenge; Symbol1_tb.MouseClick += Symbol_tb_MouseClick; Symbol2_tb.MouseClick += Symbol_tb_MouseClick; } private void Symbol_tb_MouseClick(object sender, MouseEventArgs e) { TextBox tb = sender as TextBox; tb.SelectAll(); } private void SymbolTextChenge(object sender, EventArgs e) { TextBox tb = sender as TextBox; if (tb.TextLength >= 2) { tb.SelectAll(); ...
UVA 11321 Java
作者:
Dragonyue
-
import java.util.*; import static java.lang.System.*; public class main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(sc.hasNextInt()) { int num = sc.nextInt(); int m = sc.nextInt(); System.out.printf("%d %d\r\n", num, m); if(num == 0&& m == 0) break; Data[] datas = new Data[num]; for(int i = 0; i { int n; int r; boolean even; Data(int n, int r, boolean even) { this.n = n; this.r = r; this.even = even; } public String toString() { return Integer.toString(this.n); } @Override public int compareTo(Data other) { if(this.r != other.r) return this.r
留言
張貼留言