F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_12918221_23183\Main.java:2: ÀàÖظ´£º Main
 class Main { StringBuffer s = new StringBuffer(); public void ss(String s) { this.s = this.s.append(s); } public int ansS() { char a, b; a = s.charAt(0); b = s.charAt(2); if (a == b) return 0; else if ((a == 'R' && b == 'S') || (a == 'S' && b == 'P') || (a == 'P' && b == 'R')) return 1; else return -1; } } public class Main { public static void main(String[] args) { Scanner inScanner = new Scanner(System.in); int T; T = inScanner.nextInt(); for (int k = 0; k < T; k++) { int n = inScanner.nextInt(); inScanner.nextLine(); int cntA = 0, cntB = 0; for (int i = 0; i < n; i++) { A aA = new A(); aA.ss(inScanner.nextLine()); if (aA.ansS() == 1) cntA++; else if (aA.ansS() == -1) cntB++; } if (cntA == cntB) System.out.println("TIE"); else if (cntA > cntB) System.out.println("Player 1"); else System.out.println("Player 2"); } } }


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-02 07:59:17, Gzip enabled