Submission #4384718


Source Code Expand

Copy
import java.util.Scanner;
public class Main{
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
	int an=scan.nextInt();
	String a=scan.next();
	boolean bool=false;
	for(int i=0;i<a.length();i++) {
		if(an==0) {
			bool=true;
		}
		char ch=a.charAt(i);
		switch(ch) {
		case '+':an++;break;
		case '-':an--;break;
		}
	}
	System.out.println(bool?"Yes":"No");
	}
}

Submission Info

Submission Time
Task B - セキュリティ
User klno
Language Java8 (OpenJDK 1.8.0)
Score 0
Code Size 408 Byte
Status
Exec Time 95 ms
Memory 23764 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 s1.txt, s2.txt, s3.txt
All 0 / 200 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt 93 ms 23764 KB
02.txt 93 ms 20692 KB
03.txt 94 ms 23124 KB
04.txt 95 ms 21588 KB
05.txt 93 ms 21844 KB
06.txt 94 ms 23252 KB
07.txt 95 ms 21588 KB
08.txt 94 ms 22996 KB
09.txt 93 ms 21076 KB
10.txt 94 ms 19540 KB
11.txt 93 ms 21204 KB
12.txt 92 ms 18644 KB
13.txt 93 ms 21716 KB
14.txt 92 ms 23124 KB
s1.txt 93 ms 20564 KB
s2.txt 92 ms 20692 KB
s3.txt 93 ms 23124 KB